[CentOS-devel] How CentOS 7 Vagrant images are built

Wed May 13 20:14:46 UTC 2020
Laurențiu Păncescu <lpancescu at centosproject.org>

Hello Nicolas,

On 5/13/20 10:01 AM, Nicolas Quiniou-Briand wrote:
> 1) Why images are not updated anymore to Vagrant Cloud ?

Part frustration, part technical problems (at least for 8). We have jobs 
on ci.centos.org that can build the images on CBS and then test them 
automatically. But then the images have to be copied on cloud.centos.org 
and the checksum file has to be updated and signed. I don't have the 
rights to do that, so I end up emailing people several times, over 
weeks, mostly without an answer. I built new images for 6 and 7 on 
ci.c.o. on April 30th, but they haven't been signed and copied yet and I 
still haven't received any reply. Once that happens, I can release them 
on Vagrant Cloud.

It's more difficult with centos/8. We have a working kickstart, but the 
CBS builders don't run CentOS 8 as far as I know, and we can't build 
them via ci.c.o. Additionally, Image Factory is no longer maintained, 
and even when it was, pykickstart deleted some statements from the 
kickstarts (valid statements it couldn't parse). I would like to move 
away from Image Factory and generate the images directly on ci.c.o, 
using a Duffy node running CentOS 8. That's still work in progress, but 
I think the best way forward would be to fully automate the image 
generation, testing, uploading to cloud.c.o., signing and publishing, 
and I'm trying to put something together to achieve that.

> 2) How do you build these images ?
>
> I only found https://git.centos.org/centos/kickstarts repository which 
> seems to contain all kickstarts files but I would like to read your 
> packer recipes.
We don't use Packer, but Image Factory, which performs an installation 
on libvirt-kvm and then uses qemu-img to convert the libvirt disk image 
to different formats and pack it together with other necessary files for 
each hypervisor. Using Packer wouldn't allow us to build images for 
HyperV or VMware, which are proprietary software.
> https://github.com/CentOS/sig-cloud-instance-build seems outdated and 
> I found https://github.com/lpancescu/sig-cloud-instance-build/ (a 
> fork) with vbox-packer and libvirt-packer branches but there seems to 
> be outdated too.

The two packer branches are what I use to generate images locally on my 
own machine, since installing Image Factory is... rather difficult. The 
official images are not generated in this way, but it doesn't matter, 
I'm mostly using it to debug my changes to the kickstarts. I updated the 
libvirt-packer branch in March to support building Vagrant images for 
CentOS 8.1 (I stopped updating the vbox-packer branch because I'm not 
using VirtualBox anymore since I switched from macOS to Fedora, so I 
can't test if my changes are really working).

Hope this helps,
Laurențiu