Mastering My Chaos: How I Turned My HomeLab into a CI/CD Playground with GitLab

I’ve always been that guy, the one who can’t resist tinkering with all sorts of tech gadgets and software. My personal projects began to stack up like a comedic pile of digital chaos. Eager to streamline this mess, I embarked on a quest to master various CI/CD strategies using a self-hosted GitLab service. Is it worth it?

I kicked off this geeky adventure by setting up an old thinkpad laptop with Ubuntu Desktop—yes, the one with a GUI because, let’s face it, even tech wizards appreciate the simple pleasures of a visual interface. My setup allowed me to manage my GitLab projects right from my browser. Installing and configuring GitLab was a breeze, or so the online guides made it seem.

Now, let’s get to the juicy bits—the challenges and face-palm moments that every tech enthusiast secretly enjoys:

  1. Cloudflare + NGINX Proxy Manager: Sure, securing a domain name and setting up an SSL certificate for HTTPS might not be mandatory, but who doesn’t love an extra layer of security? It was a classic trial-and-error saga to get the Docker service for NGINX proxy manager running smoothly.
  2. Docker-in-Docker on GitLab: Oh, the documentation! It’s there, but admit it, we all skip it at first. Getting to grips with what’s going wrong and how things work took a hot minute, but once I buckled down and read through it, things clicked into place.
  3. GitLab Container Registry: Surprise, it’s not enabled by default! All the online tutorials were showing me this option that they had available in their Gitlab instance, but mine didn’t had it by default, also it seems that Gitlab has some plans in this area, as there is some new feature for this in beta, but to be honest, I’m not interested in getting more complex with this, as the plain default docker registry serve my purpose, although, I did get an eye over Harbor container registry solution, which I might get back at a reasonable point in life. So, I had to tweak the gitlab.rb file to get it working. Heads up, there are a bazillion flags and properties in there, so it’s super easy to miss something or mistakenly toggle the wrong setting.
  4. Managing GitLab Runners: This isn’t rocket science, but it’s no walk in the park either. Juggling IPs, access rights, and user roles across various hosts or VMs is the kind of challenge that keeps a tech junkie up at night—in a good way!

Conclusion:

While I continue to use both GitLab and GitHub for hosting my projects in their cozy private spaces, the open-source allure of GitLab-CI has its own appeal. It lets me orchestrate a full CI/CD dance right on my network. Sure, it comes with its own set of sitcom-worthy hiccups and limitations, but it’s also opened the door to a world of learning and experimentation.

Sure, it took me 50 pipelines to finally get a green build, but it was worth it!

How about you? Have you ventured into the wild world of self-hosting with GitLab, Jenkins, or other CI/CD tools in your homelab?


Posted

in

by