Skip to content

Commit 1fdfec0

Browse files
Merge pull request #5057 from ggiguash/imagemode-to-rhel96
USHIFT-5821: Switch packaging/imagemode container files to RHEL 9.6
2 parents 70dab4a + bec7f5f commit 1fdfec0

File tree

2 files changed

+70
-79
lines changed

2 files changed

+70
-79
lines changed

packaging/imagemode/Makefile

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# using NAME=value make arguments
44
#
55
PULL_SECRET ?= $(HOME)/.pull-secret.json
6-
BASE_IMAGE_URL ?= registry.redhat.io/rhel9-eus/rhel-9.4-bootc
7-
BASE_IMAGE_TAG ?= 9.4
6+
BASE_IMAGE_URL ?= registry.redhat.io/rhel9-eus/rhel-9.6-bootc
7+
BASE_IMAGE_TAG ?= 9.6
88
DNF_OPTIONS ?=
99

1010
#
@@ -137,54 +137,40 @@ clean:
137137
#
138138
# Predefined container image builds
139139
#
140-
.PHONY: 4.16-el94
141-
4.16-el94:
142-
@$(MAKE) rhocp USHIFT_VER=4.16
140+
.PHONY: 4.18-el94
141+
4.18-el94:
142+
@$(MAKE) rhocp USHIFT_VER=4.18 BASE_IMAGE_URL=registry.redhat.io/rhel9-eus/rhel-9.4-bootc BASE_IMAGE_TAG=9.4
143143

144-
.PHONY: 4.17-el94
145-
4.17-el94:
146-
@$(MAKE) rhocp USHIFT_VER=4.17
144+
.PHONY: 4.19-el96
145+
4.19-el96:
146+
@$(MAKE) rhocp USHIFT_VER=4.19
147147

148-
.PHONY: 4.18-ec-cos9
149-
4.18-ec-cos9:
148+
.PHONY: 4.18-rc-cos9
149+
4.18-rc-cos9:
150150
@$(MAKE) repourl \
151151
BASE_IMAGE_URL=quay.io/centos-bootc/centos-bootc \
152152
BASE_IMAGE_TAG=stream9 \
153153
DNF_OPTIONS="--allowerasing --nobest" \
154-
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp-dev-preview/latest-4.18/el9/os/ \
154+
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp/latest-4.18/el9/os/ \
155155
OCPDEP_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/dependencies/rpms/4.18-el9-beta/ \
156156

157-
.PHONY: 4.18-ec-el94
158-
4.18-ec-el94:
157+
.PHONY: 4.18-rc-el94
158+
4.18-rc-el94:
159159
@$(MAKE) repourl \
160-
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp-dev-preview/latest-4.18/el9/os/ \
160+
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp/latest-4.18/el9/os/ \
161161
OCPDEP_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/dependencies/rpms/4.18-el9-beta/
162162

163-
#
164-
# ISO builds are named 'microshift-<make_target>' (the '.iso' suffix is part of
165-
# the make target name) and stored at the ${BIB_OUTBASE} directory.
166-
# Each build uses 'localhost/microshift-<make-target>' container image as input.
167-
#
168-
# BIB_IMAGE_URL ?= registry.redhat.io/rhel9/bootc-image-builder
169-
# BIB_IMAGE_TAG ?= latest
170-
# BIB_OUTBASE ?= $(HOME)/imagemode
171-
# .PHONY: 4.16-el94.iso
172-
# 4.16-el94.iso: 4.16-el94
173-
# IMAGE_NAME="microshift-$$(echo $@ | sed 's/\.iso$$//')" ; \
174-
# ISO_FNAME="microshift-$@" ; \
175-
# BIB_OUTDIR="${BIB_OUTBASE}/$@" ; \
176-
# sudo podman pull \
177-
# --authfile "${PULL_SECRET}" \
178-
# "${BIB_IMAGE_URL}:${BIB_IMAGE_TAG}" && \
179-
# sudo mkdir -p "$${BIB_OUTDIR}" && \
180-
# sudo podman run \
181-
# --rm -i --privileged \
182-
# --pull=never \
183-
# --security-opt "label=type:unconfined_t" \
184-
# -v "$${BIB_OUTDIR}:/output" \
185-
# -v "/var/lib/containers/storage:/var/lib/containers/storage" \
186-
# "${BIB_IMAGE_URL}:${BIB_IMAGE_TAG}" \
187-
# --type anaconda-iso \
188-
# --local \
189-
# "localhost/$${IMAGE_NAME_URL}" && \
190-
# sudo mv -f "$${BIB_OUTDIR}/bootiso/install.iso" "${BIB_OUTBASE}/$${ISO_FNAME}"
163+
.PHONY: 4.19-rc-cos9
164+
4.19-rc-cos9:
165+
@$(MAKE) repourl \
166+
BASE_IMAGE_URL=quay.io/centos-bootc/centos-bootc \
167+
BASE_IMAGE_TAG=stream9 \
168+
DNF_OPTIONS="--allowerasing --nobest" \
169+
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp/latest-4.19/el9/os/ \
170+
OCPDEP_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/dependencies/rpms/4.19-el9-beta/ \
171+
172+
.PHONY: 4.19-rc-el96
173+
4.19-rc-el96:
174+
@$(MAKE) repourl \
175+
USHIFT_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/microshift/ocp/latest-4.19/el9/os/ \
176+
OCPDEP_URL=https://mirror.openshift.com/pub/openshift-v4/$$(uname -m)/dependencies/rpms/4.19-el9-beta/

packaging/imagemode/README.md

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ make [rhocp | repourl | repobase | <build_ver> | run | clean]
2323
clean: delete all 'localhost/microshift-*' container images
2424

2525
Available build versions:
26-
4.16-el94
27-
4.17-rc-el94
28-
4.18-ec-cos9
29-
4.18-ec-el94
26+
4.18-el94
27+
4.18-rc-cos9
28+
4.18-rc-el94
29+
4.19-el96
30+
4.19-rc-cos9
31+
4.19-rc-el96
3032
```
3133

3234
## Build Image Mode Containers
3335

34-
Log into the `RHEL 9.4 host` using the user credentials that have SUDO permissions
36+
Log into the `RHEL 9.6 host` using the user credentials that have SUDO permissions
3537
configured.
3638

3739
The `rhocp`, `repourl` and `repobase` targets can be used for building `bootc`
@@ -46,18 +48,18 @@ The target requires the `USHIFT_VER=value` argument, which defines the version
4648
of the `rhocp` repository to be used when building the image.
4749

4850
For example, run the following command to build an image including the latest
49-
released MicroShift 4.16 version.
51+
released MicroShift 4.19 version.
5052

5153
```bash
52-
make rhocp USHIFT_VER=4.16
54+
make rhocp USHIFT_VER=4.19
5355
```
5456

55-
The resulting image will be named `microshift-4.16.z` where `z` is the latest
57+
The resulting image will be named `microshift-4.19.z` where `z` is the latest
5658
available MicroShift package version in the repository.
5759

5860
```bash
59-
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-4.16
60-
localhost/microshift-4.16.8
61+
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-4.19
62+
localhost/microshift-4.19.0
6163
```
6264

6365
### Build from Custom URL Repository
@@ -71,21 +73,21 @@ which define the URL of repositories containing MicroShift RPM packages and
7173
OpenShift dependency RPM packages.
7274

7375
For example, run the following command to build an image including the MicroShift
74-
4.17 Release Candidate version from `mirror.openshift.com` site.
76+
4.19 Release Candidate version from `mirror.openshift.com` site.
7577

7678
```bash
7779
BASE_URL="https://mirror.openshift.com/pub/openshift-v4"
7880
make repourl \
79-
USHIFT_URL="${BASE_URL}/$(uname -m)/microshift/ocp/latest-4.17/el9/os/" \
80-
OCPDEP_URL="${BASE_URL}/$(uname -m)/dependencies/rpms/4.17-el9-beta/"
81+
USHIFT_URL="${BASE_URL}/$(uname -m)/microshift/ocp/latest-4.19/el9/os/" \
82+
OCPDEP_URL="${BASE_URL}/$(uname -m)/dependencies/rpms/4.19-el9-beta/"
8183
```
8284

83-
The resulting image will be named `microshift-4.17.z` where `z` is the latest
85+
The resulting image will be named `microshift-4.19.z` where `z` is the latest
8486
available MicroShift package version in the repository.
8587

8688
```bash
87-
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-4.17
88-
localhost/microshift-4.17.0-rc.0
89+
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-4.19
90+
localhost/microshift-4.19.0-rc.0
8991
```
9092

9193
### Build from Custom Base Image Repository
@@ -100,29 +102,29 @@ local MicroShift `bootc` container image (i.e. `microshift-${IMAGE_VER}`). All
100102
the required RPM repository configuration is assumed to be part of the base image.
101103

102104
For example, run the following command to build an image using the local MicroShift
103-
4.16 image with `rhocp` repositories built in the previous step.
105+
4.19 image with `rhocp` repositories built in the previous step.
104106

105107
> This example is superficial for the sake of simplicity. The typical use of the
106108
> `repobase` target would be to decouple the repository configuration and MicroShift
107109
> image build steps.
108110
109111
```bash
110-
BASE_IMAGE_URL="localhost/microshift-4.16.9"
112+
BASE_IMAGE_URL="localhost/microshift-4.19.0"
111113
BASE_IMAGE_TAG="latest"
112-
IMAGE_VER="4.16.9-update"
114+
IMAGE_VER="4.19.0-update"
113115

114116
make repobase \
115117
BASE_IMAGE_URL="${BASE_IMAGE_URL}" \
116118
BASE_IMAGE_TAG="${BASE_IMAGE_TAG}" \
117119
IMAGE_VER="${IMAGE_VER}"
118120
```
119121

120-
The resulting image will be named `microshift-4.16.9-update` as defined by the
122+
The resulting image will be named `microshift-4.19.0-update` as defined by the
121123
`IMAGE_VER` argument.
122124

123125
```bash
124126
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-"${IMAGE_VER}"
125-
localhost/microshift-4.16.9-update
127+
localhost/microshift-4.19.0-update
126128
```
127129

128130
### Predefined Build Targets
@@ -133,19 +135,22 @@ MicroShift versions and configurations.
133135
```bash
134136
$ make | grep -A10 'Available build versions'
135137
Available build versions:
136-
4.16-el94
137-
4.17-rc-el94
138-
4.18-ec-el94
138+
4.18-el94
139+
4.18-rc-cos9
140+
4.18-rc-el94
141+
4.19-el96
142+
4.19-rc-cos9
143+
4.19-rc-el96
139144
```
140145

141146
These builds use `rhocp` and `repourl` targets with hardcoded parameters to simplify
142147
`make` command invocation.
143148

144149
For example, run the following command to build an image including the MicroShift
145-
4.17 Release Candidate version from `mirror.openshift.com` site.
150+
4.19 Release Candidate version from `mirror.openshift.com` site.
146151

147152
```bash
148-
make 4.17-rc-el94
153+
make 4.19-rc-el96
149154
```
150155

151156
### Override Build Variables
@@ -156,15 +161,15 @@ default values used in `Containerfile` for `rhocp` and `repourl` targets.
156161
| Parameter Name | Default Value | Comment |
157162
|----------------|---------------|---------|
158163
| PULL_SECRET | `~/.pull-secret.json` | Used for accessing base `bootc` images |
159-
| BASE_IMAGE_URL | `registry.redhat.io/rhel9-eus/rhel-9.4-bootc` | Base `bootc` image URL |
160-
| BASE_IMAGE_TAG | `9.4` | Base `bootc` image tag |
164+
| BASE_IMAGE_URL | `registry.redhat.io/rhel9-eus/rhel-9.6-bootc` | Base `bootc` image URL |
165+
| BASE_IMAGE_TAG | `9.6` | Base `bootc` image tag |
161166
| DNF_OPTIONS | none | Additional options to be passed to the `dnf` command |
162167

163168
For example, run the following command to override the base `bootc` image default
164169
tag when building the container image.
165170

166171
```bash
167-
make rhocp USHIFT_VER=4.16 \
172+
make rhocp USHIFT_VER=4.19 \
168173
BASE_IMAGE_TAG=latest
169174
```
170175

@@ -181,7 +186,7 @@ make clean
181186
> The purpose of this section is to demonstrate how to test generated MicroShift
182187
> image mode containers.
183188
184-
Log into the `RHEL 9.4 host` using the user credentials that have SUDO permissions
189+
Log into the `RHEL 9.6 host` using the user credentials that have SUDO permissions
185190
configured.
186191

187192
The `run` target allows for running the specified `localhost/microshift-*` container
@@ -193,10 +198,10 @@ one of them.
193198

194199
```bash
195200
$ sudo podman images --format "{{.Repository}}" | grep ^localhost/microshift-
196-
localhost/microshift-4.17.0-rc.0
197-
localhost/microshift-4.16.8
201+
localhost/microshift-4.19.0-rc.0
202+
localhost/microshift-4.18.0
198203

199-
$ make run IMAGE_VER=4.16.8
204+
$ make run IMAGE_VER=4.18.0
200205
...
201206
...
202207
sudo podman exec -it 65339346b957c7b02353bf859b07d75a2127398266d6d3f3b2708b692745609f bash
@@ -213,7 +218,7 @@ For example, run the following command to stop all the running MicroShift contai
213218
$ make stop
214219
...
215220
...
216-
microshift-4.16.8
221+
microshift-4.18.0
217222
```
218223

219224
## Appendix B: Boot RHEL Using Image Mode Containers
@@ -339,7 +344,7 @@ Log into a Linux host (e.g. `Fedora`, `CentOS` or `RHEL`) using the user credent
339344
that have SUDO permissions configured.
340345

341346
For example, run the following command to build a CentOS Stream 9 image using the
342-
MicroShift 4.17 Release Candidate version from `mirror.openshift.com` site.
347+
MicroShift 4.19 Release Candidate version from `mirror.openshift.com` site.
343348

344349
```bash
345350
BASE_IMAGE_URL=quay.io/centos-bootc/centos-bootc
@@ -349,8 +354,8 @@ BASE_URL="https://mirror.openshift.com/pub/openshift-v4"
349354
make repourl \
350355
BASE_IMAGE_URL="${BASE_IMAGE_URL}" \
351356
BASE_IMAGE_TAG="${BASE_IMAGE_TAG}" \
352-
USHIFT_URL="${BASE_URL}/$(uname -m)/microshift/ocp/latest-4.17/el9/os/" \
353-
OCPDEP_URL="${BASE_URL}/$(uname -m)/dependencies/rpms/4.17-el9-beta/"
357+
USHIFT_URL="${BASE_URL}/$(uname -m)/microshift/ocp/latest-4.19/el9/os/" \
358+
OCPDEP_URL="${BASE_URL}/$(uname -m)/dependencies/rpms/4.19-el9-beta/"
354359
```
355360

356361
Note that RPM packages referenced by the `USHIFT_URL` and `OCPDEP_URL` may conflict

0 commit comments

Comments
 (0)