Skip to content
Merged
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
1 change: 1 addition & 0 deletions _attributes/common-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ endif::[]
:VirtProductName: OpenShift Virtualization
:VirtVersion: 4.16
:HCOVersion: 4.16.21
:HCOVersionPrev: 4.15.0
:CNVNamespace: openshift-cnv
:CNVOperatorDisplayName: OpenShift Virtualization Operator
:CNVSubscriptionSpecSource: redhat-operators
Expand Down
85 changes: 81 additions & 4 deletions modules/virt-subscribing-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ Before you install {VirtProductName}, you must subscribe to the {VirtProductName
To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects by applying a single manifest to your cluster.

.Prerequisites

* Install {product-title} {product-version} on your cluster.
* Install the OpenShift CLI (`oc`).
* Install the {oc-first}.
* Log in as a user with `cluster-admin` privileges.

.Procedure
ifdef::openshift-enterprise[]

ifdef::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]

. Create a YAML file that contains the following manifest:
//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).
+
Expand Down Expand Up @@ -52,9 +55,11 @@ spec:
----
<1> Using the `stable` channel ensures that you install the version of
{VirtProductName} that is compatible with your {product-title} version.
endif::openshift-enterprise[]

endif::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]

ifdef::openshift-origin[]

. Create a YAML file that contains the following manifest:
+
[source,yaml,subs="attributes+"]
Expand Down Expand Up @@ -85,12 +90,84 @@ spec:
----
<1> Using the `stable` channel ensures that you install the version of
{VirtProductName} that is compatible with your {product-title} version.

endif::openshift-origin[]

. Create the required `Namespace`, `OperatorGroup`, and `Subscription` objects
for {VirtProductName} by running the following command:
+
[source,terminal]
----
$ oc apply -f <file name>.yaml
$ oc apply -f <filename>.yaml
----

.Verification

You must verify that the subscription creation was successful before you can proceed with installing {VirtProductName}.

. Check that the `ClusterServiceVersion` (CSV) object was created successfully. Run the following command and verify the output:
+
[source,terminal,subs="attributes+"]
----
$ oc get csv -n {CNVNamespace}
----
+
If the CSV was created successfully, the output shows an entry that contains a `NAME` value of `kubevirt-hyperconverged-operator-*`, a `DISPLAY` value of `{VirtProductName}`, and a `PHASE` value of `Succeeded`, as shown in the following example output:
+
*Example output*
+
[source,terminal,subs="attributes+"]
----
NAME DISPLAY VERSION REPLACES PHASE
kubevirt-hyperconverged-operator.v{HCOVersion} {VirtProductName} {HCOVersion} kubevirt-hyperconverged-operator.v{HCOVersionPrev} Succeeded
----

. Check that the `HyperConverged` custom resource (CR) has the correct version. Run the following command and verify the output:
+
[source,terminal,subs="attributes+"]
----
$ oc get hco -n {CNVNamespace} kubevirt-hyperconverged -o json | jq .status.versions
----
+
*Example output*
+
[source,terminal,subs="attributes+"]
----
{
"name": "operator",
"version": "{HCOVersion}"
}
----

. Verify the `HyperConverged` CR conditions. Run the following command and check the output:
+
[source,terminal,subs="attributes+"]
----
$ oc get hco kubevirt-hyperconverged -n {CNVNamespace} -o json | jq -r '.status.conditions[] | {type,status}'
----
+
*Example output*
+
[source,terminal]
----
{
"type": "ReconcileComplete",
"status": "True"
}
{
"type": "Available",
"status": "True"
}
{
"type": "Progressing",
"status": "False"
}
{
"type": "Degraded",
"status": "False"
}
{
"type": "Upgradeable",
"status": "True"
}
----