Docker as a Service in vCAC Part 1

Once again I am here to prove that vCAC can integrate with anything. The new kid in town this week ; – ) is Docker Containers. In this example I am using CentOS Linux 6.5 with the vCAC guest agents installed to host Docker. This same example will work with RHEL 6.5 or newer versions of either OS.


First off you will need to have a blueprint setup in vCAC that is mapped to a Linux template in vCenter that already has the the vCAC Linux Guest Agent for vCAC. For testing I also recommend to set this up as a linked clone. (Way faster!)

NOTE: Docker requires CentOS 6.6 or higher to work properly.
vCAC Linux Guest agent guide here
How to configure linked clone provisioning here

If you have not already done so you will need to setup the repo mount script so we can call shell scripts from an NFS server. This makes it very easy to modify this integration for other use cases without having to update the template.

Step 1: In your putty session create a new directory /repo


Create a shell script named with the following and save it to the / directory ( you are creating a command to mount an NFS share that will take two variables as inputs.)

mount -t nfs $1:$2 /repo &>/repomount.log

Now make the file executable then shutdown your template VM.


Once shutdown, create a snapshot.

NOTE: if you are planning to use linked clone in vCAC or if this was mapped to a blueprint in vCAC already you will need to run inventory and update the blueprint.

Now we are going to create the install script on the NFS server that we will mount an NFS share from and execute a docker install script. In an exported NFS directory create a file by typing vi


Now enter the following lines (Copy and paste text below)

yum -y install epel-release
yum -y install docker-io
service docker start
chkconfig docker on

Press the ESC key, then Hold down Shift and press ZZ on the keyboard to save the file.

Now make the file executable

chmod 777

Now we need to create a build profile for the blueprint to install and configure docker with the script we created on the NFS share. Login to vCAC as an Administrator and create the following new build profile. Copy and paste below.

repo.path /scripts
VirtualMachine.Admin.UseGuestAgent true
VirtualMachine.Customize.WaitComplete true
VirtualMachine.Software0.ScriptPath / {repo.server} {repo.path}
VirtualMachine.Software1.ScriptPath /repo/
VMware.VirtualCenter.OperatingSystem rhel6_64Guest

Now add this to the CentOS blueprint we configured earlier


Fire off a new request


Like my sexy icons? You can get them here in the newly updated Icon Pack.

Open your new Docker Node from the Items Tab and connect to an SSH session and login. See my guide to setup SSH in Firefox.


Type Docker at the command line and let the magic begin!!!


In Part 2 we will take this a step further and allow the requester to specify the docker image they want to deploy for even further automation.

Remember sharing is caring!

4 Replies to “Docker as a Service in vCAC Part 1”

  1. Pingback: Technology Short Take #43 - - The weblog of an IT pro specializing in virtualization, networking, cloud, servers, & Macs

  2. Hi,

    Great post!
    Hopefully you can spare some time soon to write down the how you managed to configure containers as a service.

    Keep up the good work.

    • Hi Lars,

      It is in the works. Had some ideas initially but as I learn more about docker I found a way to make it much more scalable. Stay tuned!

  3. Pingback: Docker as a Service in vRA/vCAC part 2 – InstallPullandRun |

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.