Skip to content

Commit 7eea6a9

Browse files
authored
Merge pull request #60623 from aspauldi/CNV-27208
CNV-27208: OKD virt installation procedures
2 parents 7d59ff7 + 8dd9009 commit 7eea6a9

10 files changed

+80
-37
lines changed

_attributes/common-attributes.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,23 @@ endif::[]
109109
:VirtVersion: 4.13
110110
:KubeVirtVersion: v0.59.0
111111
:HCOVersion: 4.13.0
112+
:CNVNamespace: openshift-cnv
113+
:CNVOperatorDisplayName: OpenShift Virtualization Operator
114+
:CNVSubscriptionSpecSource: redhat-operators
115+
:CNVSubscriptionSpecName: kubevirt-hyperconverged
112116
:delete: image:delete.png[title="Delete"]
113117
ifdef::openshift-origin[]
114118
:VirtProductName: OKD Virtualization
119+
:CNVNamespace: kubevirt-hyperconverged
120+
:CNVOperatorDisplayName: KubeVirt HyperConverged Cluster Operator
121+
:CNVSubscriptionSpecSource: community-operators
122+
:CNVSubscriptionSpecName: community-kubevirt-hyperconverged
115123
endif::[]
116124
//distributed tracing
117125
:DTProductName: Red Hat OpenShift distributed tracing
118126
:DTShortName: distributed tracing
119127
:DTProductVersion: 2.8
120-
:JaegerName: Red Hat OpenShift distributed tracing platform
128+
:JaegerName: Red Hat OpenShift distributed tracing platform
121129
:JaegerShortName: distributed tracing platform
122130
:JaegerVersion: 1.42.0
123131
:OTELName: Red Hat OpenShift distributed tracing data collection

modules/virt-about-node-placement-virtualization-components.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ apiVersion: operators.coreos.com/v1beta1
4343
kind: Subscription
4444
metadata:
4545
name: hco-operatorhub
46-
namespace: openshift-cnv
46+
namespace: {CNVNamespace}
4747
spec:
48-
source: redhat-operators
48+
source: {CNVSubscriptionSpecSource}
4949
sourceNamespace: openshift-marketplace
50-
name: kubevirt-hyperconverged
50+
name: {CNVSubscriptionSpecName}
5151
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
5252
channel: "stable"
5353
config: <1>
@@ -59,13 +59,13 @@ spec:
5959

6060
To specify the nodes where {VirtProductName} deploys its components, you can include the `nodePlacement` object in the HyperConverged Cluster custom resource (CR) file that you create during {VirtProductName} installation. You can include `nodePlacement` under the `spec.infra` and `spec.workloads` fields, as shown in the following example:
6161

62-
[source,yaml]
62+
[source,yaml,subs="attributes+"]
6363
----
6464
apiVersion: hco.kubevirt.io/v1beta1
6565
kind: HyperConverged
6666
metadata:
6767
name: kubevirt-hyperconverged
68-
namespace: openshift-cnv
68+
namespace: {CNVNamespace}
6969
spec:
7070
infra:
7171
nodePlacement: <1>

modules/virt-deploying-operator-cli.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ You can deploy the {VirtProductName} Operator by using the `oc` CLI.
1010

1111
.Prerequisites
1212

13-
* An active subscription to the {VirtProductName} catalog in the `openshift-cnv` namespace.
13+
* An active subscription to the {VirtProductName} catalog in the `{CNVNamespace}` namespace.
1414
1515
.Procedure
1616

1717
. Create a YAML file that contains the following manifest:
1818
+
19-
[source,yaml]
19+
[source,yaml,subs="attributes+"]
2020
----
2121
apiVersion: hco.kubevirt.io/v1beta1
2222
kind: HyperConverged
2323
metadata:
2424
name: kubevirt-hyperconverged
25-
namespace: openshift-cnv
25+
namespace: {CNVNamespace}
2626
spec:
2727
----
2828

@@ -35,11 +35,11 @@ $ oc apply -f <file_name>.yaml
3535

3636
.Verification
3737

38-
* Ensure that {VirtProductName} deployed successfully by watching the `PHASE` of the cluster service version (CSV) in the `openshift-cnv` namespace. Run the following command:
38+
* Ensure that {VirtProductName} deployed successfully by watching the `PHASE` of the cluster service version (CSV) in the `{CNVNamespace}` namespace. Run the following command:
3939
+
40-
[source,terminal]
40+
[source,terminal,subs="attributes+"]
4141
----
42-
$ watch oc get csv -n openshift-cnv
42+
$ watch oc get csv -n {CNVNamespace}
4343
----
4444
+
4545
The following output displays if deployment was successful:

modules/virt-example-node-placement-affinity-hyperconverged-cr.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
In this example, `affinity` is configured so that infrastructure resources are placed on nodes that are labeled with `example.io/example-infra-key = example-value` and workloads are placed on nodes labeled with `example.io/example-workloads-key = example-workloads-value`. Nodes that have more than eight CPUs are preferred for workloads, but if they are not available, pods are still scheduled.
99

10-
[source,yaml]
10+
[source,yaml,subs="attributes+"]
1111
----
1212
apiVersion: hco.kubevirt.io/v1beta1
1313
kind: HyperConverged
1414
metadata:
1515
name: kubevirt-hyperconverged
16-
namespace: openshift-cnv
16+
namespace: {CNVNamespace}
1717
spec:
1818
infra:
1919
nodePlacement:

modules/virt-example-node-placement-node-selector-hyperconverged-cr.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
In this example, `nodeSelector` is configured so that infrastructure resources are placed on nodes that are labeled with `example.io/example-infra-key = example-infra-value` and workloads are placed on nodes labeled with `example.io/example-workloads-key = example-workloads-value`.
99

10-
[source,yaml]
10+
[source,yaml,subs="attributes+"]
1111
----
1212
apiVersion: hco.kubevirt.io/v1beta1
1313
kind: HyperConverged
1414
metadata:
1515
name: kubevirt-hyperconverged
16-
namespace: openshift-cnv
16+
namespace: {CNVNamespace}
1717
spec:
1818
infra:
1919
nodePlacement:

modules/virt-example-node-placement-node-selector-olm-subscription.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ apiVersion: operators.coreos.com/v1beta1
1313
kind: Subscription
1414
metadata:
1515
name: hco-operatorhub
16-
namespace: openshift-cnv
16+
namespace: {CNVNamespace}
1717
spec:
18-
source: redhat-operators
18+
source: {CNVSubscriptionSpecSource}
1919
sourceNamespace: openshift-marketplace
20-
name: kubevirt-hyperconverged
20+
name: {CNVSubscriptionSpecName}
2121
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
2222
channel: "stable"
2323
config:

modules/virt-example-node-placement-tolerations-hyperconverged-cr.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
In this example, nodes that are reserved for {VirtProductName} components are labeled with the `key=virtualization:NoSchedule` taint. Only pods with the matching tolerations are scheduled to these nodes.
99

10-
[source,yaml]
10+
[source,yaml,subs="attributes+"]
1111
----
1212
apiVersion: hco.kubevirt.io/v1beta1
1313
kind: HyperConverged
1414
metadata:
1515
name: kubevirt-hyperconverged
16-
namespace: openshift-cnv
16+
namespace: {CNVNamespace}
1717
spec:
1818
workloads:
1919
nodePlacement:

modules/virt-example-node-placement-tolerations-olm-subscription.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ apiVersion: operators.coreos.com/v1beta1
1313
kind: Subscription
1414
metadata:
1515
name: hco-operatorhub
16-
namespace: openshift-cnv
16+
namespace: {CNVNamespace}
1717
spec:
18-
source: redhat-operators
18+
source: {CNVSubscriptionSpecSource}
1919
sourceNamespace: openshift-marketplace
20-
name: kubevirt-hyperconverged
20+
name: {CNVSubscriptionSpecName}
2121
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
2222
channel: "stable"
2323
config:

modules/virt-installing-virt-operator.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ You can deploy the {VirtProductName} Operator by using the {product-title} web c
1717

1818
. From the *Administrator* perspective, click *Operators* -> *OperatorHub*.
1919

20-
. In the *Filter by keyword* field, type *{VirtProductName}*.
20+
. In the *Filter by keyword* field, type *{CNVOperatorDisplayName}*.
2121

22-
. Select the *{VirtProductName}* tile.
22+
. Select the *{CNVOperatorDisplayName}* tile.
2323

2424
. Read the information about the Operator and click *Install*.
2525

2626
. On the *Install Operator* page:
2727

2828
.. Select *stable* from the list of available *Update Channel* options. This ensures that you install the version of {VirtProductName} that is compatible with your {product-title} version.
2929

30-
.. For *Installed Namespace*, ensure that the *Operator recommended namespace* option is selected. This installs the Operator in the mandatory `openshift-cnv` namespace, which is automatically created if it does not exist.
30+
.. For *Installed Namespace*, ensure that the *Operator recommended namespace* option is selected. This installs the Operator in the mandatory `{CNVNamespace}` namespace, which is automatically created if it does not exist.
3131
+
3232
[WARNING]
3333
====
34-
Attempting to install the {VirtProductName} Operator in a namespace other than `openshift-cnv` causes the installation to fail.
34+
Attempting to install the {VirtProductName} Operator in a namespace other than `{CNVNamespace}` causes the installation to fail.
3535
====
3636

3737
.. For *Approval Strategy*, it is highly recommended that you select *Automatic*, which is the default value, so that {VirtProductName} automatically updates when a new version is available in the *stable* update channel.
@@ -43,7 +43,7 @@ While it is possible to select the *Manual* approval strategy, this is inadvisab
4343
Because {VirtProductName} is only supported when used with the corresponding {product-title} version, missing {VirtProductName} updates can cause your cluster to become unsupported.
4444
====
4545

46-
. Click *Install* to make the Operator available to the `openshift-cnv` namespace.
46+
. Click *Install* to make the Operator available to the `{CNVNamespace}` namespace.
4747

4848
. When the Operator installs successfully, click *Create HyperConverged*.
4949

modules/virt-subscribing-cli.adoc

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="virt-subscribing-cli_{context}"]
77
= Subscribing to the {VirtProductName} catalog by using the CLI
88

9-
Before you install {VirtProductName}, you must subscribe to the {VirtProductName} catalog. Subscribing gives the `openshift-cnv` namespace access to the {VirtProductName} Operators.
9+
Before you install {VirtProductName}, you must subscribe to the {VirtProductName} catalog. Subscribing gives the `{CNVNamespace}` namespace access to the {VirtProductName} Operators.
1010

1111
To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects by applying a single manifest to your cluster.
1212

@@ -16,39 +16,74 @@ To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects
1616
* Log in as a user with `cluster-admin` privileges.
1717
1818
.Procedure
19-
19+
ifdef::openshift-enterprise[]
2020
. Create a YAML file that contains the following manifest:
21+
//Note that there are two versions of the following YAML file; the first one is for openshift-enterprise and the second is for openshift-origin (aka OKD).
2122
+
2223
[source,yaml,subs="attributes+"]
2324
----
2425
apiVersion: v1
2526
kind: Namespace
2627
metadata:
27-
name: openshift-cnv
28+
name: {CNVNamespace}
2829
---
2930
apiVersion: operators.coreos.com/v1
3031
kind: OperatorGroup
3132
metadata:
3233
name: kubevirt-hyperconverged-group
33-
namespace: openshift-cnv
34+
namespace: {CNVNamespace}
3435
spec:
3536
targetNamespaces:
36-
- openshift-cnv
37+
- {CNVNamespace}
38+
---
39+
apiVersion: operators.coreos.com/v1beta1
40+
kind: Subscription
41+
metadata:
42+
name: hco-operatorhub
43+
namespace: {CNVNamespace}
44+
spec:
45+
source: {CNVSubscriptionSpecSource}
46+
sourceNamespace: openshift-marketplace
47+
name: {CNVSubscriptionSpecName}
48+
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
49+
channel: "stable" <1>
50+
----
51+
<1> Using the `stable` channel ensures that you install the version of
52+
{VirtProductName} that is compatible with your {product-title} version.
53+
endif::openshift-enterprise[]
54+
55+
ifdef::openshift-origin[]
56+
. Create a YAML file that contains the following manifest:
57+
+
58+
[source,yaml,subs="attributes+"]
59+
----
60+
apiVersion: v1
61+
kind: Namespace
62+
metadata:
63+
name: {CNVNamespace}
64+
---
65+
apiVersion: operators.coreos.com/v1
66+
kind: OperatorGroup
67+
metadata:
68+
name: kubevirt-hyperconverged-group
69+
namespace: {CNVNamespace}
70+
spec: {}
3771
---
3872
apiVersion: operators.coreos.com/v1beta1
3973
kind: Subscription
4074
metadata:
4175
name: hco-operatorhub
42-
namespace: openshift-cnv
76+
namespace: {CNVNamespace}
4377
spec:
44-
source: redhat-operators
78+
source: {CNVSubscriptionSpecSource}
4579
sourceNamespace: openshift-marketplace
46-
name: kubevirt-hyperconverged
80+
name: {CNVSubscriptionSpecName}
4781
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
4882
channel: "stable" <1>
4983
----
5084
<1> Using the `stable` channel ensures that you install the version of
5185
{VirtProductName} that is compatible with your {product-title} version.
86+
endif::openshift-origin[]
5287

5388
. Create the required `Namespace`, `OperatorGroup`, and `Subscription` objects
5489
for {VirtProductName} by running the following command:

0 commit comments

Comments
 (0)