Skip to content
Merged
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
1 change: 0 additions & 1 deletion common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ostree-layers:
- overlay/05rhcos
- overlay/06gcp-routes
- overlay/15rhcos-tuned-bits
- overlay/15rhcos-rhel8-workarounds # TODO conditionalize on rhel8
- overlay/20platform-chrony
- overlay/21dhcp-chrony

Expand Down
62 changes: 62 additions & 0 deletions extensions-c9s.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
62 changes: 62 additions & 0 deletions extensions-rhel-9.0.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:
- rhel-9-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:
- rhel-9-appstream
packages:
- kata-containers
1 change: 1 addition & 0 deletions image-c9s.yaml
1 change: 1 addition & 0 deletions image-rhel-8.6.yaml
1 change: 1 addition & 0 deletions image-rhel-9.0.yaml
142 changes: 142 additions & 0 deletions manifest-c9s.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
- openvswitch
# Temporarily include RHCOS 8 repo for cri-o, oc & hyperkube
- rhel-8-server-ose

# 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
- openvswitch2.16
1 change: 1 addition & 0 deletions rhel-8.6.yaml → manifest-rhel-8.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include:
ostree-layers:
# Temporary logrotate service and timer units
- overlay/15rhcos-logrotate
- overlay/15rhcos-rhel8-workarounds
- overlay/25rhcos-azure-udev

# See README.md
Expand Down
Loading