Skip to content

Commit

Permalink
Switch to rhel-coreos-9
Browse files Browse the repository at this point in the history
ref: https://issues.redhat.com/browse/COS-1983

We introduced a new `rhel-coreos-9` to aid having a switch be
an atomic operation.
  • Loading branch information
cgwalters committed Mar 8, 2023
1 parent 14d30fe commit 3d7f3c1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ COPY install /manifests

RUN if [[ "${TAGS}" == "fcos" ]] || [[ "${TAGS}" == "scos" ]]; then \
# comment out non-base/extensions image-references entirely for fcos/scos
sed -i '/- name: rhel-coreos-8-/,+3 s/^/#/' /manifests/image-references && \
sed -i '/- name: rhel-coreos-[89]-/,+3 s/^/#/' /manifests/image-references && \
# also remove extensions from the osimageurl configmap (if we don't, oc won't rewrite it, and the placeholder value will survive and get used)
sed -i '/baseOSExtensionsContainerImage:/ s/^/#/' /manifests/0000_80_machine-config-operator_05_osimageurl.yaml; fi && \
# rewrite image names for fcos/scos
if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-8/fedora-coreos/g' /manifests/*; \
elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-8/centos-stream-coreos-9/g' /manifests/*; fi && \
if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-9/fedora-coreos/g' /manifests/*; \
elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-9/centos-stream-coreos-9/g' /manifests/*; fi && \
if ! rpm -q util-linux; then yum install -y util-linux && yum clean all && rm -rf /var/cache/yum/*; fi
COPY templates /etc/mcc/templates
ENTRYPOINT ["/usr/bin/machine-config-operator"]
Expand Down
6 changes: 3 additions & 3 deletions cmd/machine-config-operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func init() {
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.haproxyImage, "haproxy-image", "", "Image for haproxy.")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baremetalRuntimeCfgImage, "baremetal-runtimecfg-image", "", "Image for baremetal-runtimecfg.")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.oauthProxyImage, "oauth-proxy-image", "", "Image for origin oauth proxy.")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSContainerImage, "baseos-image", "", "Image for rhel-coreos-8")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSExtensionsContainerImage, "baseos-extensions-image", "", "Image for rhel-coreos-8-extensions")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSContainerImage, "baseos-image", "", "ostree-bootable container image reference")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSExtensionsContainerImage, "baseos-extensions-image", "", "Image with extensions")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.imageReferences, "image-references", "", "File containing imagestreams (from cluster-version-operator)")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.cloudProviderCAFile, "cloud-provider-ca-file", "", "path to cloud provider CA certificate")

Expand Down Expand Up @@ -114,7 +114,7 @@ func runBootstrapCmd(cmd *cobra.Command, args []string) {
// To help debugging, immediately log version
glog.Infof("Version: %+v (%s)", version.Raw, version.Hash)

baseOSContainerImageTag := "rhel-coreos-8"
baseOSContainerImageTag := "rhel-coreos-9"
if version.IsFCOS() {
baseOSContainerImageTag = "fedora-coreos"
} else if version.IsSCOS() {
Expand Down
8 changes: 4 additions & 4 deletions docs/UsingLayering.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Layering lets you "layer" additional content on top of a Base OS Image using "co

As of 4.12:

- The MCO uses the `rhel-coreos-8` [native format](https://coreos.github.io/rpm-ostree/container/) base OS image by default instead of `machine-os-content`
- You can "layer" user content on top of that `rhel-coreos-8` image using a container build, and that content will be applied during a rebase
- The MCO uses the `rhel-coreos-8` [native format](https://coreos.github.io/rpm-ostree/container/) base OS image by default instead of `machine-os-content` (and in 4.13+, the image is `rhel-coreos-9`)
- You can "layer" user content on top of that `rhel-coreos-9` image using a container build, and that content will be applied during a rebase
- The MCO will allow `OSImageURL` to be overridden *on a per-pool basis* with such an layered image

While layering is powerful, it's also an "advanced" use of the MCO, and it comes with some trade-offs.
Expand All @@ -36,13 +36,13 @@ Nothing will stop you at this point from using a completely arbitrary image, but
#### On an existing cluster

```bash
oc adm release info --image-for rhel-coreos-8
oc adm release info --image-for rhel-coreos-9
```

#### Or before you build your cluster

```bash
oc adm release info --image-for rhel-coreos-8 quay.io/openshift-release-dev/ocp-release:your_release_here
oc adm release info --image-for rhel-coreos-9 quay.io/openshift-release-dev/ocp-release:your_release_here
```

### 2. "Layer" Some Content On Top Of It
Expand Down
4 changes: 2 additions & 2 deletions install/0000_80_machine-config-operator_05_osimageurl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ data:
releaseVersion: 0.0.1-snapshot
# This (will eventually) replace the below when https://github.com/openshift/enhancements/pull/1032
# progresses towards the default.
baseOSContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8"
baseOSExtensionsContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8-extensions"
baseOSContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9"
baseOSExtensionsContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9-extensions"
# The OS payload used for 4.10 and below; more information in
# https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md
# (The original issue was https://github.com/openshift/machine-config-operator/issues/183 )
Expand Down
8 changes: 4 additions & 4 deletions install/image-references
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ spec:
from:
kind: DockerImage
name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:machine-os-content
- name: rhel-coreos-8
- name: rhel-coreos-9
from:
kind: DockerImage
name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8
- name: rhel-coreos-8-extensions
name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9
- name: rhel-coreos-9-extensions
from:
kind: DockerImage
name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8-extensions
name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9-extensions
- name: keepalived-ipfailover
from:
kind: DockerImage
Expand Down

0 comments on commit 3d7f3c1

Please sign in to comment.