Packer is one of the tools I’ve used in the past to build VirtualBox boxes. You can find what I’ve done on my GitHub account. For Smash project, I wanted to make a packer configuration to manage Docker and VirtualBox. I also wanted to call Ansible to build specific images for each needs. The goal is to be able to build cloud image ready to start, without any special dependencies. This because I need different usages:
In the last post, I talked about how to manage Docker and VirtualBox with Vagrant. This post follows the last one, with the integration of Ansible as a provisioner. Once again, I’m using it for the Smash project. With Ansible, I made several “group_vars” files containing custom and common information related to the used environment (dev, uat, staging…). This helps to setup different kind of environment easily. Vagrant will help to build images with Ansible deployed inside.
As you may know, I’m using Vagrant for more than a year now with VirtualBox. Docker is a faster alternative that needs to be taken into consideration. Having the possibility to manage both of them with the same tool can be very interesting. For information, I mainly use it with VirtualBox because it’s any platform compatible and Docker because it’s perfect for a CI like Jenkins. I recently talked about my implication into the Smash project.