Currently the Foreman ecosystem is not using the Koji builders in the Fedora system but a custom build internally. I would like to add s390x build capacity to the Foreman ecosystem to enable binaries to be released for IBM Z and the s390x ecosystem.
I’ve been researching Koji and it looks like there is a few components which are standard to most CICD systems.
On the server (koji-hub/koji-web)
On the builder (koji-builder)
setarch (for some archs you’ll require a patched version)
So on the builder we need the building tools
createrepo which are standard and should be able to be installed on top of Fedora 30. Then we are going to need to connect it to the Koji Hub found in Katello Hosts | koji. If SSL is enabled then we are going to need to securely move them to our builders in order to have the build component to be able to talk to the Hub/WebUI.
Builder Configuration Required
Information regarding the SSL configuration required Server How To — Koji 1.17.0 documentation
- Mount Koji Build Directory to Builder via Read-Only NFS
- Securely transfer SSL certs to builder (if required)
/etc/kojid/kojid.confper Server How To — Koji 1.17.0 documentation
Hub/WebUI Configuration Required
The first thing it looks like we need to do is intialize the Koji Hub to add a new host pointing to the s390x builder
kojiadmin@localhost$ koji add-host kojibuilder1.example.com i386 x86_64
On the builder end we need to do some interesting things. In essence we are just polling the server for new builds but in order for the builder to know what the state of the “master” is it has to have read access to the root koji build directory. This will most likely require an update to the NFS exports list.
The root of the koji build directory (i.e., /mnt/koji) must be mounted on the builder. A Read-Only NFS mount is the easiest way to handle this.
The directory root where work data can be found from the koji hub
Once both of these components are configured we can add the host to the build channel.
kojiadmin@localhost$ koji add-host-to-channel kojibuilder1.example.com createrepo