Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifests: Add RHEL 9.0 based RHCOS and SCOS #773

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions c9s/c9s.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[baseos]
name=CentOS Stream 9 BaseOS
baseurl=http://mirror.stream.centos.org/9-stream/BaseOS/$basearch/os
# FIXME
gpgcheck=0
enabled=1

[appstream]
name=CentOS Stream 9 AppStream
baseurl=http://mirror.stream.centos.org/9-stream/AppStream/$basearch/os
# FIXME
gpgcheck=0
enabled=1

[nfv]
name=CentOS Stream 9 NFV
baseurl=http://mirror.stream.centos.org/9-stream/NFV/$basearch/os
# FIXME
gpgcheck=0
enabled=1

[rt]
name=CentOS Stream 9 RT
baseurl=http://mirror.stream.centos.org/9-stream/RT/$basearch/os
# FIXME
gpgcheck=0
enabled=1
10 changes: 10 additions & 0 deletions c9s/copr-walters-coreos-centos-stuff.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[walters-coreos-centos-stuff]
name=Copr repo for coreos-centos-stuff owned by walters
baseurl=https://download.copr.fedorainfracloud.org/results/walters/coreos-centos-stuff/fedora-34-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/walters/coreos-centos-stuff/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
62 changes: 62 additions & 0 deletions c9s/extensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# RPMs as operating system extensions, distinct from the base ostree commit/image
# https://github.com/openshift/enhancements/blob/master/enhancements/rhcos/extensions.md
# and https://github.com/coreos/fedora-coreos-tracker/issues/401

repos:
- nfv

extensions:
# https://github.com/coreos/fedora-coreos-tracker/issues/326
usbguard:
packages:
- usbguard
kerberos:
packages:
- krb5-workstation
- libkadm5
# https://github.com/kmods-via-containers/kmods-via-containers/issues/3
# https://gitlab.cee.redhat.com/coreos/redhat-coreos/merge_requests/866
# These are currently overlaid onto the host so that they can be bind-mounted
# into build containers... in the future they should be a `development`
# extension: https://github.com/openshift/machine-config-operator/pull/2143.
kernel-devel:
packages:
- kernel-devel
- kernel-headers
match-base-evr: kernel
# These are already in the base, so they're not OS extensions, but they're
# useful to have in RPM form to install in kmod build containers.
kernel:
kind: development
packages:
- kernel
- kernel-core
- kernel-modules
- kernel-modules-extra
match-base-evr: kernel
# GRPA-2822
# https://github.com/openshift/machine-config-operator/pull/1330
# https://github.com/openshift/enhancements/blob/master/enhancements/support-for-realtime-kernel.md
kernel-rt:
architectures:
- x86_64
packages:
- kernel-rt-core
- kernel-rt-kvm
- kernel-rt-modules
- kernel-rt-modules-extra
- kernel-rt-devel
# https://github.com/openshift/machine-config-operator/pull/2456
# https://github.com/openshift/enhancements/blob/master/enhancements/sandboxed-containers/sandboxed-containers-tech-preview.md
# GRPA-3123
# - kata-containers (RHAOS)
sandboxed-containers:
architectures:
- x86_64
modules:
enable:
- virt:rhel
repos:
- appstream
packages:
- kata-containers
1 change: 1 addition & 0 deletions c9s/fedora-coreos-config
1 change: 1 addition & 0 deletions c9s/image.yaml
1 change: 1 addition & 0 deletions c9s/live
142 changes: 142 additions & 0 deletions c9s/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Manifest for CentOS Stream CoreOS (SCOS)

rojig:
license: MIT
name: scos
summary: OKD 4

variables:
distro: "scos"
version: "9"

# Include manifests common to all RHEL and CentOS Stream versions
include:
- ../common.yaml

# Starting from here, everything should be specific to SCOS

# CentOS Stream 9 repos + internal repos for now
repos:
- baseos
- appstream
# Temporarily inlcude internal repos and coprs
- rhel-8-server-ose
- walters-coreos-centos-stuff

# We include hours/minutes to avoid version number reuse
automatic-version-prefix: "412.91.<date:%Y%m%d%H%M>"
# This ensures we're semver-compatible which OpenShift wants
automatic-version-suffix: "-"
# Keep this is sync with the version in postprocess
mutate-os-release: "4.12"

postprocess:
- |
#!/usr/bin/env bash
set -xeo pipefail

# Tweak /usr/lib/os-release
grep -v "OSTREE_VERSION" /etc/os-release > /usr/lib/os-release.stream
OCP_RELEASE="4.12"
(
. /etc/os-release
cat > /usr/lib/os-release <<EOF
NAME="${NAME} CoreOS"
ID="scos"
ID_LIKE="rhel fedora"
VERSION="${OSTREE_VERSION}"
VERSION_ID="${OCP_RELEASE}"
VARIANT="CoreOS"
VARIANT_ID=coreos
PLATFORM_ID="${PLATFORM_ID}"
PRETTY_NAME="${NAME} CoreOS ${OSTREE_VERSION}"
ANSI_COLOR="${ANSI_COLOR}"
CPE_NAME="${CPE_NAME}::coreos"
HOME_URL="${HOME_URL}"
DOCUMENTATION_URL="https://docs.okd.io/latest/welcome/index.html"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="OpenShift Container Platform"
REDHAT_BUGZILLA_PRODUCT_VERSION="${OCP_RELEASE}"
REDHAT_SUPPORT_PRODUCT="OpenShift Container Platform"
REDHAT_SUPPORT_PRODUCT_VERSION="${OCP_RELEASE}"
OPENSHIFT_VERSION="${OCP_RELEASE}"
OSTREE_VERSION="${OSTREE_VERSION}"
EOF
)
rm -f /etc/os-release
ln -s ../usr/lib/os-release /etc/os-release

# Tweak /etc/system-release, /etc/system-release-cpe & /etc/redhat-release
(
. /etc/os-release
cat > /usr/lib/system-release-cpe <<EOF
${CPE_NAME}
EOF
cat > /usr/lib/system-release <<EOF
${NAME} release ${VERSION_ID}
EOF
rm -f /etc/system-release-cpe /etc/system-release /etc/redhat-release
ln -s /usr/lib/system-release-cpe /etc/system-release-cpe
ln -s /usr/lib/system-release /etc/system-release
ln -s /usr/lib/system-release /etc/redhat-release
)

# Tweak /usr/lib/issue
cat > /usr/lib/issue <<EOF
\S \S{VERSION_ID}
EOF
rm -f /etc/issue /etc/issue.net
ln -s /usr/lib/issue /etc/issue
ln -s /usr/lib/issue /etc/issue.net

# Let's have a non-boring motd, just like CL (although theirs is more subdued
# nowadays compared to early versions with ASCII art). One thing we do here
# is add --- as a "separator"; the idea is that any "dynamic" information should
# be below that.
# See: https://projects.engineering.redhat.com/browse/COREOS-1029
. /etc/os-release
cat > /etc/motd <<EOF
CentOS Stream CoreOS $VERSION
Part of OKD ${OPENSHIFT_VERSION}, SCOS is a Kubernetes native operating system
managed by the Machine Config Operator (\`clusteroperator/machine-config\`).

WARNING: Direct SSH access to machines is not recommended; instead,
make configuration changes via \`machineconfig\` objects:
https://docs.openshift.com/container-platform/${OPENSHIFT_VERSION}/architecture/architecture-rhcos.html

---
EOF
# Collection of workarounds specific to SCOS
- |
#!/usr/bin/env bash
set -xeo pipefail

# FIXME: Force enable dbus-broker to get the dbus.service → dbus-broker.service
systemctl enable dbus-broker

# FIXME: Why is this only broken here? NM isn't removing the link?
sed -i '/etc.resolv/d' /usr/lib/tmpfiles.d/etc.conf

# crio should stop hardcoding things in their config file!
# We are apparently somehow pulling in a conmon override in RHCOS
# that contains /usr/libexec/crio/conmon - WHY?
# sed -i '/conmon.*=/d' /etc/crio/crio.conf
# Oh right but the MCO overrides that too so...
mkdir -p /usr/libexec/crio
ln -sr /usr/bin/conmon /usr/libexec/crio/conmon

# Use crun by default
sed -i '/\[crio.runtime\]/a default_runtime="crun"' /etc/crio/crio.conf
cat >> /etc/crio/crio.conf <<EOF
[crio.runtime.runtimes.crun]
runtime_path="/usr/bin/crun"
EOF

# Packages that are only in SCOS and not in RHCOS or that have special
# constraints that do not apply to RHCOS
packages:
# We include the generic release package and tweak the os-release info in a
# post-proces script
- centos-release
# RHCOS package name includes a version number
- openvswitch
1 change: 1 addition & 0 deletions c9s/overlay.d
24 changes: 0 additions & 24 deletions ci/Dockerfile

This file was deleted.

34 changes: 0 additions & 34 deletions ci/Dockerfile.cosa-build

This file was deleted.

10 changes: 0 additions & 10 deletions ci/Dockerfile.cosa-oci-archive

This file was deleted.

6 changes: 0 additions & 6 deletions ci/Dockerfile.layering-test

This file was deleted.

12 changes: 0 additions & 12 deletions ci/Dockerfile.machine-os-oci-content

This file was deleted.

2 changes: 0 additions & 2 deletions ci/build-test-qemu.sh

This file was deleted.

2 changes: 0 additions & 2 deletions ci/build-test.sh

This file was deleted.

2 changes: 0 additions & 2 deletions ci/prow-build-test-qemu.sh

This file was deleted.

2 changes: 0 additions & 2 deletions ci/prow-build.sh

This file was deleted.

Loading