Skip to content

Commit c106e25

Browse files
committed
Optimize the BIB flow
1 parent 66a7ed7 commit c106e25

File tree

2 files changed

+34
-26
lines changed

2 files changed

+34
-26
lines changed

docs/contributor/image_mode.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ This document demonstrates how to run a `bootc` image using `podman`.
1111
> the fast turnaround times it allows. Do not use it for production use cases.
1212
1313
The procedures described below require the following setup:
14-
* A `RHEL 9.4 host` with an active Red Hat subscription for building MicroShift `bootc`
14+
* A `RHEL 9.6 host` with an active Red Hat subscription for building MicroShift `bootc`
1515
images and running containers
1616
* A `remote registry` (e.g. `quay.io`) for storing and accessing `bootc` images
1717

1818
## Run MicroShift Bootc Image
1919

20-
Log into the `RHEL 9.4 host` using the user credentials that have SUDO
20+
Log into the `RHEL 9.6 host` using the user credentials that have SUDO
2121
permissions configured.
2222

2323
### Configure CNI
@@ -178,7 +178,7 @@ the platform-specific `amd64` and `arm64` images to the remote registry as descr
178178
in the [Publish Image](#publish-image) section.
179179

180180
> Cross-platform `podman` builds are not in the scope of this document. Log into
181-
> the RHEL 9.4 host running on the appropriate architecture to perform the container
181+
> the RHEL 9.6 host running on the appropriate architecture to perform the container
182182
> image builds and publish the platform-specific image to the remote registry.
183183
184184
Finally, create a manifest containing the platform-specific image references

docs/user/image_mode.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ image in a remote registry and use it for installing a new RHEL operating system
1616
for more information.
1717

1818
The procedures described below require the following setup:
19-
* A `RHEL 9.4 host` with an active Red Hat subscription for building MicroShift `bootc`
20-
images. For development purposes, you can use the [Red Hat Developer subscription](https://developers.redhat.com/products/rhel/download), which is free of charge.
19+
* A `RHEL 9.6 host` with an active Red Hat subscription for building MicroShift `bootc`
20+
images. For development purposes, you can use the [Red Hat Developer subscription](https://developers.redhat.com/products/rhel/download),
21+
which is free of charge.
2122
* A `hypervisor host` with a virtualization technology that supports RHEL. In
2223
this documentation, [libvirt](https://libvirt.org/) virtualization is used as
2324
an example.
2425
* A `remote registry` (e.g. `quay.io`) for storing and accessing `bootc` images
2526

2627
## Build MicroShift Bootc Image
2728

28-
Log into the `RHEL 9.4 host` using the user credentials that have SUDO
29+
Log into the `RHEL 9.6 host` using the user credentials that have SUDO
2930
permissions configured.
3031

3132
### Build Image
@@ -74,7 +75,7 @@ sudo podman build --authfile "${PULL_SECRET}" -t "${IMAGE_NAME}" \
7475

7576
> **Important:**<br>
7677
> If `dnf upgrade` command is used in the container image build procedure, it
77-
> may cause unintended operating system version upgrade (e.g. from `9.4` to
78+
> may cause unintended operating system version upgrade (e.g. from `9.6` to
7879
> `9.6`). To prevent this from happening, use the following command instead.
7980
> ```
8081
> RUN . /etc/os-release && dnf upgrade -y --releasever="${VERSION_ID}"
@@ -215,7 +216,7 @@ sudo virt-install \
215216
--disk path=/var/lib/libvirt/images/${VMNAME}.qcow2,size=20 \
216217
--network network=${NETNAME},model=virtio \
217218
--events on_reboot=restart \
218-
--location /var/lib/libvirt/images/rhel-9.4-$(uname -m)-boot.iso \
219+
--location /var/lib/libvirt/images/rhel-9.6-$(uname -m)-boot.iso \
219220
--initrd-inject kickstart.ks \
220221
--extra-args "inst.ks=file://kickstart.ks" \
221222
--wait
@@ -237,23 +238,8 @@ containerized tool to create disk images from bootc images. You can use the tool
237238
to generate various image artifacts and deploy them in different environments,
238239
such as the edge, server, and clouds.
239240

240-
### Create ISO image using BIB
241-
242-
```bash
243-
PULL_SECRET=~/.pull-secret.json
244-
IMAGE_NAME=microshift-4.18-bootc
245-
246-
mkdir ./output
247-
sudo podman run --authfile ${PULL_SECRET} --rm -it \
248-
--privileged \
249-
--security-opt label=type:unconfined_t \
250-
-v /var/lib/containers/storage:/var/lib/containers/storage \
251-
-v ./output:/output \
252-
registry.redhat.io/rhel9/bootc-image-builder:latest \
253-
--local \
254-
--type iso \
255-
localhost/${IMAGE_NAME}:latest
256-
```
241+
Log into the `RHEL 9.6 host` using the user credentials that have SUDO
242+
permissions configured.
257243

258244
### Prepare Kickstart File
259245

@@ -268,7 +254,7 @@ PULL_SECRET=~/.pull-secret.json
268254

269255
Run the following command to create the `kickstart.ks` file to be used during
270256
the virtual machine installation. If you want to embed the kickstart file directly
271-
to iso using BIB please refer to [upstream docs](https://osbuild.org/docs/bootc/#anaconda-iso-installer-options-installer-mapping)
257+
to ISO using BIB refer to [upstream docs](https://osbuild.org/docs/bootc/#anaconda-iso-installer-options-installer-mapping).
272258

273259
```bash
274260
cat > kickstart.ks <<EOFKS
@@ -308,6 +294,28 @@ chmod 600 /etc/crio/openshift-pull-secret
308294
EOFKS
309295
```
310296

297+
### Create ISO image using BIB
298+
299+
```bash
300+
PULL_SECRET=~/.pull-secret.json
301+
IMAGE_NAME=microshift-4.18-bootc
302+
303+
mkdir ./output
304+
sudo podman run --authfile ${PULL_SECRET} --rm -it \
305+
--privileged \
306+
--security-opt label=type:unconfined_t \
307+
-v /var/lib/containers/storage:/var/lib/containers/storage \
308+
-v ./output:/output \
309+
registry.redhat.io/rhel9/bootc-image-builder:latest \
310+
--local \
311+
--type iso \
312+
localhost/${IMAGE_NAME}:latest
313+
```
314+
315+
> **NOTE**:<br>
316+
> Use `--config` argument to optionally specify additional BIB build-time customizations
317+
> as described in [Build config](https://osbuild.org/docs/bootc/#-build-config).
318+
311319
### Create Virtual Machine
312320

313321
Run the following commands to copy the `./output/install.iso` file to the

0 commit comments

Comments
 (0)