Configure GitLab CI Runner with Docker executor using AWS EC2
Valentin Despa Valentin Despa
59.5K subscribers
32,898 views
886

 Published On Apr 21, 2022

In this tutorial, I will show you how to Configure your own GitLab Runner with a Docker Executor using AWS EC2.
🔻 Click on SHOW MORE 🔻

This is useful if you are trying to use GitLab.com and are running run out of minutes or simply need more power.

I will show you how you can run your own GitLab Runner on AWS and cover:
- creating a new virtual machine (VM) on AWS using EC2
- installing the GitLab Runner on the VM
- configuring the GitLab Runner to work with GitLab.com

--

⭐️ Video contents ⭐️

⌨️ 00:00 - Overview
⌨️ 01:33 - Create a VM on AWS EC2
⌨️ 05:28 - Install dependencies (Git, Docker)
⌨️ 08:46 - Download & install the GitLab Runner
⌨️ 09:40 - Register the GitLab Runner with GitLab
⌨️ 15:42 - Test the GitLab Runner
⌨️ 18:32 - Test Docker build and push
⌨️ 21:28 - Enable the privileged mode
⌨️ 27:07 - Conclusion & next steps

⭐️ Commands & resources mentioned ⭐️

A Brief Guide to GitLab CI Runners and Executors
  / a81b9b8bf24e  

A list of the most important commands used in this tutorial:

Update dependencies:
sudo yum -y update

Install Git:
sudo yum install -y git

Install Docker:
sudo amazon-linux-extras install -y docker

Add the ec2-user user to the docker group:
sudo usermod -aG docker ec2-user

Ensure the Docker daemon starts automatically:
sudo systemctl enable docker

Restart your EC2 instance:
sudo reboot

Download the GitLab Runner installation package:
curl -LJO "https://gitlab-runner-downloads.s3.am..."

Install the GitLab Runner:
sudo rpm -i gitlab-runner_amd64.rpm

Register the GitLab Runner:
sudo gitlab-runner register

Edit the config.toml file:
sudo vim /etc/gitlab-runner/config.toml

The GitLab CI pipeline config used to test the runner:
https://gitlab.com/-/snippets/2300614


⭐️ 🎓 GitLab CI/CD ONLINE COURSE ⭐️

Want to learn more about CI/CD pipelines? Check my GitLab CI online course.

Get it at a special price and help support this YouTube channel:
http://www.vdespa.com/courses

--

⭐️ 💬 I have a question. ⭐️

I do my best to answer all comments here on YouTube but I cannot make any guarantees.

If you are asking a question, make sure to include as many details as possible.

--

⭐️ 💡 I have a video idea ⭐️

Do you want me to create a video on a specific topic? Just fill out the form below:

https://forms.gle/uWEzXFQ2viJtZtvZ7

--

⭐️ 📺 Learn GitLab on YouTube ⭐️

Collection of video tutorials:

▸ Learn GitLab CI:
   • Gitlab  

___

⭐️ 📕 Free resources ⭐️

📌 Official Gitlab CI documentation
https://docs.gitlab.com/

📌 DevOps with Valentine
  / devops-with  

--

⭐️ 📩 Contact & Imprint ⭐️

👉 Follow me on Twitter:
  / vdespa  

👉 Follow me on Medium:
  / vdespa  

👉 Follow me on Facebook:
  / valentin-despa-113038143438826  

👉 Let's connect on LinkedIn:
  / vdespa  

http://vdespa.com/imprint

__

show more

Share/Embed