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.
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
ECR
in the search box at the top and open the Elastic Container Registry service.You have successfully built the image and can now proceed to Deploying Amazon EKS on Spot instances.
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.
Open the Admin Area of GitLab interface and in the Runners section get the registration code. Use it instead of the one from the project.
Challenge 2: Trigger auto-scaling of the instances to get more runners created.
By default, auto-scaling is done by CPU load, so you can run a CPU load generator inside your build scripts to simulate it, for example, you can use stress
or stress-ng
tools for this.
Challenge 3: Modify the auto-scaling group to perform scaling by the number of the jobs instead of the CPU load.
Create a Lambda function that gets the number of jobs from GitLab API and publishes it as a custom CloudWatch metric. Use this metric to scale the group.