StarlingX build tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Don Penney 1d175ac9c9 Add python3 RPMs to compile layer 1 week ago
app-gen-tool Add user application generation tool 1 year ago
centos-mirror-tools Add python3 RPMs to compile layer 1 week ago
cve_support cve_policy_filter: Upstream changed status keys 6 months ago
deployment Merge "Python-based installer for StarlingX" 1 year ago
doc Switch to newer openstackdocstheme and reno versions 7 months ago
release rename cgcs-centos-repo to centos-repo 4 months ago
releasenotes Switch to newer openstackdocstheme and reno versions 7 months ago
toCOPY tidy stx/downloads directory 1 month ago
.dockerignore Add .dockerignore 2 years ago
.gitignore Add layer awareness to 4 weeks ago
.gitreview OpenDev Migration Patch 1 year ago
.zuul.yaml Adding job to upload commits to GitHub 11 months ago rename cgcs-centos-repo to centos-repo 4 months ago
Dockerfile Update CentOS vault URL to HTTPS 1 month ago
README.rst rename cgcs-centos-repo to centos-repo 4 months ago
buildrc Restore buildrc 3 months ago container stuck in - Removal In Progress 1 month ago
test-requirements.txt Add bashate job nonvotingwq 2 years ago
tox.ini Rename cgcs_overlay to mock_overlay 1 year ago



StarlingX Build Tools

The StarlingX build process is tightly tied to CentOS in a number of ways, doing the build inside a Docker container makes this much easier on other flavors of Linux. Basically, the StarlingX ISO image creation flow involves the following general steps.

  1. Build the StarlingX docker image.
  2. Package mirror creation.
  3. Build packages/ISO creation.

Build the Starlingx docker image

StarlingX docker image handles all steps related to StarlingX ISO creation. This section describes how to customize the docker image building process.

Container build image customization

You can start by customizing values for the StarlingX docker image build process. There are a pair of useful files that help to do this.

  • buildrc
  • localrc

The buildrc file is a shell script that is used to set the default configuration values. It is contained in the tbuilder repo and should not need to be modified by users as it reads a localrc file that will not be overwritten by tbuilder updates. This is where users should alter the default settings. This is a sample of a localrc file:

This project contains a Makefile that can be used to automate the build lifecycle of a container. The Makefile will read the contents of the buildrc file.

StarlingX Builder container image are tied to your UID so image names should include your username.

Build image

Once the configuration files have been customized, it is possible to build the docker image. This process is automated by the script.


  • Do NOT change the UID to be different from the one you have on your host or things will go poorly. i.e. do not change --build-arg MYUID=$(id -u)
  • The Dockerfile needs MYUID and MYUNAME defined, the rest of the configuration is copied in via buildrc/localrc.

Package mirror creation

Once the StarlingX docker image has been built, you must create a mirror before creating the ISO image. Basically, a mirror is a directory that contains a series of packages. The packages are organized to be consumed by the ISO creation scripts.

The HOST_MIRROR_DIR variable provides the path to the mirror. The buildrc file sets the value of this variable unless the localrc file has modified it.

The mirror creation involves a set of scripts and configuration files required to download a group of RPMs, SRPMs, source code packages and so forth. These tools live inside centos-mirror-tools directory.

All items included in this directory must be visble inside the container environment. Then the container shall be run from the same directory where these tools are stored. Basically, we run a container with the previously created StarlingX docker image, using the following configuration:

As /localdisk is defined as the workdir of the container, the same folder name should be used to define the volume. The container will start to run and populate logs and output folders in this directory.

Download packages

Inside the Docker container, enter the following commands to download the required packages to populate the CentOS mirror repository:

Monitor the download of packages until it is complete. When the download is complete, the following message appears:

Verify packages

Verify no missing or failed packages exist:

In case missing or failed packages do exist, which is usually caused by network instability (or timeout), you need to download the packages manually. Doing so assures you get all RPMs listed in rpms_3rdparties.lst/rpms_centos.lst/rpms_centos3rdparties.lst.

Copy the files to the mirror

After all downloads are complete, copy the downloaded files to mirror.

In this case, <your_mirror_folder> can be whatever folder you want to use as mirror.

Tweaks in the StarlingX build system.

NOTE: You do not need to do the following step if you've synced the latest codebase.

Go into the StarlingX build system (i.e. another container that hosts the build system) and perform the following steps:

Build packages/ISO creation

StarlingX ISO image creation required some customized packages. In this step, a set of patches and customizations are applied to the source code to create the RPM packages. We have an script called that helps with the process.

The script is used to manage the run/stop lifecycle of working containers. Copy it to somewhere on your PATH, say $HOME/bin if you have one, or maybe /usr/local/bin.

The basic workflow is to create a working directory for a particular build, say a specific branch or whatever. Copy the buildrc file from the tbuilder repo to your work directory and create a localrc if you need one. The current working directory is assumed to be this work directory for all commands. You switch projects by switching directories.

By default LOCALDISK will be placed under the directory pointed to by HOST_PREFIX, which defaults to $HOME/starlingx.

The script uses sub-commands to select the operation: * run - Runs the container in a shell. It will also create LOCALDISK if it does not exist. * stop - Kills the running shell. * exec - Starts a shell inside the container.

You should name your running container with your username. tbuilder does this automatically using the USER environment variable. run will create LOCALDISK if it does not already exist before starting the container.

Set the mirror directory to the shared mirror pointed to by HOST_MIRROR_DIR. The mirror is LARGE, if you are on a shared machine use the shared mirror. For example you could set the default value for HOST_MIRROR_DIR to $HOME/starlingx/mirror and share it.

Running the Container

Start the builder container:

or by hand:

Running a Shell Inside the Container

Since running the container does not return to a shell prompt the exec into the container must be done from a different shell:

or by hand:


  • The above will reusult in a running container in systemd mode. It will have NO login.
  • I tend to use tmux to keep a group of shells related to the build container
  • --user=${USER} is the default username, set MYUNAME in buildrc to change it.

Stop the Container

or by hand:

What to do to build from WITHIN the container

To make git cloning less painful

To start a fresh source tree


Initialize the source tree.

To generate centos-repo

The centos-repo is a set of symbolic links to the packages in the mirror and the mock configuration file. It is needed to create these links if this is the first build or the mirror has been updated.

Where the argument to the script is the path of the mirror.

To build all packages:

To generate local-repo:

The local-repo has the dependency information that sequences the build order; To generate or update the information the following command needs to be executed after building modified or new packages.

To make an iso:

First time build

The entire project builds as a bootable image which means that the resulting ISO needs the boot files (initrd, vmlinuz, etc) that are also built by this build system. The symptom of this issue is that even if the build is successful, the ISO will be unable to boot.

For more specific instructions on how to solve this issue, please the README on installer folder in metal repository.