Base Images

Every week an image of each of the available operating systems is created and uploaded to VMCloud, with all the new updates. This is done by having a scheduled pipeline in GitLab CI that creates and uploads these images.

Here we can see the five stages that compose this pipeline:

graph LR subgraph except: tags a("Create Image") --> b("Upload Image") b --> e("Release Image") b --> c("Launch Instance") subgraph branch: master e end subgraph branch: development c c --> d("Destroy") d --- |manual|d end end

Create Image

In this stage the raw image file is generated using diskimage-builder.

It uses the iaas/base-images/diskimage-builder-elements repository where the individual elements are defined.

It also uses the iaas/docker/diskimage-builder Docker image which contains a wrapper script to generate the images in raw format, ready to be uploaded to all of the OpenStack regions.

Upload Image

In this stage the previously created image is uploaded to all of the Openstack regions using the OpenStack Python client.

It uses the iaas/docker/openstackclient Docker image which contains OpenStack client tools.

Launch Instance

This stage is only run on a branch separated from master, and it is used to test the created image.

It uses the iaas/docker/openstackclient Docker image which contains OpenStack client tools.

Destroy

This stage is only run on a branch separated from master, and it is used to destroy the previously created VM, keypair and corresponding image.

Release Image

This stage is only run on the master branch, and it is used to make the previously created image publicly available. It also tries to remove older images, if possible. All older images that could not be removed will be left unavailable to launch new VMs with it and/or create new volumes based on it.

Notes

More information on this process can be found in the archived iaas/base-images/generator repository.

This process should be reviewed in the future, in such a way that the image that was tested is exactly the one which is uploaded upstream. One way could be to perform automatic tests on the master branch, so all stages except for the Release stage will run on every branch.