[Architecture] Vagrant GPII CI plugin 0.0.6
alfredo at raisingthefloor.org
Thu Mar 9 11:04:57 UTC 2017
as some of you have heard the Ops team are working on providing a CI
system that makes easier for the developers to test and run their code
in several operating systems such Windows and Linux.
Until now our CI uses Virtualbox and the wrapper Vagrant to create the
testing environments, which are the "glue" between the tests of the
applications and the CI.
Vagrant uses the definition of the VM specified in a file called
Vagrantfile. In addition to that we have been using Ansible to
provision the Linux based VMs and some Powershell scripts in the
case of the Windows VMs. This required storing some additional files
in the repository of a project, and sometimes the purpose of them
wasn't clear enough.
Another downside of the actual approach is that it is difficult to
maintain the environment for only one VM, and it also makes it very
difficult to create and support environments with multiples VMs.
Keeping in mind the above we have developed a plugin for Vagrant
called Vagrant-GPII-CI that tries to simplify all the files,
definitions and commands needed for the testing.
The plugin covers the following features:
- Only use one YML file to define the environment 
- The Vagrantfile is no longer required
- Multi-VM support, all the VMs are connected among them
- Windows and Linux support within the same file
- Separate Vagrant command to execute the stages ( vagrant ci test
[--stage STAGE] [vm] )
- Tagging of stages in order to select the tasks that will be executed
in only some VMs
The use of the plugin can convert the CI configuration from this to
this, which we understand that the latest file is better to
understand what the CI is doing.
If someone wants to give it a try, we have published some complete CI
pipelines using this plugin for some projects  with the files
needed to use the new approach.
For most of the projects, the definition of the Gitlab-CI
(.gitlab-ci.yml) and the Vagrant-GPII-CI (.vagrant.yml) alone are
enough to run the tests with CI.
If you check out a project you will only need the .vagrant.yml at the
root of the repository, the plugin, and to exec the following commands
to run the tests:
- vagrant up
- vagrant ci test
- vagrant destroy
Also a good place to get information about how this plugin integrates
the test with the CI, and can be useful for the developers, is the
documentation made for P4A QI infrastructure  that also uses this
The plugin is in a very early development but the actual features are
pretty stable. Any feedback is appreciated. If you want to do so,
please reply this email or send a new email to
alfredo at raisingthefloor.org, or for a fast response we can talk at IRC
Finally, as we commented at the latest Arch meeting, we have planned a
meeting to talk about this plugin on Mar-20 at 10:00am (EST, GMT -5).
If anyone is interested on joining us, please let us know.
More information about the Architecture