This project started with the question – using VMware management software today, I wonder what would it be like to manage and provide self service access to Docker containers right alongside the traditional virtual machines and other services. So that is what I explored and that is what I built here so far. This is just going to be part one of…many probably… as I develop the ideas further.
What does this solution aim to do?
This solution elevates a docker based container to somewhat of a “first class” citizen, in that it sits alongside virtual machines in the self service vCAC catalog.
Really? You are able to do this today?
Well… Mostly. More work needs to be done to make it more functional. But as of this part 1, provisioning is working great, and monitoring too (thanks to work from a co-worker that will be written about later). Anything further like day 2 operations, or just tear down (of the containers) is manual currently. But still possible.
So walk me through it?
There’s a single machine blueprint that deploys a CentOS machine and installs docker. I needed a way to identity these machines as a special entity so I went with vSphere tags for now. So using the vCAC Extensibility functionality I also have it fire off a vCO workflow that calls PowerShell (talked about here) to add the vSphere tag. Not elegant but it works. This will be improved later. So now that a machine exists, there is additional catalog items for various services like the demo application SpringTrader, or simply MySQL, Postgres, Ubuntu, etc, that run a vCO workflow to deploy the image onto one of the existing docker nodes. Currently it picks a node randomly, but with some additional effort I plan to implement a (very) poor mans DRS and utilize either a hyperic plugin that my team is working on, or maybe just query cpu/memory directly to choose the node.
OK tldr; Boil it down!?
First docker nodes are deployed from vCAC blueprints. Then vCO workflows can identity those nodes via vSphere tags and deploy the requested docker image.
I (and others) am (are) working on ways to tear down the containers, tear down the nodes in mass, automate discovery and monitoring of the containers, and so on.. Currently there’s not even a way to know where the image was deployed to – to come!
Can we have the workflows, scripts, etc…?
Not yet…! But if it is fun for anyone, I do have the demo app springtrader available on Docker Hub if you want it. It weighs in at a hefty 4gb. Find it at jasper9/st_allinone. There is no special sauce included in here, it’s simply the SpringTrader app documented here built into an image all ready to go (very poorly built, I’m sure….).
Sweet! How do I run SpringTrader?
This should probably be a full post on it’s own. But in short this command will get it running. Change the first 8080 to any open port if it’s already in use.
BY RUNNING THIS IMAGE YOU IMPLICITLY ACCEPT ALL EULU THAT ANY INCLUDED COMPONENTS IMPOSE. THIS IS SIMPLY A DEMO APPLICATION AND NOTHING MORE.