Skip to content

Commit aba8843

Browse files
committed
[OSDOCS-15316]: Creating a hosted cluster on bare metal
1 parent a144257 commit aba8843

File tree

7 files changed

+108
-44
lines changed

7 files changed

+108
-44
lines changed

hosted_control_planes/hcp-deploy/hcp-deploy-bm.adoc

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The {mce-short} supports only the default `local-cluster`, which is a hub cluste
1919

2020
A _hosted cluster_ is an {product-title} cluster with its API endpoint and control plane that are hosted on the management cluster. The hosted cluster includes the control plane and its corresponding data plane. You can use the {mce-short} console or the hosted control plane command-line interface, `hcp`, to create a hosted cluster.
2121

22-
The hosted cluster is automatically imported as a managed cluster. If you want to disable this automatic import feature, see _Disabling the automatic import of hosted clusters into {mce-short}_.
22+
The hosted cluster is automatically imported as a managed cluster. If you want to disable this automatic import feature, see "Disabling the automatic import of hosted clusters into {mce-short}".
2323

2424
include::modules/hcp-bm-prepare.adoc[leveloffset=+1]
2525
include::modules/hcp-bm-prereqs.adoc[leveloffset=+2]
@@ -48,23 +48,47 @@ include::modules/hcp-bm-infra-reqs.adoc[leveloffset=+2]
4848
include::modules/hcp-bm-dns.adoc[leveloffset=+1]
4949
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
5050

51-
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
51+
[id="hcp-bm-create-hc"]
52+
== Creating a hosted cluster on bare metal
53+
54+
When you create a hosted cluster with the Agent platform, the HyperShift Operator installs the Agent Cluster API provider in the hosted control plane namespace. You can create a hosted cluster on bare metal or you can import one.
55+
56+
include::modules/hcp-bm-hc.adoc[leveloffset=+2]
5257

5358
[role="_additional-resources"]
5459
.Additional resources
5560
* xref:../../hosted_control_planes/hcp-import.adoc[Manually importing a hosted cluster]
61+
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#configure-hosted-disconnected-digest-image[Extracting the {product-title} release image digest]
5662

5763
include::modules/hcp-bm-hc-console.adoc[leveloffset=+2]
5864

59-
.Next steps
60-
* To access the web console, see xref:../../web_console/web-console.adoc#web-console-overview[Accessing the web console].
65+
[role="_additional-resources"]
66+
.Additional resources
67+
* xref:../../web_console/web-console.adoc#web-console-overview[Accessing the web console]
6168

6269
include::modules/hcp-bm-hc-mirror.adoc[leveloffset=+2]
6370

64-
.Next steps
65-
* To create credentials that you can reuse when you create a hosted cluster with the console, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#creating-a-credential-for-an-on-premises-environment[Creating a credential for an on-premises environment].
66-
* To access a hosted cluster, see xref:../../hosted_control_planes/hcp-manage/hcp-manage-bm.adoc#hcp-bm-access_hcp-manage-bm[Accessing the hosted cluster].
67-
* To add hosts to the host inventory by using the Discovery Image, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#add-host-host-inventory[Adding hosts to the host inventory by using the Discovery Image].
68-
* To extract the {product-title} release image digest, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#configure-hosted-disconnected-digest-image[Extracting the {product-title} release image digest].
71+
[role="_additional-resources"]
72+
.Additional resources
73+
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#creating-a-credential-for-an-on-premises-environment[Creating a credential for an on-premises environment]
74+
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#add-host-host-inventory[Adding hosts to the host inventory by using the Discovery Image]
75+
76+
include::modules/hcp-bm-infraenv.adoc[leveloffset=+1]
6977

7078
include::modules/hcp-bm-verify.adoc[leveloffset=+1]
79+
80+
include::modules/hcp-bm-access.adoc[leveloffset=+1]
81+
include::modules/hcp-bm-scale-np.adoc[leveloffset=+1]
82+
include::modules/hcp-bm-add-np.adoc[leveloffset=+2]
83+
include::modules/hcp-bm-autoscale.adoc[leveloffset=+2]
84+
include::modules/hcp-bm-autoscale-disable.adoc[leveloffset=+2]
85+
86+
[role="_additional-resources"]
87+
.Additional resources
88+
* xref:../../hosted_control_planes/hcp-troubleshooting.adoc#scale-down-data-plane_hcp-troubleshooting[Scaling down the data plane to zero]
89+
90+
include::modules/hcp-bm-ingress.adoc[leveloffset=+1]
91+
92+
[role="_additional-resources"]
93+
.Additional resources
94+
* xref:../../networking/networking_operators/metallb-operator/about-metallb.adoc#about-metallb_about-metallb[About MetalLB and the MetalLB Operator]

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@ include::modules/hcp-ibm-power-infra-reqs.adoc[leveloffset=+1]
3737
include::modules/hcp-ibm-power-dns.adoc[leveloffset=+1]
3838
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
3939

40-
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
40+
[id="hcp-bm-create-hc-ibm-power"]
41+
== Creating a hosted cluster on bare metal
42+
43+
When you create a hosted cluster with the Agent platform, the HyperShift Operator installs the Agent Cluster API provider in the hosted control plane namespace. You can create a hosted cluster on bare metal or you can import one.
44+
45+
include::modules/hcp-bm-hc.adoc[leveloffset=+2]
46+
47+
[role="_additional-resources"]
48+
.Additional resources
49+
* xref:../../hosted_control_planes/hcp-import.adoc[Manually importing a hosted cluster]
50+
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#configure-hosted-disconnected-digest-image[Extracting the {product-title} release image digest]
4151

4252
[id="hcp-ibm-power-heterogeneous-nodepools_{context}"]
4353
== Creating heterogeneous node pools on agent hosted clusters

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@ include::modules/hcp-ibm-z-infra-reqs.adoc[leveloffset=+1]
4343
include::modules/hcp-ibm-z-dns.adoc[leveloffset=+1]
4444
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
4545

46-
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
46+
[id="hcp-bm-create-hc-ibm-z"]
47+
== Creating a hosted cluster on bare metal
48+
49+
When you create a hosted cluster with the Agent platform, the HyperShift Operator installs the Agent Cluster API provider in the hosted control plane namespace. You can create a hosted cluster on bare metal or you can import one.
50+
51+
include::modules/hcp-bm-hc.adoc[leveloffset=+2]
4752

4853
[role="_additional-resources"]
4954
.Additional resources
50-
55+
* xref:../../hosted_control_planes/hcp-import.adoc[Manually importing a hosted cluster]
56+
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#configure-hosted-disconnected-digest-image[Extracting the {product-title} release image digest]
5157
* xref:../../hosted_control_planes/hcp-deploy/hcp-deploy-bm.adoc#hcp-bm-hc-console_hcp-deploy-bm[Creating a hosted cluster on bare metal by using the console]
5258

53-
include::modules/hcp-ibm-z-infraenv.adoc[leveloffset=+1]
54-
5559
[id="hcp-ibm-z-add-agents"]
5660
== Adding {ibm-z-title} agents to the InfraEnv resource
5761

hosted_control_planes/hcp-deploy/hcp-deploy-non-bm.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ include::modules/hcp-bm-hc-mirror.adoc[leveloffset=+2]
7474

7575
* To create credentials that you can reuse when you create a hosted cluster with the console, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#creating-a-credential-for-an-on-premises-environment[Creating a credential for an on-premises environment].
7676
77-
* To access a hosted cluster, see xref:../../hosted_control_planes/hcp-manage/hcp-manage-bm.adoc#hcp-bm-access_hcp-manage-bm[Accessing the hosted cluster].
77+
* To access a hosted cluster, see xref:../../hosted_control_planes/hcp-manage/hcp-deploy-bm.adoc#hcp-bm-access_hcp-deploy-bm[Accessing the hosted cluster].
7878
7979
* To add hosts to the host inventory by using the Discovery Image, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#add-host-host-inventory[Adding hosts to the host inventory by using the Discovery Image].
8080

hosted_control_planes/hcp-manage/hcp-manage-bm.adoc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,9 @@ toc::[]
88

99
After you deploy {hcp} on bare metal, you can manage a hosted cluster by completing the following tasks.
1010

11-
include::modules/hcp-bm-access.adoc[leveloffset=+1]
12-
include::modules/hcp-bm-scale-np.adoc[leveloffset=+1]
13-
include::modules/hcp-bm-add-np.adoc[leveloffset=+2]
14-
include::modules/hcp-bm-autoscale.adoc[leveloffset=+2]
15-
include::modules/hcp-bm-autoscale-disable.adoc[leveloffset=+2]
16-
17-
[role="_additional-resources"]
18-
.Additional resources
19-
20-
* xref:../../hosted_control_planes/hcp-troubleshooting.adoc#scale-down-data-plane_hcp-troubleshooting[Scaling down the data plane to zero]
21-
22-
include::modules/hcp-bm-ingress.adoc[leveloffset=+1]
23-
24-
[role="_additional-resources"]
25-
.Additional resources
26-
27-
* xref:../../networking/networking_operators/metallb-operator/about-metallb.adoc#about-metallb_about-metallb[About MetalLB and the MetalLB Operator]
28-
2911
include::modules/hcp-bm-machine-health.adoc[leveloffset=+1]
3012
include::modules/hcp-bm-machine-health-disable.adoc[leveloffset=+1]
3113

3214
[role="_additional-resources"]
3315
.Additional resources
34-
3516
* xref:../../machine_management/deploying-machine-health-checks.adoc#deploying-machine-health-checks[Deploying machine health checks]

modules/hcp-bm-hc.adoc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
:_mod-docs-content-type: PROCEDURE
88
[id="hcp-bm-hc_{context}"]
9-
= Creating a hosted cluster on bare metal
9+
= Creating a hosted cluster by using the CLI
1010

11-
When you create a hosted cluster with the Agent platform, HyperShift installs the Agent Cluster API provider in the hosted control plane namespace. You can create a hosted cluster on bare metal or import one.
11+
To create a hosted cluster by using the command-line interface (CLI), complete the following steps.
1212

13-
As you create a hosted cluster, keep the following guidelines in mind:
13+
.Prerequisites
1414

1515
- Each hosted cluster must have a cluster-wide unique name. A hosted cluster name cannot be the same as any existing managed cluster in order for {mce-short} to manage it.
1616
@@ -20,6 +20,8 @@ As you create a hosted cluster, keep the following guidelines in mind:
2020
2121
- The most common service publishing strategy is to expose services through a load balancer. That strategy is the preferred method for exposing the Kubernetes API server. If you create a hosted cluster by using the web console or by using {rh-rhacm-title}, to set a publishing strategy for a service besides the Kubernetes API server, you must manually specify the `servicePublishingStrategy` information in the `HostedCluster` custom resource.
2222
23+
- Ensure that you meet the requirements described in "Preparing to deploy {hcp} on bare metal", which includes requirements related to infrastructure, firewalls, ports, and services.
24+
2325
.Procedure
2426

2527
. Create the hosted control plane namespace by entering the following command:
@@ -29,9 +31,9 @@ As you create a hosted cluster, keep the following guidelines in mind:
2931
$ oc create ns <hosted_cluster_namespace>-<hosted_cluster_name>
3032
----
3133
+
32-
Replace `<hosted_cluster_namespace>` with your hosted cluster namespace name, for example, `clusters`. Replace `<hosted_cluster_name>` with your hosted cluster name.
34+
Replace `<hosted_cluster_namespace>` with your hosted cluster namespace name, for example, `my-hosted-ns`. Replace `<hosted_cluster_name>` with your hosted cluster name, for example, `my-hosted-cluster`. Typically, the namespace is created by the HyperShift Operator, but during the hosted cluster creation process on bare metal, a Cluster API provider role is generated that needs the namespace to already exist.
3335

34-
. Verify that you have a default storage class configured for your cluster. Otherwise, you might see pending PVCs. Run the following command:
36+
. Verify that you have a default storage class configured for your cluster by running the following command. Otherwise, you might see pending PVCs.
3537
+
3638
[source,terminal]
3739
----
@@ -45,20 +47,20 @@ $ hcp create cluster agent \
4547
--ssh-key <path_to_ssh_public_key> \// <7>
4648
--namespace <hosted_cluster_namespace> \// <8>
4749
--control-plane-availability-policy HighlyAvailable \// <9>
48-
--release-image=quay.io/openshift-release-dev/ocp-release:<ocp_release_image> \// <10>
50+
--release-image=quay.io/openshift-release-dev/ocp-release:<ocp_release_image>-multi \// <10>
4951
--node-pool-replicas <node_pool_replica_count> <11>
5052
----
5153
+
52-
<1> Specify the name of your hosted cluster, for instance, `example`.
54+
<1> Specify the name of your hosted cluster, for instance, `my-hosted-cluster`.
5355
<2> Specify the path to your pull secret, for example, `/user/name/pullsecret`.
54-
<3> Specify your hosted control plane namespace, for example, `clusters-example`. Ensure that agents are available in this namespace by using the `oc get agent -n <hosted_control_plane_namespace>` command.
56+
<3> Specify your hosted control plane namespace, for example, `my-hcp-ns`. Ensure that agents are available in this namespace by using the `oc get agent -n <hosted_control_plane_namespace>` command.
5557
<4> Specify your base domain, for example, `krnl.es`.
5658
<5> The `--api-server-address` flag defines the IP address that is 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.
5759
<6> Specify the etcd storage class name, for example, `lvm-storageclass`.
5860
<7> Specify the path to your SSH public key. The default file path is `~/.ssh/id_rsa.pub`.
59-
<8> Specify your hosted cluster namespace.
61+
<8> Specify your hosted cluster namespace, for example, `my-hosted-ns`.
6062
<9> Specify the availability policy for the hosted control plane components. Supported options are `SingleReplica` and `HighlyAvailable`. The default value is `HighlyAvailable`.
61-
<10> Specify the supported {product-title} version that you want to use, for example, `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_.
63+
<10> Specify the supported {product-title} version that you want to use, for example, `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".
6264
<11> Specify the node pool replica count, for example, `3`. You must specify the replica count as `0` or greater to create the same number of replicas. Otherwise, no node pools are created.
6365

6466
+

modules/hcp-bm-infraenv.adoc

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-bm.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-bm-infraenv_{context}"]
7+
= Creating an InfraEnv resource for a hosted cluster on bare metal
8+
9+
An `InfraEnv` is an environment where hosts that are booted with PXE images can join as agents. In this case, the agents are created in the same namespace as your hosted control plane.
10+
11+
.Procedure
12+
13+
. Create a YAML file to contain the configuration. See the following example:
14+
+
15+
[source,yaml]
16+
----
17+
apiVersion: agent-install.openshift.io/v1beta1
18+
kind: InfraEnv
19+
metadata:
20+
name: <hosted_cluster_name>
21+
namespace: <hosted_control_plane_namespace>
22+
spec:
23+
cpuArchitecture: s390x
24+
pullSecretRef:
25+
name: pull-secret
26+
sshAuthorizedKey: <ssh_public_key>
27+
----
28+
29+
. Save the file as `infraenv-config.yaml`.
30+
31+
. Apply the configuration by entering the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ oc apply -f infraenv-config.yaml
36+
----
37+
38+
. To fetch the URL to download the PXE images, such as, `initrd.img`, `kernel.img`, or `rootfs.img`, which allows {ibm-z-title} machines to join as agents, enter the following command:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc -n <hosted_control_plane_namespace> get InfraEnv <hosted_cluster_name> -o json
43+
----

0 commit comments

Comments
 (0)