While at a DevOps Birds of a Feather session at Ohio Linux Fest today I was describing to John Willis (@botchagalupe) my experiments with Docker and the Pi Swarm. Along the way, I mentioned that I’d gotten heterogenous docker swarms working using Powerstrip — aka Multifarious, first described in Heterogenous Docker Swarms Teaser.
In so doing, I had a flash of insight of how I might go about creating a heterogenous swarm without using Powerstrip or other tools. It’s just slightly subversive.
I HOPE that the following is soon deprecated — hopefully Docker will soon support multiple architectures. I believe that it could be done relatively easily — there are a few things which would need to happen and/or ways in which it could be implemented. I’ll talk more about them in a subsequent post.
I’ve not implemented it yet — I wanted to document my idea before I forgot it, but the gist is as follows:
- Requests go to the swarm master as they would in any normal swarm. Constraints can be used or not as needed.
Assuming that constraints don’t dictate a particular swarm member, the request goes to the member chosen by the swarm master.
Here’s the tricky bit. There are registries for each architecture. At present this will need self-signed certificates for each architecture. If, for instance, the local registry is called “registry.foo.com”, there will need to be DNS entries for each architecture so that the registry for each architecture is the one which resolves to registry.foo.com. At present it is best if either all registries do not talk to servers outside the local network or allow the dominant architecture (x86_64) to do so and subversive architectures not.
Images would need to be tagged with the same name and then pushed to the proper registry for the architecture, at which point they are made available for the swarm members.