Ben Firshman and contributors thought up and created this feature for Docker that lets you provision remote daemons on demand given cloud providers. It had me thinking that maybe I should hack on a driver for a Local Openstack Deployment. So I did, and this is my DockerHackDayHack.

*Note, the code is raw, very raw, I haven’t coded in Go until this Hackday 🙂 Which is what I guess it is good for.

*Note this code was developed using Devstack with Flat Network orignaly, so there is some rough edged code for supporting out of the box devstack with nova network but it probably won’t work 🙂 I’ll make an update on this soon.

*Note the working example was testing on Openstack Icehouse with Neutron Networking. Neutron has one public and one private network. The public network is where the floating ip comes from for the docker daemon.

Here are the options now for host-management:

./bundles/1.3.0-dev/binary/docker-1.3.0-dev hosts create

Notice the areas with “–openstack-” prefix, this is what was added. If your using neutron network then the network for floating ips is needed. The image can be a Ubuntu or Debian based cloud image, but must support Cloud-Init / Metadata Service. This is how the docker installation is injected.Below is an example of how to kickoff a new Docker OpenStack Daemon: (beware the command is quite long with openstack options, replace X.X.X.X with your keystone endpoint, as well as UUIDs of any openstack resources.) It also includes –openstack-nameserver, this is not required but in my case I was, and will inject a nameserver line into the resolve.conf of the image using Cloud-Init / Metadata Service

In the future I plan on making this so we don’t need as many UUIDs. but rather the driver will take text as input and search for the relevant UUIDs to use. ( limited time to hack on this )

You can make either the local unix socket or the openstack node the active Daemon and you can use it like any other docker client. This “hosts” command can run locally on your laptop but your containers and daemon run in OpenStack. One could see this feature replacing something like Boot2Docker.

vagrantup.com is home of a powerful and neat new tool built on top of Oracle’s Virtualbox.

If you a developer and you haven’t heard of Vagrant then it is time for you to get familiar with this tool. Vagrant appeals to the developer because of it’s easily to deploy VM’s that are configurable based on your individual, team, group or companies needs. Running through their tutorial on how to get started with vagrant is a good way to see the basic gist of what vagrant is. After you run through this tutorial, if your a web developer you will immediately see its use cases.

Because vagrant is built on top of Oracle’s Virtualbox it follows the “standing on the shoulders of giants” cliché, but this doesn’t hurt Vagrant at all since Virtualbox isn’t going anywhere and it well known virtualization software in the development realm. Vagrant appeals to the developer and to the enterprise development teams because of its power to centralize and control development environments.