Building the demo app

In this lab you will push the changes to your origin repository and verify that the pipeline has successfully finished both in GitLab and by checking the image in Amazon ECR.

  1. Return to the browser tab with Cloud9 and execute the following command in the terminal. Specify root as the username and the same password you used in Create a GitLab repository to log in to GitLab:
git push -u origin main
  1. Return to the browser tab with GitLab and in the navigation pane choose CI/CD > Pipelines.
  2. Make sure that the CI/CD pipeline is successfully completed or wait until it does. If there were any issues, open the failed stage by clicking the corresponding circle and check the detailed execution log:

GitLab Screenshot: Build pipeline completed

  1. Return to the browser tab with AWS Console.
  2. Type ECR in the search box at the top and open the Elastic Container Registry service.
  3. Open the repository with gitlab-spot-demo in its name and verify that it contains an image that has just been built in GitLab:

ECR Console Screenshot: Images

You have successfully built the image and can now proceed to Deploying Amazon EKS on Spot instances.

Challenges

If this and previous sections of the workshop seemed too easy, try completing the following challenges:

Challenge 1: Configure shared runners for the whole GitLab CI/CD and not just the current repository. Create an additional repository and verify that your runners serve it too.

Click to reveal a hint

Challenge 2: Trigger auto-scaling of the instances to get more runners created.

Click to reveal a hint

Challenge 3: Modify the auto-scaling group to perform scaling by the number of the jobs instead of the CPU load.

Click to reveal a hint