I’ve been going through Ansible training for work, and I want to be able to easily try out some of the playbooks and modules on my Windows 10 box. There’s lots of ways I could go about this, but for me the thing that makes the most sense is to leverage Docker for Windows (DfW) and the magic of containers to be able to get up and running quickly. In this post I will walk through what I did to get started, and why I landed on containers instead of another solution.
I’ve been working my way through the very excellent Docker Deep Dive book by Nigel Poulton. If you’ve been meaning to get into the whole Docker scene, this is the perfect book to get you started. Nigel doesn’t assume prior container knowledge, and he makes sure that the examples are cross platform and easily executed on your local laptop/desktop/whatever. That is, until you get to the section on Docker Swarm. Now instead of using a single Docker host, a la your local system, you now need six systems – three managers and three worker nodes. It’s entirely possible to spin those up on your local system – provided you have sufficient RAM, but I prefer to use the power of the cloud to get me there. See I might be working through the exercises on my laptop over lunch and then my desktop at night. I’d like to be able to access the cluster from whatever system I am working on, without deploying the cluster two or three times.