7.5.3. Building SIMP From Source
18.104.22.168. Getting Started
All of the following items assume that you are running as
build_user in the
Download the CentOS/RedHat installation media:
release_mappings.yamlto determine the distribution ISO compatible with the version of SIMP you want to build.
release_mappings.yamlis maintained the simp/simp-core repository in the
The build process is handled by simp/rubygem-simp-rake-helpers. If you discover issues, that is where you will want to look for answers.
22.214.171.124. Generating The ISO
126.96.36.199.1. Repository Setup
git clone https://github.com/simp/simp-core cd simp-core
Check out your desired branch of SIMP:
To check out a stable SIMP release, check out a tag (Recommended):
git checkout tags/6.6.0-1
To check out an unstable SIMP release, check out the latest
git checkout master
bundle to make sure that all of the build tools and dependencies are
installed and up to date:
ISO directory, and copy in the CentOS/RHEL installation media:
mkdir ISO cp </path/to/dvd*.iso> ISO
188.8.131.52.2. ISO Setup
Next, you need to prepare your local packages for inclusion in the final ISO. This example builds off of CentOS 8, but all distributions work the same way.
Change to the target distribution directory:
You will see two directories
184.108.40.206.2.1. Boot and Kickstart Customization (Optional)
DVD directory holds information that is used to provide ISO boot
options in both UEFI and BIOS boot modes. It also contains a
ks directory that is used as the automated kickstart for
hands-off provisioning of the initial server.
220.127.116.11.2.2. Package Customization
yum_data directory is where you will modify the settings to include
your own packages in the ISO.
Change to the
You will now see a
reposync directory. Any YUM repository placed into
this directory will be copied onto the final ISO using the following rules:
reposyncdirectory has the exact same name as a directory already on the ISO
Remove the ISO directory and copy in the
reposyncdirectory as a subdirectory of
For example, if the original ISO has the following directory structure:
reposync directory contains the following repositories:
/BaseOS /appstream /puppet
The resulting ISO will contain the following:
/BaseOS (the reposync version) /AppStream (the ISO version) /SimpRepos/appstream (case matters) /SimpRepos/puppet
18.104.22.168.2.3. Add the Repositories from Pulp
You can now add the repositories that you mirrored in
Mirroring Packages to the
Check the kickstart files in the
DVD directory to see what
repositories will be used by default.
mv /tmp/_download_path/*/* reposync
At this point, the
reposync directory may contain both a
puppet6 directory. If you wish to use
puppet version 6 by
default, move the
puppet directory to
puppet7 and rename
mv reposync/puppet reposync/puppet7 mv reposync/puppet6 reposync/puppet
22.214.171.124.2.4. Modifying the Repositories (Optional)
At this point, you may perform the following actions:
Add your own additional repositories
Update repositories that do not have groups or modules present
Repos with groups will contain a
*-comps.xmlfile in the
Repos with modules will contain a
*-modules.yamlfile in the
126.96.36.199.2.5. Verify the Upstream Vendor Repositories
The SIMP component build process first attempts to use an upstream YUM
repository to pull down a matching build artifact. Failing that, a local copy is
built for packaging. This copy is authoritative and will override anything
repos/ directory under
yum_data/ holds a selection of
repositories that will be used for fetching upstream SIMP RPMs from the official
sources. These files should be regular YUM repository configuration files.
Once downloaded, non-SIMP files will be housed in a
packages.yaml file will be updated to reflect the download
source for auditing purposes. If you need to re-download the files, simply erase
188.8.131.52.3. Build the ISO
You are now ready to build the ISO!
To do so, run the following, substituting
6.6 with the expected build
cd </path/to>/simp-core bundle exec rake build:auto[$PWD/ISO,6.6]
Once the process completes, you should have a bootable SIMP ISO, in:
You can download it as follows (using CentOS 8 as an example):
podman cp simp_build_centos8:/home/build_user/simp-core/build/distributions/CentOS/8/x86_64/SIMP_ISO .
184.108.40.206.4. Other Build Directories of Note
The following directories exist at the same level as
SIMP_ISO/ and may
be of use:
The SIMP product RPMs and artifacts as a
tarfile. This is extracted into the ISO after all other modifications have occurred.
The ‘staging’ directory for the ISO. This is essentially the final ISO in ‘unpacked’ form and a useful place to look if you think something is missing or incorrect.
220.127.116.11. After You Build
You may have noticed that a development GPG key has been generated for the build.
This key is only valid for one week from generation and has been specifically generated for packages compiled specifically for your ISO build. If all of your packages were downloaded via Pulp, then there should be no packages on your ISO that need the development GPG key.
Doing this allows you to have a validly signed set of RPMs while reducing the risk that you will have invalid RPMs distributed around your infrastructure.
If you need to build and sign your RPMs with your own key, you can certainly
do so using the
rpm --resign command.
The new development key will be placed at the root of your ISO and will be
RPM-GPG-KEY-SIMP_dev. This key can be added to your clients, or
served via a web server, if you need to install from a centralized yum
Please see the Red Hat Guide to Configuring Yum and Yum Repositories for additional information.