Hi all, 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[1]. In addition to that we have been using Ansible[2] to provision the Linux based VMs and some Powershell[3] 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[4] 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 [5] - 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[6] to this[7], 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 [8] 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 [9] that also uses this plugin. 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 [email protected], or for a fast response we can talk at IRC as well. 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. [1] https://github.com/GPII/windows/blob/master/Vagrantfile [2] https://github.com/GPII/linux/tree/master/provisioning [3] https://github.com/GPII/windows/tree/master/provisioning [4] https://github.com/amatas/vagrant-gpii-ci/ [5] https://github.com/amatas/vagrant-gpii-ci/blob/master/vagrant.yml.template [6] https://github.com/GPII/linux/blob/master/Vagrantfile [7] https://gitlab.com/GPII-test/linux/blob/gitlab-ci/.vagrant.yml [8] https://gitlab.com/GPII-test [9] https://github.com/avtar/qi-development-environments/tree/GPII-1865 -- Alfredo _______________________________________________ Architecture mailing list [email protected] http://lists.gpii.net/mailman/listinfo/architecture
