Skip to content

Latest commit

 

History

History
86 lines (67 loc) · 2.55 KB

development-scos.md

File metadata and controls

86 lines (67 loc) · 2.55 KB

Building and developing CentOS Stream CoreOS

Background

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.

Build process

  • 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 to rhcos9.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
    

Building SCOS images for other platforms than QEMU

  • You can build images for platforms that are supported in COSA using the buildextend commands:
    $ cosa buildextend-aws
    $ cosa buildextend-openstack
    

Running SCOS locally for testing

  • You may then run an ephemeral virtual machine using QEMU with:
    $ cosa run
    

Testing SCOS with kola

  • 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
    

Overriding packages for testing

  • If you need to override a file or a package for local testing, you can place those into the override/rootfs or override/rpm directory before building the image. See the Using overrides section from the COSA documentation.