Skip to content

Commit 29291a0

Browse files
committed
TELCODOCS-1707: Add Preparing/Installing Operators
1 parent 6240058 commit 29291a0

7 files changed

+550
-3
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,8 +3084,8 @@ Topics:
30843084
Topics:
30853085
- Name: Configuring a shared container directory for the image-based upgrade
30863086
File: cnf-image-based-upgrade-shared-container-image
3087-
# - Name: Installing Operators for the image-based upgrade
3088-
# File: cnf-image-based-upgrade-install-operators
3087+
- Name: Installing Operators for the image-based upgrade
3088+
File: cnf-image-based-upgrade-install-operators
30893089
# - Name: Generating a seed image for the image-based upgrade with Lifecycle Agent
30903090
# File: cnf-image-based-upgrade-generate-seed
30913091
# - Name: Creating ConfigMap objects for the image-based upgrade with Lifecycle Agent

edge_computing/image_based_upgrade/cnf-understanding-image-based-upgrade.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ include::modules/ztp-image-based-upgrade-extra-manifests-guide.adoc[leveloffset=
127127
* xref:../../edge_computing/image_based_upgrade/preparing_for_image_based_upgrade/ztp-image-based-upgrade-prep-resources.adoc#ztp-image-based-upgrade-creating-backup-resources-with-ztp_ztp-gitops[Creating ConfigMap objects for the image-based upgrade with GitOps ZTP]
128128
129129
* xref:../../backup_and_restore/application_backup_and_restore/installing/about-installing-oadp.adoc#about-installing-oadp[About installing OADP]
130-
////
130+
////
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="cnf-image-based-upgrade-install-operators"]
3+
= Installing Operators for the image-based upgrade
4+
include::_attributes/common-attributes.adoc[]
5+
:context: install-operators
6+
7+
toc::[]
8+
9+
Prepare your clusters for the upgrade by installing the {lcao} and the OADP Operator.
10+
11+
To install the OADP Operator with the non-GitOps method, see "Installing the OADP Operator".
12+
13+
////
14+
[role="_additional-resources"]
15+
.Additional resources
16+
17+
* xref:../../../backup_and_restore/application_backup_and_restore/installing/oadp-installing-operator.adoc#oadp-installing-operator-doc[Installing the OADP Operator]
18+
19+
* xref:../../../backup_and_restore/application_backup_and_restore/installing/installing-oadp-ocs.adoc#oadp-about-backup-snapshot-locations_installing-oadp-ocs[About backup and snapshot locations and their secrets]
20+
21+
* xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-cr.adoc#oadp-creating-backup-cr-doc[Creating a Backup CR]
22+
23+
* xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/restoring-applications.adoc#oadp-creating-restore-cr_restoring-applications[Creating a Restore CR]
24+
////
25+
26+
include::modules/cnf-image-based-upgrade-installing-lifecycle-agent-using-cli.adoc[leveloffset=+1]
27+
28+
include::modules/cnf-image-based-upgrade-installing-lifecycle-agent-using-web-console.adoc[leveloffset=+1]
29+
30+
include::modules/ztp-image-based-upgrade-installing-lcao-with-gitops.adoc[leveloffset=+1]
31+
32+
include::modules/ztp-image-based-upgrade-installing-oadp-with-gitops.adoc[leveloffset=+1]
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Module included in the following assemblies:
2+
// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="installing-lcao-using-cli_{context}"]
6+
= Installing the {lcao} by using the CLI
7+
8+
You can use the OpenShift CLI (`oc`) to install the {lcao}.
9+
10+
.Prerequisites
11+
12+
* Install the OpenShift CLI (`oc`).
13+
* Log in as a user with `cluster-admin` privileges.
14+
15+
.Procedure
16+
17+
. Create a `Namespace` object YAML file for the {lcao}, for example `lcao-namespace.yaml`:
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: v1
22+
kind: Namespace
23+
metadata:
24+
name: openshift-lifecycle-agent
25+
annotations:
26+
workload.openshift.io/allowed: management
27+
----
28+
29+
.. Create the `Namespace` CR by running the following command:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc create -f lcao-namespace.yaml
34+
----
35+
36+
. Create an `OperatorGroup` object YAML file for the {lcao}, for example `lcao-operatorgroup.yaml`:
37+
+
38+
[source,yaml]
39+
----
40+
apiVersion: operators.coreos.com/v1
41+
kind: OperatorGroup
42+
metadata:
43+
name: openshift-lifecycle-agent
44+
namespace: openshift-lifecycle-agent
45+
spec:
46+
targetNamespaces:
47+
- openshift-lifecycle-agent
48+
----
49+
50+
.. Create the `OperatorGroup` CR by running the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc create -f lcao-operatorgroup.yaml
55+
----
56+
57+
. Create a `Subscription` CR, for example, `lcao-subscription.yaml`:
58+
+
59+
[source,yaml]
60+
----
61+
apiVersion: operators.coreos.com/v1
62+
kind: Subscription
63+
metadata:
64+
name: openshift-lifecycle-agent-subscription
65+
namespace: openshift-lifecycle-agent
66+
spec:
67+
channel: "stable"
68+
name: lifecycle-agent
69+
source: redhat-operators
70+
sourceNamespace: openshift-marketplace
71+
----
72+
73+
.. Create the `Subscription` CR by running the following command:
74+
+
75+
[source,terminal]
76+
----
77+
$ oc create -f lcao-subscription.yaml
78+
----
79+
80+
.Verification
81+
82+
. To verify that the installation succeeded, inspect the CSV resource by running the following command::
83+
+
84+
[source,terminal]
85+
----
86+
$ oc get csv -n openshift-lifecycle-agent
87+
----
88+
+
89+
.Example output
90+
[source,terminal,subs="attributes+"]
91+
----
92+
NAME DISPLAY VERSION REPLACES PHASE
93+
lifecycle-agent.v{product-version}.0 Openshift Lifecycle Agent {product-version}.0 Succeeded
94+
----
95+
96+
. Verify that the {lcao} is up and running by running the following command:
97+
+
98+
[source,terminal]
99+
----
100+
$ oc get deploy -n openshift-lifecycle-agent
101+
----
102+
103+
+
104+
.Example output
105+
[source,terminal]
106+
----
107+
NAME READY UP-TO-DATE AVAILABLE AGE
108+
lifecycle-agent-controller-manager 1/1 1 1 14s
109+
----
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Module included in the following assemblies:
2+
// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="installing-lifecycle-agent-using-web-console_{context}"]
6+
= Installing the {lcao} by using the web console
7+
8+
You can use the {product-title} web console to install the {lcao}.
9+
10+
.Prerequisites
11+
12+
* Log in as a user with `cluster-admin` privileges.
13+
14+
.Procedure
15+
16+
. In the {product-title} web console, navigate to *Operators**OperatorHub*.
17+
. Search for the *{lcao}* from the list of available Operators, and then click *Install*.
18+
. On the *Install Operator* page, under *A specific namespace on the cluster* select *openshift-lifecycle-agent*.
19+
. Click *Install*.
20+
21+
.Verification
22+
23+
. To confirm that the installation is successful:
24+
25+
.. Click *Operators* → *Installed Operators*.
26+
.. Ensure that the {lcao} is listed in the *openshift-lifecycle-agent* project with a *Status* of *InstallSucceeded*.
27+
+
28+
[NOTE]
29+
====
30+
During installation an Operator might display a *Failed* status. If the installation later succeeds with an *InstallSucceeded* message, you can ignore the *Failed* message.
31+
====
32+
33+
If the Operator is not installed successfully:
34+
35+
. Click the *Operators**Installed Operators*, and inspect the *Operator Subscriptions* and *Install Plans* tabs for any failure or errors under *Status*.
36+
. Click the *Workloads**Pods*, and check the logs for pods in the *openshift-lifecycle-agent* project.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// Module included in the following assemblies:
2+
// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="ztp-image-based-upgrade-installing-lcao-with-gitops_{context}"]
6+
= Installing the {lcao} with GitOps ZTP
7+
8+
Install the {lcao} with GitOps ZTP to do an image-based upgrade.
9+
10+
.Prerequisites
11+
12+
* Create a directory called `custom-crs` in the `source-crs` directory. The `source-crs` directory must be in the same location as the `kustomization.yaml` file.
13+
14+
.Procedure
15+
16+
. Create the following CRs in the `openshift-lifecycle-agent` namespace and push them to the `source-crs/custom-crs` directory:
17+
+
18+
--
19+
.LcaSubscriptionNS.yaml
20+
[source,yaml]
21+
----
22+
apiVersion: v1
23+
kind: Namespace
24+
metadata:
25+
name: openshift-lifecycle-agent
26+
annotations:
27+
workload.openshift.io/allowed: management
28+
ran.openshift.io/ztp-deploy-wave: "2"
29+
labels:
30+
kubernetes.io/metadata.name: openshift-lifecycle-agent
31+
----
32+
33+
.LcaSubscriptionOperGroup.yaml
34+
[source,yaml]
35+
----
36+
apiVersion: operators.coreos.com/v1
37+
kind: OperatorGroup
38+
metadata:
39+
name: lifecycle-agent-operatorgroup
40+
namespace: openshift-lifecycle-agent
41+
annotations:
42+
ran.openshift.io/ztp-deploy-wave: "2"
43+
spec:
44+
targetNamespaces:
45+
- openshift-lifecycle-agent
46+
----
47+
48+
.LcaSubscription.yaml
49+
[source,yaml]
50+
----
51+
apiVersion: operators.coreos.com/v1
52+
kind: Subscription
53+
metadata:
54+
name: lifecycle-agent
55+
namespace: openshift-lifecycle-agent
56+
annotations:
57+
ran.openshift.io/ztp-deploy-wave: "2"
58+
spec:
59+
channel: "stable"
60+
name: lifecycle-agent
61+
source: redhat-operators
62+
sourceNamespace: openshift-marketplace
63+
installPlanApproval: Manual
64+
status:
65+
state: AtLatestKnown
66+
----
67+
68+
.Example directory structure
69+
[source,terminal]
70+
----
71+
├── kustomization.yaml
72+
├── sno
73+
│ ├── example-cnf.yaml
74+
│ ├── common-ranGen.yaml
75+
│ ├── group-du-sno-ranGen.yaml
76+
│ ├── group-du-sno-validator-ranGen.yaml
77+
│ └── ns.yaml
78+
├── source-crs
79+
│ ├── custom-crs
80+
│ │ ├── LcaSubscriptionNS.yaml
81+
│ │ ├── LcaSubscriptionOperGroup.yaml
82+
│ │ ├── LcaSubscription.yaml
83+
----
84+
--
85+
86+
. Add the CRs to your common `PolicyGenTemplate`:
87+
+
88+
[source,yaml]
89+
----
90+
apiVersion: ran.openshift.io/v1
91+
kind: PolicyGenTemplate
92+
metadata:
93+
name: "example-common-latest"
94+
namespace: "ztp-common"
95+
spec:
96+
bindingRules:
97+
common: "true"
98+
du-profile: "latest"
99+
sourceFiles:
100+
- fileName: custom-crs/LcaSubscriptionNS.yaml
101+
policyName: "subscriptions-policy"
102+
- fileName: custom-crs/LcaSubscriptionOperGroup.yaml
103+
policyName: "subscriptions-policy"
104+
- fileName: custom-crs/LcaSubscription.yaml
105+
policyName: "subscriptions-policy"
106+
[...]
107+
----

0 commit comments

Comments
 (0)