Cool DevOps projects on Raspberry Pi

Router

Run Jenkins and Localstack on a Raspberry Pi cluster at the home office

After completing a course at Udemy for mastering Jenkins, I wanted to put the learnings into good use and get some more hands-on expirience.
So I got inspired to set up a DevOps tooling cluster at the home office, and to finally make good use of my Raspberry 4 units and TP-Link switch lying around.

So I built a tooling cluster with the following installs, all running on the Raspberry Pi's:

  • A Jenkins controller instance
  • A Jenkins worker instance
  • An instance running localstack (an emulator for AWS)
  • A router and DHCP server using RaspAP

Features

After building the stack, I now have extended my DevOps testing and development environment with the following features:

* I can run builds and pipelines on Jenkins for my commits while working undisturbed at my laptop
* I use and test Jenkins with distributed build setups 'as if it were for real'
* I extended my development environment with 'AWS running locally' - localstack supports SQS, S3 and many more. This prevents polluting my AWS accounts with development and test services.

For Jenkins, I got it running in docker, and implemented support for 'docker in docker', so I can run builds in docker within the Jenkins container.

Then, even more, using the router I set up and the switch, I created multiple VLAN's and subnets:

* A vlan that I can use to connect my computers directly to the upstream internet connection (if I want to or if the router is in maintenance)
* A subnet on a vlan dedicated for my computers
* Another subnet on a different vlan dedicated for my RPI units
* Quality of service configuration on the switch so my computers will have higher QOS priority (so intense traffic on the RPI vlan will not disturb video conference and calls and so on on my computer vlan)



The hardware

* TP-Link TL-SG1016DE switch (or equivalent; multiple port based vlan support and QoS support)
* 2x Raspberry Pi 4 with 2Gb memory
* 2x Raspberry Pi 4 with 4Gb memory
* 1x 1000Mbps USB network adapter
* 1x 100Mbps USB network adapter
* 2x USB3 SSD drives of 128Gb
* 2x USB3 SSD drives of 256Gb
* lots of patch cables



Post date: July, 2023

Skills

  • Linux
  • Switch & VLAN
  • Routing & DHCP
  • Jenkins administration
  • Localstack / AWS
  • Docker

More..

After the initial setup described, several features where added:

SSM Agent registration

I installed the SSM Agents so I can remotely manage, patch and run documents and install software through AWS Fleet Manager on all the instances in the cluster at once.

Amazon Fleet manager is part of Amazon Systems Manager.