LXC for gitlab runner

Sounds like you are both new to proxmox and gitlab. I would suggest you do a deep dive in both. To get you started, I would first create an LXC on proxmox and install the runner directly on it.

https://docs.gitlab.com/runner/install/linux-manually.html

When you register the runner, set it for executer shell. This will start a shell on that LXC every time the runner is triggered.

This will get you up and running quickly while you learn docker and nesting docker in LXC containers.

once you start understanding the framework of runners and docker, you can move one level deeper, install docker in LXC and configure runner to run in that nested docker.

https://docs.gitlab.com/runner/install/docker.html

Regarding that registry, take it with a grain of salt, pulling in someone elses image and running it in your environment is sketchy, i looked at that repo, you will need to learn ansible, how to manipulate LXD and the code he/she has written assumes there are NO existing containers as it starts and deletes them at will. This would be something you want to run on a VM within proxmox and not on the proxmox host itself until you get the ins and outs.

If you read through his code, he is using custom images for the LXC, id be weary as i said before, if you want to give this a try, all he is doing is spinning up the container and installing the runner appropriate to the OS. This can be done using the regular templates that Proxmox has access to. So would recommend that.


That should get you going, There are so many moving pieces here that one post will not be enough, however id recommend the below track
How LXC spins up/down/ attaches : lxc-start lxc stop etc etc, in a VM that does not include proxmox
How to register runners in "bare metal" (VM), LXC (bare metal but an LXC that has been started and configured by you) then lxc + docker
Learn what the different executers do and support.
Understand how image registrys work, cloning that repo will not automatically give you a registry.
understand how to point to custom registries in gitlab
Understand CI/CD workflows, if you can follow the ci.yml file, great, if you donmt understand anything, then deep dive there.

Proxmox is a front end for LXD and QEMU, you can use the LXC/LXD environments on any linux install. Read through what he is doing, by following the config files. Good luck
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!