Docker Engine on Windows and Linux through vRealize Automation
Docker is a topic that seems all the rage today, and people and organizations are scrambling to understand the technology in order to power their next-generation apps with methodologies such as continuous delivery and micro-services. In order to make standing up Docker easier for those with vRealize Automation, I’ve made a couple of software blueprints that can be dropped on top of your existing machine blueprints which allow you to provision Docker hosts on both Linux and Windows! Yes, that is Linux and Windows since Docker is now a functional technology on top of Windows Server 2016. You can get both of these blueprints for free from the VMware Sample Exchange, which, if you don’t know about it, is a great place where folks from the community post everything from vRA blueprints to PowerShell scripts and vRO packages.
Both of these blueprints do the following:
- Get the latest version of Docker from the respective online depots.
- Install a single engine instance.
- Open the remote API on port 2375 (insecure).
In order to use these, you’ll need a few things:
- vRealize Automation 7.0, 7.1, or 7.2. In the case of the Windows Docker Engine blueprint, you’ll need vRA 7.2 due to Windows Server 2016 support only there.
- Enterprise license.
- Existing Linux and Windows Server 2016 template VMs.
- vRA CloudClient to import the content into your vRA environment.
- Guest agent and software bootstrap agent installed on your templates.
Let’s go through the quick steps to get one of these blueprints installed and available. First, download and install the CloudClient on a Windows workstation. Bring up the CLI by starting cloudclient.bat. Login to your vRA environment by issuing a
vra login userpass --tenant <my_tenant> and input your vRA server FQDN when prompted. Make sure you’ve downloaded one of the ZIP files representing either the Linux or Windows software component, and after authentication do a
vra content import --path <path_to_zip> --resolution skip. If there are no errors, you should see something like the following:
If you get a success message, you should now be able to go into your Software Components blueprints and see the one you imported. From there, all that’s left is to drag-and-drop that component onto a new or existing machine blueprint.
For the Windows blueprint, make sure the guest agent is installed and running as Local System or the script will not work properly. Also, for the Windows blueprint, make sure to set a user/pass combination in the Properties section to enable the one-time auto logon capability.
Now, all that’s left is to entitle your item and request it, then sit back and watch as your new Docker host is built for you!
Check the progress of your request and see the various lifecycle stages progress.