So after my last post about Docker here, I’ve spent quite a bit of time playing with various configurations before finally settling on something that’s been running stable for the past week or so.  I suspect it won’t be how I run things long term, but it should help me decide what the future looks like.

My first attempt was set-up using a RancherOS VM with portainer.io to manage the containers.  Given how little I understood about all this, I struggled with this configuration.  Much of the basic help on the internet is based on Docker commands, and whilst the Rancher ones might not be that dissimilar, I struggled to get even relatively simple things setup easily.  Not quite sure why, but I thought running RachcherOS with RancherUI to manage the containers might be easier, but whilst this is clearly a powerful solution, it was much too complicated and overkill for what I needed, and lasted even less time.

The next iteration was to create another ubuntu VM (I’d already set one up running Crashplan here but didn’t need the desktop GUI, and another running Onlyoffice Document Server) and install standard Docker onto this.  I then fired up a portainer.io container so I had a graphical way of managing things.  This seemed to be the best approach, and I quickly started to get to grasps with things, albeit in a create it, break it, destroy it and recreate it kind of way.  I set-up containers for nextcloud and MariaDB several times, containers for Onlyoffice in various guises a similar number of times, and played around a little with Nginx, Redis, some home automation stuff, and emby.  Pretty much all of the things I currently run on my FreeNAS server in either a jail or using a VM.

The problem I had with this set-up wasn’t related to Docker, but the fact I was now running 3 bhyve VMs on my FreeNAS box, all of which were utilising resources.  Crashplan is quite memory hungry, needing between 4-5GB due to the volume of data I am backing up.  The Onlyoffice one doesn’t take up much, although just having it running a Ubuntu VM is using resources that FreeNAS could be utilising.  Running things like emby in a container need a reasonable amount of processing power to transcode media, so between them all, I felt like I was starving my storage server, so needed a different approach.

Given I thought I’d be able to run Onlyoffice in a container, I thought running a single VM that I could allocate a couple of CPUs and 8GB RAM to would be the best option, and I hoped I’d be able to run CrashPlan, Docker and the various containers required.  This meant potentially breaking my Crashplan VM though, which had been running pretty well for the last month or so.  But with FreeNAS snapshots and nightly backup what could possibly go wrong?  Well, to be honest, not that much!

Installing Docker into the Crashplan VM was painless as was setting up the various containers.  Mapping things from other parts of my FreeNAS box provided somewhat of a challenge, and I ended up using NFS v3 for some things as I couldn’t get permissions working right with v4.  The biggest issue and one that made me roll things back (although not to the beginning) was the lack of disk space I’d allocated to the VM when I created it.  Whilst 30GB might have been enough for CrashPlan, adding in another 10GB+ for Docker wasn’t so I needed to resize the virtual disk.  Sound pretty trivial, and in terms of iohyve/bhyve it is a single command increased the size of the zvol disk, but making use of this in Ubuntu is a whole other problem.  I had a number of failed and partially successful attempts before stumbling across this excellent guide which goes through everything on the Ubuntu CLI and not using Gparted which is what most help suggests.

Anyway, I got everything running in the end and even added in Onlyoffice Document Server so I could test it inside a container and run as a service on Ubuntu.  So now I have a single VM running the 2 things I was running in VirtualBox jails – Crashplan and Onlyoffice – and also running several docker containers allowing me to play with alternative ways of running things on my FreeNAS server.

I’m going to save the details of those for another blog after I’ve given some thought as to the best way to be running these…