The mission: homelab as code

In this post I wanted to draw your attention to a couple of Docker images I created. I found that while increasingly automating more aspects of my homelab I needed a place to execute my code. And running this on my laptop isn’t always the best choice.

The philosophy behind my homelab is that I should think of it like cattle. There is nothing unique about a server and when I have a new use case it should not take days to rebuild it. The reality however is that for there to be automation you always need to have some systems in place to begin with. And that is where SaaS platforms like Azure DevOps come into play. There are solutions that you could host on-premises, but most enterprises I’ve worked for recently are looking to outsource these systems. So why not do the same as my lab should reflect situations I encounter in real life.

The solution: bring your own runner

When using a CI/CD pipeline running as SaaS service you still need to have some minimal infrastructure on-premises in order to run whatever code you want to execute locally. This is where private or self-hosted runners come into play. These runners connect to the cloud service and check for jobs that are queued for execution.

Azure DevOps agent communication, source: Microsoft

For me the most logical places to run such a runner are either on the Raspberry Pi that I use 24×7 for Home Assistant or on my NAS. These systems are both capable of running containers and will continue to run regardless of the state of my homelab. Both run on an ARM cpu and I was surprised to learn that Microsoft had not made a Docker container available for this platform as far as I could tell. They did however document quite extensively on how to build such a container.

So, with the code from Microsoft’s website, I created minimalistic runner containers based on Ubuntu 18.04 and 20.04 for both x64, ARM and ARM64. My intention is to add more functionality in the future like the Microsoft-hosted runners. But for now, if you want to get started with Azure DevOps and want to have self-hosted runners on ARM you can use one of these container images:

swerveshot/azp-ubuntu-bionic
Ubuntu 18.04 LTS (Bionic) Docker container for Azure Pipelines agent.
swerveshot/azp-ubuntu-focal
Ubuntu 20.04 LTS (Focal) Docker container for Azure Pipelines agent.

I hope you find these runners to be useful as well. Happy coding!


Rudolf Kleijwegt

I am an experienced IT professional with over 20 years of hands-on experience designing, deploying, and maintaining IT infrastructure in both enterprise and service provider environments. My skills span across Linux and Windows and a multitude of server applications, allowing me to excel in a wide range of IT roles. Currently, my primary focus is on Software Defined DataCenter and DevOps. I am passionate about staying up to date with the latest trends in the industry to achieve superior outcomes.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *