1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/hcp-create-infraenv.adoc

95 lines
3.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
:_mod-docs-content-type: PROCEDURE
[id="hcp-create-infraenv_{context}"]
= Creating infrastructure environment resources
For heterogeneous node pools, you must create an `infraEnv` custom resource (CR) for each architecture. This configuration ensures that the correct architecture-specific operating system and boot artifacts get used during the node provisioning process. For example, for node pools with `x86_64` and `ppc64le` architectures, create an `InfraEnv` CR for `x86_64` and `ppc64le`.
[NOTE]
====
Before starting the procedure, ensure that you add the operating system images for both `x86_64` and `ppc64le` architectures to the `AgentServiceConfig` resource. After this, you can use the `InfraEnv` resources to get the minimal ISO image.
====
.Procedure
. Create the `InfraEnv` resource with `x86_64` architecture for heterogeneous node pools by running the following command:
+
[source,yaml]
----
$ envsubst <<"EOF" | oc apply -f -
apiVersion: agent-install.openshift.io/v1beta1
kind: InfraEnv
metadata:
name: <hosted_cluster_name>-<arch_x86> <1> <2>
namespace: <hosted_control_plane_namespace> <3>
spec:
cpuArchitecture: <arch_x86>
pullSecretRef:
name: pull-secret
sshAuthorizedKey: <ssh_pub_key> <4>
EOF
----
+
<1> The hosted cluster name.
<2> The `x86_64` architecture.
<3> The hosted control plane namespace.
<4> The SSH public key.
. Create the `InfraEnv` resource with `ppc64le` architecture for heterogeneous node pools by running the following command:
+
[source,yaml]
----
envsubst <<"EOF" | oc apply -f -
apiVersion: agent-install.openshift.io/v1beta1
kind: InfraEnv
metadata:
name: <hosted_cluster_name>-<arch_ppc64le> <1> <2>
namespace: <hosted_control_plane_namespace> <3>
spec:
cpuArchitecture: <arch_ppc64le>
pullSecretRef:
name: pull-secret
sshAuthorizedKey: <ssh_pub_key> <4>
EOF
----
+
<1> The hosted cluster name.
<2> The `ppc64le` architecture.
<3> The hosted control plane namespace.
<4> The SSH public key.
. Verify the successful creation of the `InfraEnv` resources by running the following commands:
** Verify the successful creation of the `x86_64` `InfraEnv` resource:
+
[source,terminal]
----
$ oc describe InfraEnv <hosted_cluster_name>-<arch_x86>
----
+
** Verify the successful creation of the `ppc64le` `InfraEnv` resource:
+
[source,terminal]
----
$ oc describe InfraEnv <hosted_cluster_name>-<arch_ppc64le>
----
. Generate a live ISO that allows either a virtual machine or a bare-metal machine to join as agents by running the following commands:
+
.. Generate a live ISO for `x86_64`:
+
[source,terminal]
----
$ oc -n <hosted_control_plane_namespace> get InfraEnv <hosted_cluster_name>-<arch_x86> -ojsonpath="{.status.isoDownloadURL}"
----
+
.. Generate a live ISO for `ppc64le`:
+
[source,terminal]
----
$ oc -n <hosted_control_plane_namespace> get InfraEnv <hosted_cluster_name>-<arch_ppc64le> -ojsonpath="{.status.isoDownloadURL}"
----