let’s move to docker - part 1

Posted on July 08, 2024 in tech • 3 min read

This is part 1 of me trying to move my home lab from a multi node virtualised platform to docker containers.

this post will cover why I plan to move to docker

The plot

I run a small home lab which comprises of the below hardware

  • 4x Raspberry Pi zero w
  • 2x Raspberry Pi 1
  • 1x Raspberry Pi 2
  • 1x Orange Pi R1
  • 2x Orange Pi 1
  • 1x desktop running headless - intel i5 / 32 GB
  • 1x desktop running headless - intel i3 / 8 GB
  • Couple of 8 port unmanaged ethernet switches.

All of these guys help me run these apps and services -

  • The pi zeros mostly run security cams and wireless speakers around the house.
  • The other raspberry pis run some infrastructure services - dns, dhcp, network wide ad blocker, wireless printing etc.
  • the orange pi r1 runs a segregated openwrt network for the homelab.
  • The 2 orange pis mostly run monitoring, alerting software and a VPN for the homelab.
  • The i3 desktop is the NAS. Configured with 3x 2TB drives as a RAID 5 storage - gives me 6TB storage with fault tolerance of one drive. This is the primary data store for photos and documents for all of my family members. This node also runs the backup server.
  • The i5 desktop is the core of the homelab. It runs multiple VMs running some of my super secret projects and a YunoHost server. This yunohost server serves as -
  • landing page for all my projects and self hosted apps.
  • Provides SSO for all apps.
  • allows quick, simple and easy deployment of apps - available for yunohost.
  • Runs a Nextcloud server which does everything thing possible to move away from google and provides unlimited storage for documents and photos for all home users. This node also runs other self hosted apps like wallabag, ttrss, calibre, motioneye, trillium notes, friendica node and many more.

The why ?

I have this setup since 2020 and it took me close to 6 months to set up everything. YunoHost makes it very easy to manage the entire stack. But over the years I have come across many reasons to move to something new, a platform based on docker, portainer and kubernetes.

  • Opportunity to learn docker and containers.
  • Move to newer technology.
  • Security
  • Breach on any one YunoHost app may lead to breach of entire stack.
  • Eliminate cross app usage of same version of PHP on YunoHost.
  • Move away from the aging php based YunoHost platform.
  • Lot more apps available on docker
  • Performance -
  • Some VMs run unwanted at times - tried some custom scripts to make them on demand, but the results were not great.

  • Memory leaks on untested / low quality apps on YunoHost.

The how ?

The plan is not to move in one go, but in bits a pieces.

  1. Build a temporary desktop - i3 / 16GB, mostly scavenged from my development PC and some old hardware.
  2. Install, configure and most importantly learn docker !
  3. Start moving low priority apps and use it from the new platform for few weeks.
  4. If the new stack behaves as expected and I am able to mange the technical aspects then move critical apps to the new stack.
  5. Run the new stack with all apps for few months.
  6. Disk copy (physical swap of disks) new stack to i5 server and release the temporary pc.
  7. Retain a backup of the old stack for 6 more months.

I will focus on the challenges in part 2 of this post.

That’s it for today!

.