Skip to content

Commit e9c06a6

Browse files
authored
Merge pull request #81100 from lahinson/osdocs-11001-hcp-enable
[OSDOCS-11001]: Moving HCP enable/disable docs from RHACM to OCP
2 parents 9df8069 + 4bccc30 commit e9c06a6

File tree

6 files changed

+194
-0
lines changed

6 files changed

+194
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,8 @@ Topics:
23862386
File: hcp-cli
23872387
- Name: Distributing hosted cluster workloads
23882388
File: hcp-distribute-workloads
2389+
- Name: Enabling or disabling the hosted control planes feature
2390+
File: hcp-enable-disable
23892391
- Name: Deploying hosted control planes
23902392
Dir: hcp-deploy
23912393
Topics:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-enable-disable"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Enabling or disabling the {hcp} feature
5+
:context: hcp-enable-disable
6+
7+
toc::[]
8+
9+
The {hcp} feature, as well as the `hypershift-addon` managed cluster add-on, are enabled by default. If you want to disable the feature, or if you disabled it and want to manually enable it, see the following procedures.
10+
11+
include::modules/hcp-enable-manual.adoc[leveloffset=+1]
12+
include::modules/hcp-enable-manual-addon.adoc[leveloffset=+2]
13+
14+
[id="hcp-disable_{context}"]
15+
== Disabling the {hcp} feature
16+
17+
You can uninstall the HyperShift Operator and disable the hosted control plane. When you disable the hosted control plane cluster feature, you must destroy the hosted cluster and the managed cluster resource on {mce-short}, as described in the _Managing hosted control plane clusters_ topics.
18+
19+
include::modules/hcp-uninstall-operator.adoc[leveloffset=+2]
20+
include::modules/hcp-disable-feature.adoc[leveloffset=+2]

modules/hcp-disable-feature.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-enable-disable.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-disable-feature_{context}"]
6+
= Disabling the {hcp} feature
7+
8+
Before you disable the {hcp} feature, you must first uninstall the HyperShift Operator.
9+
10+
.Procedure
11+
12+
. Run the following command to disable the {hcp} feature:
13+
+
14+
[source,terminal]
15+
----
16+
$ oc patch mce multiclusterengine --type=merge -p '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": false}]}}}' <1>
17+
----
18+
+
19+
<1> The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
20+
21+
. You can verify that the `hypershift` and `hypershift-local-hosting` features are disabled in the `MultiClusterEngine` custom resource by running the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ oc get mce multiclusterengine -o yaml <1>
26+
----
27+
+
28+
<1> The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
29+
+
30+
See the following example where `hypershift` and `hypershift-local-hosting` have their `enabled:` flags set to `false`:
31+
+
32+
[source,yaml]
33+
----
34+
apiVersion: multicluster.openshift.io/v1
35+
kind: MultiClusterEngine
36+
metadata:
37+
name: multiclusterengine
38+
spec:
39+
overrides:
40+
components:
41+
- name: hypershift
42+
enabled: false
43+
- name: hypershift-local-hosting
44+
enabled: false
45+
----

modules/hcp-enable-manual-addon.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-enable-disable.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-enable-manual-addon_{context}"]
6+
= Manually enabling the hypershift-addon managed cluster add-on for local-cluster
7+
8+
Enabling the hosted control planes feature automatically enables the `hypershift-addon` managed cluster add-on. If you need to enable the `hypershift-addon` managed cluster add-on manually, complete the following steps to use the `hypershift-addon` to install the HyperShift Operator on `local-cluster`.
9+
10+
.Procedure
11+
12+
. Create the `ManagedClusterAddon` HyperShift add-on by creating a file that resembles the following example:
13+
+
14+
[source,yaml]
15+
----
16+
apiVersion: addon.open-cluster-management.io/v1alpha1
17+
kind: ManagedClusterAddOn
18+
metadata:
19+
name: hypershift-addon
20+
namespace: local-cluster
21+
spec:
22+
installNamespace: open-cluster-management-agent-addon
23+
----
24+
25+
. Apply the file by running the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc apply -f <filename>
30+
----
31+
+
32+
Replace `filename` with the name of the file that you created.
33+
34+
. Confirm that the `hypershift-addon` is installed by running the following command:
35+
+
36+
[source,terminal]
37+
----
38+
$ oc get managedclusteraddons -n local-cluster hypershift-addon
39+
----
40+
+
41+
If the add-on is installed, the output resembles the following example:
42+
+
43+
[source,terminal]
44+
----
45+
NAME AVAILABLE DEGRADED PROGRESSING
46+
hypershift-addon True
47+
----
48+
49+
Your HyperShift add-on is installed and the hosting cluster is available to create and manage hosted clusters.

modules/hcp-enable-manual.adoc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-enable-disable.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-enable-manual_{context}"]
6+
= Manually enabling the {hcp} feature
7+
8+
If you need to manually enable {hcp}, complete the following steps.
9+
10+
.Procedure
11+
12+
. Run the following command to enable the feature:
13+
+
14+
[source,terminal]
15+
----
16+
$ oc patch mce multiclusterengine --type=merge -p '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}' <1>
17+
----
18+
<1> The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
19+
20+
. Run the following command to verify that the `hypershift` and `hypershift-local-hosting` features are enabled in the `MultiClusterEngine` custom resource:
21+
+
22+
[source,terminal]
23+
----
24+
$ oc get mce multiclusterengine -o yaml <1>
25+
----
26+
<1> The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
27+
+
28+
.Example output
29+
[source,yaml]
30+
----
31+
apiVersion: multicluster.openshift.io/v1
32+
kind: MultiClusterEngine
33+
metadata:
34+
name: multiclusterengine
35+
spec:
36+
overrides:
37+
components:
38+
- name: hypershift
39+
enabled: true
40+
- name: hypershift-local-hosting
41+
enabled: true
42+
----

modules/hcp-uninstall-operator.adoc

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+
// * hosted-control-planes/hcp-prepare/hcp-enable-disable.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-uninstall-operator_{context}"]
6+
= Uninstalling the HyperShift Operator
7+
8+
To uninstall the HyperShift Operator and disable the `hypershift-addon` from the `local-cluster`, complete the following steps:
9+
10+
.Procedure
11+
12+
. Run the following command to ensure that there is no hosted cluster running:
13+
+
14+
[source,terminal]
15+
----
16+
$ oc get hostedcluster -A
17+
----
18+
+
19+
[IMPORTANT]
20+
====
21+
If a hosted cluster is running, the HyperShift Operator does not uninstall, even if the `hypershift-addon` is disabled.
22+
====
23+
24+
. Disable the `hypershift-addon` by running the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ oc patch mce multiclusterengine --type=merge -p '{"spec":{"overrides":{"components":[{"name":"hypershift-local-hosting","enabled": false}]}}}' <1>
29+
----
30+
+
31+
<1> The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
32+
+
33+
[NOTE]
34+
====
35+
You can also disable the `hypershift-addon` for the `local-cluster` from the {mce-short} console after disabling the `hypershift-addon`.
36+
====

0 commit comments

Comments
 (0)