Building FDI on koji


with big help from @ekohl I am close in getting 3.5 FDI out of doors via Jenkins/Vagrant/OpenStack build script, but I would like to discuss option to build FDI on koji as we have recently upgraded to the latest version. Building FDI on OpenStack is not ideal, we need to spawn new VM, it sometimes does not shutdown properly (thus idling forever) and we need to do it manually and we are paying for koji anyway and building FDI is pretty fast on modern hardware (which our koji definitely is).

@pcreech recently installed the missing dependency, koji accepts a job but it fails to install livecd-build yum group.

DEBUG  ['/usr/bin/yum', '--installroot', '/var/lib/mock/foreman-nightly-rhel7-build-38582-11491/root/', 'groupinstall', 'livecd-build']
DEBUG  child environment: None
DEBUG  Executing command: ['/usr/bin/yum', '--installroot', '/var/lib/mock/foreman-nightly-rhel7-build-38582-11491/root/', 'groupinstall', 'livecd-build', '--setopt=tsflags=nocontexts'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C.UTF-8', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PS1': '<mock-chroot> \\s-\\v\\$ '} and shell False
DEBUG  BUILDSTDERR: Failed to set locale, defaulting to C
DEBUG  BUILDSTDERR: There is no installed groups file.
DEBUG  BUILDSTDERR: Maybe run: yum groups mark convert (see man yum)
DEBUG  BUILDSTDERR: Warning: group livecd-build does not exist.
DEBUG  BUILDSTDERR: Maybe run: yum groups mark install (see man yum)
DEBUG  BUILDSTDERR: Error: No packages in any requested group available to install or update

It looks like we need to go over all steps and add this missing group:

In order to add livecd-tools into the group, we need to add CentOS 7 Extras as an external repository. Also we need to pick target which can be used for building - either we can use existing foreman-nightly-rhel7 or create some “inherited” one like foreman-image-nightly-rhel7.

Now, the ultimate goal would be to run the following and have ISO image built (foreman-discovery-image git checkout directory):

./build-livecd fdi-centos7.ks 1 1 # creates fdi-image.ks file
koji spin-livecd --scratch --background --repo=file:///mnt/koji/external-repos/rhel7-x86_64/7.0/ --repo= foreman-discovery-image 3.5.0 foreman-nightly-rhel7 x86_64 fdi-image.ks

I was not sure what to use for the second --repo option, I know that repos are available locally on the koji itself (e.g. /mnt/koji/releases/whole/) but I don’t know which one of these is the final version.

This is pretty much a task for @packaging team, it’s not high priority but getting this working would be huge help in FDI build process.

Adding extras would be simple enough, and those steps seem straight forward enough from pagure. Does the target need to just be a tag or to use a build target directly?

If this needs to just point at a base RHEL or CentOS repository, we can make a change to expose external-repos on Apache similar to how the normal Koji generated repositories are exposed.

This seems like something we can configure and try. @pcreech Any thoughts or concerns?

I am afraid I don’t understand the question :slight_smile: I’d assume this depends on how we are gonna do ISO “compose”, since it’s just one file I think we can create some sort of a script which will copy the artifact somewhere else ( So a tag sounds easier, assuming that it’s something lightweight like in git.

Probably but I think file:///mnt/koji/external-repos should work too? If not, that’s the only option probably.

The document describing livecd setup is short, there are just several steps to do. I think it is feasible. Thank you.