Skip to content

Commit 6ade160

Browse files
committed
HCP docs update for IBM Power
1 parent 06c7ebc commit 6ade160

9 files changed

+442
-0
lines changed

hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,24 @@ include::modules/hcp-ibm-power-infra-reqs.adoc[leveloffset=+1]
3737
include::modules/hcp-ibm-power-dns.adoc[leveloffset=+1]
3838

3939
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
40+
41+
[id="hcp-ibm-power-heterogeneous-nodepools_{context}"]
42+
== Creating heterogeneous node pools on agent hosted clusters
43+
44+
On the agent platform, you can create heterogeneous node pools so that your clusters can run diverse machine types, such as `x86_64` or `ppc64le`, within a single hosted cluster.
45+
46+
include::modules/hcp-ibm-power-create-heterogeneous-nodepools-agent-hc-con.adoc[leveloffset=+2]
47+
48+
include::modules/hcp-ibm-power-create-heterogeneous-nodepools-agent-hc.adoc[leveloffset=+2]
49+
50+
include::modules/hcp-ibm-power-heterogeneous-nodepools-create-agent-cluster.adoc[leveloffset=+2]
51+
52+
include::modules/hcp-create-heterogeneous-nodepools.adoc[leveloffset=+2]
53+
54+
include::modules/hcp-ibm-power-heterogeneous-nodepools-agent-hc-dns.adoc[leveloffset=+2]
55+
56+
include::modules/hcp-create-infraenv.adoc[leveloffset=+2]
57+
58+
include::modules/hcp-adding-agents.adoc[leveloffset=+2]
59+
60+
include::modules/hcp-scale-the-nodepool.adoc[leveloffset=+2]

modules/hcp-adding-agents.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-adding-agents_{context}"]
7+
= Adding agents to the heterogeneous cluster
8+
9+
You add agents by manually configuring the machine to boot with a live ISO. You can download the live ISO and use it to boot a bare-metal node or a virtual machine. On boot, the node communicates with the `assisted-service` and registers as an agent in the same namespace as the `InfraEnv` resource. When each agent is created, you can optionally set its `installation_disk_id` and `hostname` parameters in the specifications. When you are done, approve it to indicate that the agent is ready for use.
10+
11+
.Procedure
12+
13+
. Obtain a list of agents by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
oc -n <hosted_control_plane_namespace> get agents
18+
----
19+
+
20+
.Example output
21+
----
22+
NAME CLUSTER APPROVED ROLE STAGE
23+
86f7ac75-4fc4-4b36-8130-40fa12602218 auto-assign
24+
e57a637f-745b-496e-971d-1abbf03341ba auto-assign
25+
----
26+
27+
. Patch an agent by running the following command:
28+
+
29+
[source,terminal]
30+
----
31+
oc -n <hosted_control_plane_namespace> patch agent 86f7ac75-4fc4-4b36-8130-40fa12602218 -p '{"spec":{"installation_disk_id":"/dev/sda","approved":true,"hostname":"worker-0.example.krnl.es"}}' --type merge
32+
----
33+
34+
. Patch the second agent by running the following command:
35+
+
36+
[source,terminal]
37+
----
38+
oc -n <hosted_control_plane_namespace> patch agent 23d0c614-2caa-43f5-b7d3-0b3564688baa -p '{"spec":{"installation_disk_id":"/dev/sda","approved":true,"hostname":"worker-1.example.krnl.es"}}' --type merge
39+
----
40+
41+
. Check the agent approval status by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
oc -n <hosted_control_plane_namespace> get agents
46+
----
47+
+
48+
.Example output
49+
----
50+
NAME CLUSTER APPROVED ROLE STAGE
51+
86f7ac75-4fc4-4b36-8130-40fa12602218 true auto-assign
52+
e57a637f-745b-496e-971d-1abbf03341ba true auto-assign
53+
----
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-create-heterogeneous-nodepools_{context}"]
7+
= Creating heterogeneous node pools
8+
9+
You create heterogeneous node pools by using the `NodePool` custom resource (CR).
10+
11+
.Procedure
12+
13+
* To define a `NodePool` CR, create a YAML file similar to the following example:
14+
+
15+
[source,yaml]
16+
----
17+
envsubst <<"EOF" | oc apply -f -
18+
apiVersion:apiVersion: hypershift.openshift.io/v1beta1
19+
kind: NodePool
20+
metadata:
21+
name: <hosted_cluster_name>
22+
namespace: <clusters_namespace>
23+
spec:
24+
arch: <arch_ppc64le>
25+
clusterName: <hosted_cluster_name>
26+
management:
27+
autoRepair: false
28+
upgradeType: InPlace
29+
nodeDrainTimeout: 0s
30+
nodeVolumeDetachTimeout: 0s
31+
platform:
32+
agent:
33+
agentLabelSelector:
34+
matchLabels:
35+
inventory.agent-install.openshift.io/cpu-architecture: <arch_ppc64le> <1>
36+
type: Agent
37+
release:
38+
image: quay.io/openshift-release-dev/ocp-release:<ocp_release>
39+
replicas: 0
40+
EOF
41+
----
42+
+
43+
<1> This selector block is selects the agents that match the specified label. To create a node pool of architecture `ppc64le` with zero replicas, specify `ppc64le`. This ensures that it selects only agents from `ppc64le` architecture when it scales.

modules/hcp-create-infraenv.adoc

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-create-infraenv_{context}"]
7+
= Creating infrastructure environment resources
8+
9+
For heterogeneous node pools, you must create an `infraEnv` custom resource (CR) for each architecture. For example, for node pools with `x86_64` and `ppc64le` architectures, create an `InfraEnv` CR for `x86_64` and `ppc64le`.
10+
11+
[NOTE]
12+
====
13+
Before proceeding, make sure that the operating system (OS) images for both `x86_64` and `ppc64le` architectures are added to the `AgentServiceConfig` resource. After this, you can use the `InfraEnv` resources to get the minimal ISO image.
14+
====
15+
16+
.Procedure
17+
18+
. Create the `InfraEnv` resource with `x86_64` architecture for heterogeneous node pools by running the following command:
19+
+
20+
[source,yaml]
21+
----
22+
$ envsubst <<"EOF" | oc apply -f -
23+
apiVersion: agent-install.openshift.io/v1beta1
24+
kind: InfraEnv
25+
metadata:
26+
name: <hosted_cluster_name>-<arch_x86> <1> <2>
27+
namespace: <hosted_control_plane_namespace> <3>
28+
spec:
29+
cpuArchitecture: <arch_x86>
30+
pullSecretRef:
31+
name: pull-secret
32+
sshAuthorizedKey: <ssh_pub_key> <4>
33+
EOF
34+
----
35+
+
36+
<1> The hosted cluster name.
37+
<2> The `x86_64` architecture.
38+
<3> The hosted control plane namespace.
39+
<4> The ssh public key.
40+
41+
. Create the `InfraEnv` resource with `ppc64le` architecture for heterogeneous node pools by running the following command:
42+
+
43+
[source,yaml]
44+
----
45+
envsubst <<"EOF" | oc apply -f -
46+
apiVersion: agent-install.openshift.io/v1beta1
47+
kind: InfraEnv
48+
metadata:
49+
name: <hosted_cluster_name>-<arch_ppc64le> <1> <2>
50+
namespace: <hosted_control_plane_namespace> <3>
51+
spec:
52+
cpuArchitecture: <arch_ppc64le>
53+
pullSecretRef:
54+
name: pull-secret
55+
sshAuthorizedKey: <ssh_pub_key> <4>
56+
EOF
57+
----
58+
+
59+
<1> The hosted cluster name.
60+
<2> The `ppc64le` architecture.
61+
<3> The hosted control plane namespace.
62+
<4> The ssh public key.
63+
64+
. To verify that the `InfraEnv` resources are created successfully run the following commands:
65+
66+
** Verify that the `x86_64` `InfraEnv` resource is created successfully:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc describe InfraEnv <hosted_cluster_name>-<arch_x86>
71+
----
72+
+
73+
** Verify that the `ppc64le` `InfraEnv` resource is created successfully:
74+
+
75+
[source,terminal]
76+
----
77+
$ oc describe InfraEnv <hosted_cluster_name>-<arch_ppc64le>
78+
----
79+
80+
. Generate a live ISO that allows either a virtual machine or a bare-metal machine to join as agents by running the following commands:
81+
+
82+
.. Generate a live ISO for `x86_64`:
83+
+
84+
[source,terminal]
85+
----
86+
$ oc -n <hosted_control_plane_namespace> get InfraEnv <hosted_cluster_name>-<arch_x86> -ojsonpath="{.status.isoDownloadURL}"
87+
----
88+
+
89+
.. Generate a live ISO for `ppc64le`:
90+
+
91+
[source,terminal]
92+
----
93+
$ oc -n <hosted_control_plane_namespace> get InfraEnv <hosted_cluster_name>-<arch_ppc64le> -ojsonpath="{.status.isoDownloadURL}"
94+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following module:
2+
//
3+
// * hosted_control_planes/hcp-deploy/modules/hcp-ibm-power-create-heterogeneous-nodepools-agent-hc.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="hcp-ibm-power-create-heterogeneous-nodepools-agent-hc-con_{context}"]
7+
= About creating heterogeneous node pools on agent hosted clusters
8+
9+
A node pool is a group of nodes within a cluster that share the same configuration. Heterogeneous node pools are pools that have different configurations, allowing you to create pools optimized for various workloads.
10+
11+
You can create heterogeneous node pools on the agent platform. It enables clusters to run diverse machine types, for example, `x86_64` or `ppc64le`, within a single hosted cluster.
12+
13+
To create a heterogeneous node pool, perform the following general steps, as described in the following sections:
14+
15+
* Create an `AgentServiceConfig` custom resource (CR) that informs the Operator how much storage is needed for components such as the database and filesystem. The CR also defines which {product-title} versions to maintain.
16+
* Create an agent cluster.
17+
* Create the heterogeneous node pool.
18+
* Configure DNS for hosted control planes
19+
* Create an `InfraEnv` custom resource (CR) for each architecture.
20+
* Add agents to the heterogeneous cluster.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-ibm-power-create-heterogeneous-nodepools-agent-hc_{context}"]
7+
= Creating the AgentServiceConfig custom resource
8+
To create heterogeneous node pools on an agent hosted cluster, you first need to create the `AgentServiceConfig` CR with two heterogeneous architecture operating system (OS) images.
9+
10+
.Procedure
11+
12+
* Run the following command:
13+
+
14+
[source,terminal]
15+
----
16+
$ envsubst <<"EOF" | oc apply -f -
17+
apiVersion: agent-install.openshift.io/v1beta1
18+
kind: AgentServiceConfig
19+
metadata:
20+
name: agent
21+
spec:
22+
databaseStorage:
23+
accessModes:
24+
- ReadWriteOnce
25+
resources:
26+
requests:
27+
storage: <db_volume_name> <1>
28+
filesystemStorage:
29+
accessModes:
30+
- ReadWriteOnce
31+
resources:
32+
requests:
33+
storage: <fs_volume_name> <2>
34+
osImages:
35+
- openshiftVersion: <ocp_version> <3>
36+
version: <ocp_release_version_x86> <4>
37+
url: <iso_url_x86> <5>
38+
rootFSUrl: <root_fs_url_x8> <6>
39+
cpuArchitecture: <arch_x86> <7>
40+
- openshiftVersion: <ocp_version> <8>
41+
version: <ocp_release_version_ppc64le> <9>
42+
url: <iso_url_ppc64le> <10>
43+
rootFSUrl: <root_fs_url_ppc64le> <11>
44+
cpuArchitecture: <arch_ppc64le> <12>
45+
EOF
46+
----
47+
+
48+
<1> Specify the {mce} `agentserviceconfig` config, database volume name.
49+
<2> Specify the {mce-short} `agentserviceconfig` config, filesystem volume name.
50+
<3> Specify the current version of {product-title}.
51+
<4> Specify the current {product-title} release version for x86.
52+
<5> Specify the ISO URL for x86.
53+
<6> Specify the root filesystem URL for X86.
54+
<7> Specify the CPU architecture for x86.
55+
<8> Specify the current {product-title} version.
56+
<9> Specify the {product-title} release version for `ppc64le`.
57+
<10> Specify the ISO URL for `ppc64le`.
58+
<11> Specify the root filesystem URL for `ppc64le`.
59+
<12> Specify the CPU architecture for `ppc64le`.
60+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="hcp-ibm-power-heterogeneous-nodepools-agent-hc-dns_{context}"]
7+
= DNS configuration for hosted control planes
8+
9+
Domain Name Service (DNS) configuration for hosted control planes enables external clients to reach ingress controllers so that they can route traffic to internal components. Configuring this setting ensures that traffic is routed to either `ppc64le` or `x86_64` compute node.
10+
11+
You can point an `*.apps.<cluster_name>` record to either of the compute nodes where the ingress application is hosted. Or, if you are able to set up a load balancer on top of the compute nodes, point this record to this load balancer. When you are creating a heterogeneous node pool, make sure the compute nodes can reach each other or keep them in the same network.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-ibm-power-heterogeneous-nodepools-create-agent-cluster_{context}"]
7+
= Create an agent cluster
8+
9+
An agent cluster is a cluster that is managed and provisioned using an agent-based approach. An agent cluster can utilize heterogeneous node pools, allowing for different types of worker nodes to be used within the same cluster.
10+
11+
.Prerequisites
12+
13+
* You used a multi-architecture release image to enable support for heterogeneous node pools when creating a hosted cluster. Find the latest multi-architecture images on the link:https://multi.ocp.releases.ci.openshift.org/[Multi-arch release images] page.
14+
15+
.Procedure
16+
17+
. Create an environment variable for the cluster namespace by running the following command:
18+
+
19+
[source,terminal]
20+
----
21+
$ export CLUSTERS_NAMESPACE=<hosted_cluster_namespace>
22+
----
23+
24+
. Create an environment variable for the machine classless inter-domain routing (CIDR) notation by running the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ export MACHINE_CIDR=192.168.122.0/24
29+
----
30+
// Typically the namespace is created by the hypershift-operator
31+
// but agent cluster creation generates a capi-provider role that
32+
// needs the namespace to already exist
33+
34+
. Create the hosted control namespace by running the following command:
35+
+
36+
[source,terminal]
37+
----
38+
$ oc create ns <hosted_control_plane_namespace>
39+
----
40+
41+
. Create the cluster by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ hcp create cluster agent \
46+
--name=<hosted_cluster_name> \// <1>
47+
--pull-secret=<pull_secret_file> \// <2>
48+
--agent-namespace=<hosted_control_plane_namespace> \// <3>
49+
--base-domain=<basedomain> \// <4>
50+
--api-server-address=api.<hosted_cluster_name>.<basedomain> \
51+
--release-image=quay.io/openshift-release-dev/ocp-release:<ocp_release> <5>
52+
----
53+
+
54+
<1> Specify the hosted cluster name.
55+
<2> Specify the pull secret file path.
56+
<3> Specify the namespace for the hosted control plane.
57+
<4> Specify the base domain for the hosted cluster.
58+
<5> Specify the current {product-title} release version.

0 commit comments

Comments
 (0)