CentOS Stream CoreOS (SCOS) is a derivative of both CentOS Stream and Fedora CoreOS (FCOS). The tool to build both SCOS and FCOS is coreos-assembler. The process detailled here is thus very similar to the one described in Building Fedora CoreOS.
-
Make sure you're meeting the prerequisites.
-
Setup a
cosa
alias, following the upstream documentation. -
Always make sure that you have the latest version of the COSA container:
$ podman pull quay.io/coreos-assembler/coreos-assembler
-
Create and use a dedicated directory:
$ mkdir scos $ cd scos
-
Clone the config repo (
openshift/os
):$ cosa init --variant scos https://github.com/openshift/os.git
-
Temporary workaround until we have full repos for SCOS: Add the internal
rhel-9-server-ose
repo definition from RHCOS torhcos9.repo
:[rhel-9-server-ose] enabled=1 gpgcheck=0 baseurl=http://...
-
Fetch packages and build SCOS ostree container and QEMU image:
$ cosa fetch $ cosa build
- You can build images for platforms that are supported in COSA using the
buildextend
commands:$ cosa buildextend-aws $ cosa buildextend-openstack
- You may then run an ephemeral virtual machine using QEMU with:
$ cosa run
- You may then run tests on the image built with
kola
:# Run basic QEMU scenarios $ cosa kola run basic* # Run all kola tests (internal & external) $ cosa kola run --parallel 2
- If you need to override a file or a package for local testing, you can place
those into the
override/rootfs
oroverride/rpm
directory before building the image. See the Using overrides section from the COSA documentation.