Skip to content

Commit 537c3f8

Browse files
authored
Merge pull request #103280 from lahinson/ocpbugs-62751-hcp-create-hc-ibmz
[OCPBUGS-62751]: Adding procedure to create hosted clusters on IBM Z
2 parents 1c53d3d + 63c4710 commit 537c3f8

File tree

2 files changed

+99
-1
lines changed

2 files changed

+99
-1
lines changed

hosted_control_planes/hcp-deploy/hcp-deploy-ibmz.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ include::modules/hcp-custom-dns.adoc[leveloffset=+2]
4242

4343
You can create a hosted cluster or import one. When the Assisted Installer is enabled as an add-on to {mce-short} and you create a hosted cluster with the Agent platform, the HyperShift Operator installs the Agent Cluster API provider in the hosted control plane namespace.
4444

45-
include::modules/hcp-bm-hc.adoc[leveloffset=+2]
45+
include::modules/hcp-ibmz-create-hc.adoc[leveloffset=+2]
4646

4747
[role="_additional-resources"]
4848
.Additional resources

modules/hcp-ibmz-create-hc.adoc

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibmz.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-ibmz-create-hc_{context}"]
7+
= Creating a hosted cluster on bare metal for {ibm-z-title}
8+
9+
On bare-metal infrastructure, you can create or import a hosted cluster. After you enable the Assisted Installer as an add-on to {mce-short} and you create a hosted cluster with the Agent platform, the HyperShift Operator installs the Agent Cluster API provider in the hosted control plane namespace. The Agent Cluster API provider connects a management cluster that hosts the control plane and a hosted cluster that consists of only the compute nodes.
10+
11+
.Prerequisites
12+
13+
- Each hosted cluster must have a cluster-wide unique name. A hosted cluster name cannot be the same as any existing managed cluster. Otherwise, the {mce-short} cannot manage the hosted cluster.
14+
15+
- Do not use the word `clusters` as a hosted cluster name.
16+
17+
- You cannot create a hosted cluster in the namespace of a {mce-short} managed cluster.
18+
19+
- For best security and management practices, create a hosted cluster separate from other hosted clusters.
20+
21+
- Verify that you have a default storage class configured for your cluster. Otherwise, you might see pending persistent volume claims (PVCs).
22+
23+
.Procedure
24+
25+
. Create a namespace by entering the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc create ns <hosted_cluster_namespace>
30+
----
31+
+
32+
Replace `<hosted_cluster_namespace>` with an identifier for your hosted cluster namespace. The HyperShift Operator creates the namespace. During the hosted cluster creation process on bare-metal infrastructure, a generated Cluster API provider role requires that the namespace already exists.
33+
34+
. Create the configuration file for your hosted cluster by entering the following command:
35+
+
36+
[source,terminal]
37+
----
38+
$ hcp create cluster agent \
39+
--name=<hosted_cluster_name> \// <1>
40+
--pull-secret=<path_to_pull_secret> \// <2>
41+
--agent-namespace=<hosted_control_plane_namespace> \// <3>
42+
--base-domain=<base_domain> \// <4>
43+
--api-server-address=api.<hosted_cluster_name>.<base_domain> \// <5>
44+
--etcd-storage-class=<etcd_storage_class> \// <6>
45+
--ssh-key=<path_to_ssh_key> \// <7>
46+
--namespace=<hosted_cluster_namespace> \// <8>
47+
--control-plane-availability-policy=HighlyAvailable \// <9>
48+
--release-image=quay.io/openshift-release-dev/ocp-release:<ocp_release_image>-multi \// <10>
49+
--node-pool-replicas=<node_pool_replica_count> \// <11>
50+
--render \
51+
--render-sensitive \
52+
--ssh-key <home_directory>/<path_to_ssh_key>/<ssh_key> > hosted-cluster-config.yaml <12>
53+
----
54+
+
55+
<1> Specify the name of your hosted cluster, such as `example`.
56+
<2> Specify the path to your pull secret, such as `/user/name/pullsecret`.
57+
<3> Specify your hosted control plane namespace, such as `clusters-example`. Ensure that agents are available in this namespace by using the `oc get agent -n <hosted_control_plane_namespace>` command.
58+
<4> Specify your base domain, such as `krnl.es`.
59+
<5> The `--api-server-address` flag defines the IP address that gets used for the Kubernetes API communication in the hosted cluster. If you do not set the `--api-server-address` flag, you must log in to connect to the management cluster.
60+
<6> Specify the etcd storage class name, such as `lvm-storageclass`.
61+
<7> Specify the path to your SSH public key. The default file path is `~/.ssh/id_rsa.pub`.
62+
<8> Specify your hosted cluster namespace.
63+
<9> Specify the availability policy for the hosted control plane components. Supported options are `SingleReplica` and `HighlyAvailable`. The default value is `HighlyAvailable`.
64+
<10> Specify the supported {product-title} version that you want to use, such as `4.19.0-multi`. If you are using a disconnected environment, replace `<ocp_release_image>` with the digest image. To extract the {product-title} release image digest, see _Extracting the {product-title} release image digest_.
65+
<11> Specify the node pool replica count, such as `3`. You must specify the replica count as `0` or greater to create the same number of replicas. Otherwise, you do not create node pools.
66+
<12> After the `--ssh-key` flag, specify the path to the SSH key, such as `user/.ssh/id_rsa`.
67+
68+
. Apply the changes to the hosted cluster configuration file by entering the following command:
69+
+
70+
[source,terminal]
71+
----
72+
$ oc apply -f hosted_cluster_config.yaml
73+
----
74+
75+
. Check for the creation of the hosted cluster, node pools, and pods by entering the following commands:
76+
+
77+
[source,terminal]
78+
----
79+
$ oc get hostedcluster \
80+
<hosted_cluster_name> -n \
81+
<hosted_cluster_namespace> -o \
82+
jsonpath='{.status.conditions[?(@.status=="False")]}' | jq .
83+
----
84+
+
85+
[source,terminal]
86+
----
87+
$ oc get hostedcluster \
88+
<nodepool_name> -n \
89+
<hosted_cluster_namespace> -o \
90+
jsonpath='{.status.conditions[?(@.status=="False")]}' | jq .
91+
----
92+
+
93+
[source,terminal]
94+
----
95+
$ oc get pods -n <hosted_control_plane_namespace>
96+
----
97+
98+
. Confirm that the hosted cluster is ready. The status of `Available: True` indicates the readiness of the control plane.

0 commit comments

Comments
 (0)