We identified the repetitive process of OS base updates and the installation of basic packages that we require on each test deployment, for example for convenience and debugging purposes.
We now use Packer to prepare VM templates based on a plain ISO image from the upstream CentOS project. Using Packer, we a) update the base OS and b) install basic software that we always require such as “vim”, “git”, and “bash-completion”.
In a Gitlab Pipeline, Packer starts a VM based on the ISO image and then automatically runs various Ansible roles. Once this is done, it is automatically pushed to our VMware server. The Gitlab pipeline is scheduled to automatically run once a week.
This process speeds up our test deployments.