CI/CD and Test Workloads (GitLab) with EC2 Spot Instances

Overview

In this workshop you will add runners on Amazon EC2 Spot instances to a pre-installed GitLab. Then you will build a containerized demo application on them and install it into Kubernetes cluster that also uses only spot instances as its worker nodes. In the end you will test it to verify the results.

You can perform all workshop steps one-by-one to get to the expected results, but for better understanding of using Spot instances with GitLab we recommend that you also look into the used templates and result files and try modifying them additionally.

Many workshop steps imply manual actions in the AWS console to better demonstrate the underlying concepts, but in a Production environment it is better to automate them using Infrastructure as Code (IaC), such as AWS CloudFormation and AWS CDK.

Workshop Details

This workshop will be broken down into a series of sections that flow on from each other (that is, you must complete each section before proceeding with the next). The whole flow looks as following:

GitLab on Spot workshop flow

The exercises that will be covered are:

The final architecture that we will be building looks the following way:

GitLab on Spot workshop architecture diagram