PiCluster 1.6 – Move your Containers to Different Hosts

I am pleased to announce v1.6 of PiCluster. In this release there are a few usability bugs fixed and a new feature that allows you to change the host of a running container.  Having the ability to easily change where a container is running is a standard and crucial feature to expect from a container management platform. I am glad that it is finally here and let’s explore how it works!

In my PiCluster I have six Raspberry Pi 3 nodes.  My Dockerfiles’s are maintained in a Git repository that is available on each node.  I think that this approach is the most efficient way to keep track of the Dockerfiles because I can easily build any of my container images on any host without having to manually copy files back and forth.

In the PiCluster v1.6 web console, you should see a “Change Host to” section under “Manage Containers”.  Select the container that you want to move and then select the destination host followed by clicking on the Submit button. Background processes will now run to accommodate the request and it may take a few minutes to see the container running on the new host. Now let’s explore what is happening in detail behind the scenes.

After the Submit button is clicked on, the PiCluster config file is updated in memory to reflect the new host.  Existing container heartbeat configuration will also be transferred to the container config for the new host. The container will then be deleted where it is currently running and the configuration changes are written to disk.  Finally, PiCluster will build the container image on the new host and run it.

I hope that you enjoy this new feature. It has simplified my home infrastructure because it makes routine maintenance easier. I can easily move containers to another host and keep my services running with minimal downtime.