Skip to content
Open
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
35 changes: 22 additions & 13 deletions modules/cnf-image-based-upgrade-generate-seed-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[id="cnf-image-based-upgrade-generate-seed-image_{context}"]
= Generating a seed image with the {lcao}

[role="_abstract"]
Use the {lcao} to generate a seed image from a managed cluster. The Operator checks for required system configurations, performs any necessary system cleanup before generating the seed image, and launches the image generation. The seed image generation includes the following tasks:

* Stopping cluster Operators
Expand Down Expand Up @@ -98,14 +99,17 @@ $ base64 -w 0 ${AUTHFILE} ; echo
apiVersion: v1
kind: Secret
metadata:
name: seedgen <1>
name: <secret_name>
namespace: openshift-lifecycle-agent
type: Opaque
data:
seedAuth: <encoded_AUTHFILE> <2>
seedAuth: <encoded_authfile>
----
<1> The `Secret` resource must have the `name: seedgen` and `namespace: openshift-lifecycle-agent` fields.
<2> Specifies a base64-encoded authfile for write-access to the registry for pushing the generated seed images.
+
where:
+
`<secret_name>`:: The `Secret` resource must have the name `seedgen`.
`<encoded_authfile>`:: Specifies a base64-encoded authfile for write-access to the registry for pushing the generated seed images.
+
.. Apply the `Secret` by running the following command:
+
Expand All @@ -121,12 +125,15 @@ $ oc apply -f secretseedgenerator.yaml
apiVersion: lca.openshift.io/v1
kind: SeedGenerator
metadata:
name: seedimage <1>
name: <seedgenerator_name>
spec:
seedImage: <seed_container_image> <2>
seedImage: <seed_container_image>
----
<1> The `SeedGenerator` CR must be named `seedimage`.
<2> Specify the container image URL, for example, `quay.io/example/seed-container-image:<tag>`. It is recommended to use the `<seed_cluster_name>:<ocp_version>` format.
+
where:
+
`<seedgenerator_name>`:: The `SeedGenerator` CR must be named `seedimage`.
`<seed_container_image>`:: Specifies the container image URL, for example, `quay.io/example/seed-container-image:<tag>`. It is recommended to use the `<seed_cluster_name>:<ocp_version>` format.

. Generate the seed image by running the following command:
+
Expand All @@ -141,6 +148,8 @@ The cluster reboots and loses API capabilities while the {lcao} generates the se
Applying the `SeedGenerator` CR stops the `kubelet` and the CRI-O operations, then it starts the image generation.
====

.Next steps

If you want to generate more seed images, you must provision a new seed cluster with the version that you want to generate a seed image from.

.Verification
Expand All @@ -151,8 +160,9 @@ If you want to generate more seed images, you must provision a new seed cluster
----
$ oc get seedgenerator -o yaml
----

.Example output
+
The following example shows the output when the seed image generation is complete:
+
[source,yaml]
----
status:
Expand All @@ -168,7 +178,6 @@ status:
observedGeneration: 1
reason: Completed
status: "True"
type: SeedGenCompleted <1>
type: SeedGenCompleted
observedGeneration: 1
----
<1> The seed image generation is complete.
----
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[id="cnf-image-based-upgrade-installing-lifecycle-agent-using-cli_{context}"]
= Installing the {lcao} by using the CLI

[role="_abstract"]
You can use the OpenShift CLI (`oc`) to install the {lcao}.

.Prerequisites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[id="cnf-image-based-upgrade-installing-lifecycle-agent-using-web-console_{context}"]
= Installing the {lcao} by using the web console

[role="_abstract"]
You can use the {product-title} web console to install the {lcao}.

.Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion modules/cnf-image-based-upgrade-seed-image-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ ifeval::["{context}" == "generate-seed"]
:ibu:
endif::[]

:_mod-docs-content-type: PROCEDURE
:_mod-docs-content-type: REFERENCE
[id="cnf-image-based-upgrade-seed-image-config_{context}"]
= Seed image configuration

[role="_abstract"]
ifdef::ibu[]
The seed image targets a set of {sno} clusters with the same hardware and similar configuration.
This means that the seed image must have all of the components and configuration that the seed cluster shares with the target clusters.
Expand Down
16 changes: 10 additions & 6 deletions modules/cnf-image-based-upgrade-shared-container-partition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ endif::[]
[id="cnf-image-based-upgrade-shared-container-partition_{context}"]
= Configuring a shared container partition between ostree stateroots

[role="_abstract"]
ifdef::ibu[]
Apply a `MachineConfig` to both the seed and the target clusters during installation time to create a separate partition and share the `/var/lib/containers` partition between the two `ostree` stateroots that will be used during the upgrade process.
endif::[]
Expand Down Expand Up @@ -44,11 +45,11 @@ spec:
version: 3.2.0
storage:
disks:
- device: /dev/disk/by-path/pci-<root_disk> <1>
- device: /dev/disk/by-path/<root_disk>
partitions:
- label: var-lib-containers
startMiB: <start_of_partition> <2>
sizeMiB: <partition_size> <3>
startMiB: <start_of_partition>
sizeMiB: <partition_size>
filesystems:
- device: /dev/disk/by-partlabel/var-lib-containers
format: xfs
Expand Down Expand Up @@ -77,9 +78,12 @@ spec:
enabled: true
name: var-lib-containers.mount
----
<1> Specify the root disk.
<2> Specify the start of the partition in MiB. If the value is too small, the installation will fail.
<3> Specify a minimum size for the partition of 500 GB to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.
+
where:
+
`<root_disk>`:: Specifies the root disk, for example `pci-0000:01:00.0-scsi-0:2:0:0`.
`<start_of_partition>`:: Specifies the start of the partition in MiB. If the value is too small, the installation will fail.
`<partition_size>`:: Specifies a minimum size for the partition of 500 GB (512000 MiB) to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.

ifeval::["{context}" == "ibi-preparing-image-based-install"]
:!ibi:
Expand Down