Skip to content

Latest commit

 

History

History
145 lines (105 loc) · 5.15 KB

File metadata and controls

145 lines (105 loc) · 5.15 KB

Build MicroShift

Overview

The build process is containerized and it includes the following steps:

  1. Replace the MicroShift payload/images with the OKD released images
  2. Build the MicroShift RPMs from the MicroShift sources
  3. Build the microshift-okd Bootc container image

Prerequisites

Install the software necessary for running the build process:

sudo dnf install -y make podman

Create SRPM Package

Create the MicroShift SRPM package by running the make srpm command.

The following options can be specified in the make command line using the NAME=VAL format.

Name Required Default Comments
USHIFT_GITREF no main MicroShift repository branches
OKD_VERSION_TAG no latest OKD version tags
SRPM_WORKDIR no /tmp/... SRPM repository output directory

The main MicroShift repository branch and the latest OKD version tag are used by default if unspecified.

make srpm

If the build completes successfully, the microshift-okd-srpm container image is created and the MicroShift SRPM and version.txt file is copied to the SRPM_WORKDIR directory on the host.

...
...
SRPMs are available in '/tmp/microshift-srpms-1tzW3h'

Notes:

  • The MicroShift repository branch and the OKD version tag used to build the SRPM can be overridden by specifying USHIFT_GITREF and OKD_VERSION_TAG make command line arguments.
  • The path to the SRPM_WORKDIR directory (either temporary or specified in the make srpm command line) is displayed in the end of the build procedure.

Create RPM Packages

Create the MicroShift RPM packages by running the make rpm command.

The make rpm command builds MicroShift RPMs for CentOS Stream 9 operating system. RPMs are build from the SRPM built by running make srpm.

The following options can be specified in the make command line using the NAME=VAL format.

Name Required Default Comments
RPM_OUTDIR no /tmp/... RPM repository output directory
make rpm

If the build completes successfully, the microshift-okd-rpm container image is created and the MicroShift RPM repository is copied to the RPM_OUTDIR directory on the host. The packages from this repository can be used to install MicroShift on the supported operating systems.

...
...
Build completed successfully
RPMs are available in '/tmp/microshift-rpms-EI3IXg'

Notes:

  • The path to the RPM_OUTDIR directory (either temporary or specified in the make rpm command line) is displayed in the end of the build procedure.

Create DEB Packages

Create the MicroShift DEB packages by running the make rpm-to-deb command.

The following options can be specified in the make command line using the NAME=VAL format.

Name Required Default Comments
RPM_OUTDIR yes none RPM repository directory to convert

The make rpm-to-deb command converts MicroShift RPMs to Debian packages. The path to an existing RPM repository must be specified using the mandatory RPM_OUTDIR make command line.

RPM_OUTDIR=/tmp/microshift-rpms
make rpm-to-deb RPM_OUTDIR="${RPM_OUTDIR}"

If the conversion completes successfully, the Debian packages are copied to the ${RPM_OUTDIR}/deb directory on the host. The packages from this directory can be used to install MicroShift on the supported operating systems.

...
...
Conversion completed successfully"
Debian packages are available in '/tmp/microshift-rpms/deb'"

Create Bootc Image

Create the MicroShift Bootc image by running the make image command.

The following options can be specified in the make command line using the NAME=VAL format.

Name Required Default Comments
BOOTC_IMAGE_URL no quay.io/centos-bootc/centos-bootc Base Bootc image URL
BOOTC_IMAGE_TAG no stream9 Base Bootc image tag
WITH_KINDNET no 1 OVK-K CNI is used when Kindnet is disabled
WITH_TOPOLVM no 1 Enable TopoLVM CSI
WITH_OLM no 0 Enable OLM support
EMBED_CONTAINER_IMAGES no 0 Embed all component container dependencies in Bootc images

The make image command builds a MicroShift Bootc image based on CentOS Stream 9 operating system with the default options. The command uses artifacts from the microshift-okd-rpm container image created by make rpm.

make image

If the build completes successfully, the microshift-okd image is created.

The base operating system image used to run MicroShift can be overriden by specifying BOOTC_IMAGE_URL=value and BOOTC_IMAGE_TAG=value make command line arguments.