

Now we have created our GitLab Runner and it will listen to each push we are going to make in the future to this GitLab repository. If everything went successfully, take a look into your GitLab Project > Settings > CI/CD > Runners – it should display a runner with a green dot on the left side. Moving to the Settings of your GitLab project and choosing CI/CD, you should see the following (make sure to expand the Runners section):Ĭlick on ‘Show Runner Installation Instructions’ and follow the steps which are displayed (except the registration of the runner).Īfter setting up the GitLab-Runner, we have to register it to our GitLab project using the following command (replace the ‘ REGISTRATION_TOKEN‘ with your own Token from the GitLab Project). It needs to be installed on our EC2 instance and needs to be registered in the GitLab Project. One of the most important elements for our CI/CD pipeline is the so called ‘GitLab Runner’, who takes care of the whole realization of our pipeline. Now, connect to the EC2 instance via SSH / Terminal. Otherwise GitLab will not be able to communicate with the instance. Make also sure, that your Security Group settings for the EC2 instance allow respective ports for incoming requests ( link). You can basically choose an instance type at your choice – I am going with a t2.small instance. I named the EC2 instance “GitLab Runner”. We want to use the AWS cloud services to handle the workloads and to store our Docker image(s) later on.įirstly, we create an EC2 instance, which will do the main work when in comes to building the image and pushing it to our Registry. Choose a project name in the following step and press “create project”. Create GitLab RepositoryĬreating a new GitLab Repository using the “Create blank project” button. The aim should be to be able to push our code to a GitLab Repository, GitLab then builds a Docker container image and pushes it to a Container Registry on AWS. Above a rough overview of what we are going to focus on. Really starting to make use of its advantages is another chapter and today I would like to go through the process of how to build a really simple CI/CD Pipeline using popular tools like GitLab, Docker and Amazon Web Services. Automation is one of the biggest levers IT brings naturally with it.
