Skip to content

Commit 45dbb32

Browse files
authored
Merge pull request #108046 from lahinson/osdocs-18554-cqa-hcp-aws-prereqs
[OSDOCS-18554]: CQA: Preparing to deploy HCP on AWS
2 parents ebc9b84 + d221625 commit 45dbb32

8 files changed

Lines changed: 116 additions & 78 deletions

hosted_control_planes/hcp-deploy/hcp-deploy-aws.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ include::modules/hcp-aws-prepare.adoc[leveloffset=+1]
1717

1818
include::modules/hcp-aws-prereqs.adoc[leveloffset=+2]
1919

20-
include::modules/hcp-access-hc-aws-hcpcli.adoc[leveloffset=+1]
21-
2220
[role="_additional-resources"]
2321
.Additional resources
22+
2423
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.16/html/clusters/cluster_mce_overview#ansible-config-hosted-cluster[Configuring Ansible Automation Platform jobs to run on hosted clusters]
24+
2525
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.16/html/clusters/cluster_mce_overview#advanced-config-engine[Advanced configuration]
26+
2627
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.16/html/clusters/cluster_mce_overview#enable-cim[Enabling the central infrastructure management service]
2728
2829
* xref:../../hosted_control_planes/hcp-prepare/hcp-enable-disable.adoc#hcp-enable-manual_hcp-enable-disable[Manually enabling the {hcp} feature]
@@ -31,13 +32,13 @@ include::modules/hcp-access-hc-aws-hcpcli.adoc[leveloffset=+1]
3132
3233
* xref:../../networking/networking_operators/sr-iov-operator/configuring-sriov-operator.adoc#sriov-operator-hosted-control-planes_configuring-sriov-operator[Deploying the SR-IOV Operator for {hcp}]
3334
34-
include::modules/hcp-aws-create-secret-s3.adoc[leveloffset=+1]
35+
include::modules/hcp-aws-create-secret-s3.adoc[leveloffset=+2]
3536

36-
include::modules/hcp-aws-create-public-zone.adoc[leveloffset=+1]
37+
include::modules/hcp-aws-create-public-zone.adoc[leveloffset=+2]
3738

38-
include::modules/hcp-aws-create-role-sts-creds.adoc[leveloffset=+1]
39+
include::modules/hcp-aws-create-role-sts-creds.adoc[leveloffset=+2]
3940

40-
include::modules/hcp-aws-enable-private-link.adoc[leveloffset=+1]
41+
include::modules/hcp-aws-enable-private-link.adoc[leveloffset=+2]
4142

4243
include::modules/hcp-aws-enable-ext-dns.adoc[leveloffset=+1]
4344

@@ -57,7 +58,7 @@ include::modules/hcp-aws-deploy-hc.adoc[leveloffset=+1]
5758
.Additional resources
5859
* xref:../../hosted_control_planes/hcp-deploy/hcp-deploy-aws.adoc#hcp-enable-arm-amd_hcp-deploy-aws[Running hosted clusters on an ARM64 architecture]
5960
60-
include::modules/hcp-access-hc-aws.adoc[leveloffset=+2]
61+
include::modules/hcp-access-hc-aws.adoc[leveloffset=+1]
6162

6263
include::modules/hcp-access-pub-hc-aws.adoc[leveloffset=+2]
6364

modules/hcp-aws-create-public-zone.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
[id="hcp-aws-create-public-zone_{context}"]
77
= Creating a routable public zone for hosted clusters
88

9-
To access applications in your hosted clusters, you must configure the routable public zone. If the public zone exists, skip this step. Otherwise, the public zone affects the existing functions.
9+
[role="_abstract"]
10+
In order to access applications in your hosted clusters, you must configure the routable public zone.
11+
12+
If the public zone exists, skip this step. Otherwise, the public zone affects the existing functions.
1013

1114
.Procedure
1215

@@ -15,8 +18,8 @@ To access applications in your hosted clusters, you must configure the routable
1518
[source,terminal]
1619
----
1720
$ aws route53 create-hosted-zone \
18-
--name <basedomain> \// <1>
21+
--name <basedomain> \
1922
--caller-reference $(whoami)-$(date --rfc-3339=date)
2023
----
2124
+
22-
<1> Replace `<basedomain>` with your base domain, for example, `www.example.com`.
25+
Replace `<basedomain>` with your base domain, for example, `www.example.com`.

modules/hcp-aws-create-role-sts-creds.adoc

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="hcp-aws-create-role-sts-creds_{context}"]
77
= Creating an {aws-short} IAM role and STS credentials
88

9-
Before creating a hosted cluster on {aws-first}, you must create an {aws-short} IAM role and STS credentials.
9+
[role="_abstract"]
10+
Before you create a hosted cluster on {aws-first}, you must create an {aws-short} IAM role and STS credentials.
1011

1112
.Procedure
1213

@@ -23,7 +24,7 @@ $ aws sts get-caller-identity --query "Arn" --output text
2324
arn:aws:iam::1234567890:user/<aws_username>
2425
----
2526
+
26-
Use this output as the value for `<arn>` in the next step.
27+
Use this output as the value for the `<arn>` value in the next step.
2728

2829
. Create a JSON file that contains the trust relationship configuration for your role. See the following example:
2930
+
@@ -35,26 +36,32 @@ Use this output as the value for `<arn>` in the next step.
3536
{
3637
"Effect": "Allow",
3738
"Principal": {
38-
"AWS": "<arn>" <1>
39+
"AWS": "<arn>"
3940
},
4041
"Action": "sts:AssumeRole"
4142
}
4243
]
4344
}
4445
----
45-
<1> Replace `<arn>` with the ARN of your user that you noted in the previous step.
46+
+
47+
Replace `<arn>` with the ARN of your user that you noted in the previous step.
4648

4749
. Create the Identity and Access Management (IAM) role by running the following command:
4850
+
4951
[source,terminal]
5052
----
5153
$ aws iam create-role \
52-
--role-name <name> \// <1>
53-
--assume-role-policy-document file://<file_name>.json \// <2>
54+
--role-name <name> \
55+
--assume-role-policy-document file://<file_name>.json \
5456
--query "Role.Arn"
5557
----
56-
<1> Replace `<name>` with the role name, for example, `hcp-cli-role`.
57-
<2> Replace `<file_name>` with the name of the JSON file you created in the previous step.
58+
+
59+
where:
60+
+
61+
--
62+
`<name>`:: Specifies the role name, for example, `hcp-cli-role`.
63+
`<file_name>`:: Specifies the name of the JSON file you created in the previous step.
64+
--
5865
+
5966
.Example output
6067
[source,terminal]
@@ -197,18 +204,22 @@ arn:aws:iam::820196288204:role/myrole
197204
}
198205
----
199206
200-
. Attach the `policy.json` file to your role by running the following command:
207+
. Attach the `policy.json` file that contains the permissions policies for your role by running the following command:
201208
+
202209
[source,terminal]
203210
----
204211
$ aws iam put-role-policy \
205-
--role-name <role_name> \// <1>
206-
--policy-name <policy_name> \// <2>
207-
--policy-document file://policy.json <3>
212+
--role-name <role_name> \
213+
--policy-name <policy_name> \
214+
--policy-document file://policy.json
208215
----
209-
<1> Replace `<role_name>` with the name of your role.
210-
<2> Replace `<policy_name>` with your policy name.
211-
<3> The `policy.json` file contains the permission policies for your role.
216+
+
217+
where:
218+
+
219+
--
220+
`<role_name>`:: Specifies the name of your role.
221+
`<policy_name>`:: Specifies your policy name.
222+
--
212223
213224
. Retrieve STS credentials in a JSON file named `sts-creds.json` by running the following command:
214225
+

modules/hcp-aws-create-secret-s3.adoc

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,39 @@
66
[id="hcp-aws-create-secret-s3_{context}"]
77
= Creating the {aws-full} S3 bucket and S3 OIDC secret
88

9-
Before you can create and manage hosted clusters on {aws-first}, you must create the S3 bucket and S3 OIDC secret.
9+
[role="_abstract"]
10+
Before you can create and manage a hosted cluster on {aws-first}, you must create the S3 bucket and S3 OIDC secret. These resources provide a place for the cluster to store information about itself and a way for the cluster to prove its identity to {aws-short}.
1011

1112
.Procedure
1213

13-
. Create an S3 bucket that has public access to host OIDC discovery documents for your clusters by running the following commands:
14+
. Create an S3 bucket that has public access to host OIDC discovery documents for your clusters.
15+
16+
.. Enter the following command:
1417
+
1518
[source,terminal]
1619
----
17-
$ aws s3api create-bucket --bucket <bucket_name> \// <1>
18-
--create-bucket-configuration LocationConstraint=<region> \// <2>
20+
$ aws s3api create-bucket --bucket <bucket_name> \
21+
--create-bucket-configuration LocationConstraint=<region> \
1922
--region <region> <2>
2023
----
21-
<1> Replace `<bucket_name>` with the name of the S3 bucket you are creating.
22-
<2> To create the bucket in a region other than the `us-east-1` region, include this line and replace `<region>` with the region you want to use. To create a bucket in the `us-east-1` region, omit this line.
24+
+
25+
where:
26+
+
27+
--
28+
`<bucket_name>`:: Specifies the name of the S3 bucket you are creating.
29+
`<region>`:: Specifies that you want to create the bucket in a region other than the `us-east-1` region. Include this line and replace `<region>` with the region you want to use. To create a bucket in the `us-east-1` region, omit this line.
30+
--
2331

32+
.. Enter the following command:
2433
+
2534
[source,terminal]
2635
----
27-
$ aws s3api delete-public-access-block --bucket <bucket_name> <1>
36+
$ aws s3api delete-public-access-block --bucket <bucket_name>
2837
----
29-
<1> Replace `<bucket_name>` with the name of the S3 bucket you are creating.
38+
+
39+
Replace `<bucket_name>` with the name of the S3 bucket you are creating.
3040

41+
.. Enter the following command:
3142
+
3243
[source,terminal]
3344
----
@@ -38,20 +49,23 @@ $ echo '{
3849
"Effect": "Allow",
3950
"Principal": "*",
4051
"Action": "s3:GetObject",
41-
"Resource": "arn:aws:s3:::<bucket_name>/*" <1>
52+
"Resource": "arn:aws:s3:::<bucket_name>/*"
4253
}
4354
]
4455
}' | envsubst > policy.json
4556
----
46-
<1> Replace `<bucket_name>` with the name of the S3 bucket you are creating.
57+
+
58+
Replace `<bucket_name>` with the name of the S3 bucket you are creating.
4759

60+
.. Enter the following command:
4861
+
4962
[source,terminal]
5063
----
51-
$ aws s3api put-bucket-policy --bucket <bucket_name> \// <1>
64+
$ aws s3api put-bucket-policy --bucket <bucket_name> \
5265
--policy file://policy.json
5366
----
54-
<1> Replace `<bucket_name>` with the name of the S3 bucket you are creating.
67+
+
68+
Replace `<bucket_name>` with the name of the S3 bucket you are creating.
5569
+
5670
[NOTE]
5771
====

modules/hcp-aws-enable-private-link.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
[id="hcp-aws-enable-private-link_{context}"]
77
= Enabling {aws-short} PrivateLink for {hcp}
88

9-
To provision {hcp} on the {aws-first} with PrivateLink, enable {aws-short} PrivateLink for {hcp}.
9+
[role="_abstract"]
10+
In order to provision {hcp} on the {aws-first} with PrivateLink, you need to enable {aws-short} PrivateLink for {hcp}.
1011

1112
.Procedure
1213

1314
. Create an {aws-short} credential secret for the HyperShift Operator and name it `hypershift-operator-private-link-credentials`. The secret must reside in the managed cluster namespace that is the namespace of the managed cluster being used as the management cluster. If you used `local-cluster`, create the secret in the `local-cluster` namespace.
1415

1516
. See the following table to confirm that the secret contains the required fields:
16-
17+
+
1718
.Required fields for the {aws-short} secret
1819
[options="header"]
1920
|===
@@ -32,8 +33,8 @@ To provision {hcp} on the {aws-first} with PrivateLink, enable {aws-short} Priva
3233
|===
3334

3435

35-
To create an {aws-short} secret, run the following command:
36-
36+
. To create an {aws-short} secret, run the following command:
37+
+
3738
[source,terminal]
3839
----
3940
$ oc create secret generic <secret_name> \
@@ -42,13 +43,12 @@ $ oc create secret generic <secret_name> \
4243
--from-literal=region=<region> -n local-cluster
4344
----
4445

45-
[NOTE]
46-
====
47-
Disaster recovery backup for the secret is not automatically enabled. Run the following command to add the label that enables the `hypershift-operator-private-link-credentials` secret to be backed up for disaster recovery:
46+
47+
. Disaster recovery backup for the secret is not automatically enabled. Run the following command to add the label that enables the `hypershift-operator-private-link-credentials` secret to be backed up for disaster recovery:
48+
+
4849
[source,terminal]
4950
----
5051
$ oc label secret hypershift-operator-private-link-credentials \
5152
-n local-cluster \
5253
cluster.open-cluster-management.io/backup=""
5354
----
54-
====

modules/hcp-aws-prepare.adoc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,5 @@
66
[id="hcp-aws-prepare_{context}"]
77
= Preparing to deploy {hcp} on {aws-short}
88

9-
As you prepare to deploy {hcp} on {aws-first}, consider the following information:
10-
11-
- 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.
12-
13-
- Do not use `clusters` as a hosted cluster name.
14-
15-
- Run the management cluster and workers on the same platform for {hcp}.
16-
17-
- A hosted cluster cannot be created in the namespace of a {mce-short} managed cluster.
9+
[role="_abstract"]
10+
Preparing to deploy {hcp} on {aws-first} involves meeting several prerequisites and creating resources, including an S3 bucket, an OIDC secret, a routable public zone, IAM role and STS credentials.

modules/hcp-aws-prereqs.adoc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="hcp-aws-prereqs_{context}"]
7-
= Prerequisites to configure a management cluster
7+
= Prerequisites to deploy {hcp} on {aws-short}
88

9-
You must have the following prerequisites to configure the management cluster:
9+
[role="_abstract"]
10+
To ensure successful deployment of {hcp} on {aws-first}, your environment must meet the following requirements.
1011

11-
* You have installed the {mce} 2.5 and later on an {product-title} cluster. The {mce-short} is automatically installed when you install {rh-rhacm-first}. The {mce-short} can also be installed without {rh-rhacm} as an Operator from the {product-title} software catalog.
12+
* You installed the {mce} 2.5 and later on an {product-title} cluster. The {mce-short} is automatically installed when you install {rh-rhacm-first}. The {mce-short} can also be installed without {rh-rhacm} as an Operator from the {product-title} software catalog.
1213
1314
* You have at least one managed {product-title} cluster for the {mce-short}. The `local-cluster` is automatically imported in the {mce-short} version 2.5 and later. You can check the status of your hub cluster by running the following command:
1415
+
@@ -17,6 +18,17 @@ You must have the following prerequisites to configure the management cluster:
1718
$ oc get managedclusters local-cluster
1819
----
1920
20-
* You have installed the link:https://aws.amazon.com/cli/[`aws` command-line interface (CLI)].
21+
* You installed the link:https://aws.amazon.com/cli/[`aws` command-line interface (CLI)].
2122
22-
* You have installed the hosted control plane CLI, `hcp`.
23+
* You installed the hosted control plane CLI, `hcp`.
24+
25+
[IMPORTANT]
26+
====
27+
* Run the management cluster and compute nodes on the same platform.
28+
29+
* For each hosted cluster, provide 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.
30+
31+
* Do not use `clusters` as a hosted cluster name.
32+
33+
* Do not create a hosted cluster in the namespace of a {mce-short} managed cluster.
34+
====

modules/hcp-create-private-hc-aws.adoc

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="hcp-create-private-hc-aws_{context}"]
77
= Creating a private hosted cluster on {aws-short}
88

9-
After you enable the `local-cluster` as the hosting cluster, you can deploy a hosted cluster or a private hosted cluster on {aws-first}.
9+
[role="_abstract"]
10+
After you enable the `local-cluster` as the management cluster, you can deploy a hosted cluster or a private hosted cluster on {aws-first}.
1011

1112
By default, hosted clusters are publicly accessible through public DNS and the default router for the management cluster.
1213

@@ -27,27 +28,30 @@ For private clusters on {aws-short}, all communication with the hosted cluster o
2728
[source,terminal]
2829
----
2930
$ hcp create cluster aws \
30-
--name <hosted_cluster_name> \// <1>
31-
--node-pool-replicas=<node_pool_replica_count> \// <2>
32-
--base-domain <basedomain> \// <3>
33-
--pull-secret <path_to_pull_secret> \// <4>
34-
--sts-creds <path_to_sts_credential_file> \// <5>
35-
--region <region> \// <6>
36-
--endpoint-access Private \// <7>
37-
--role-arn <role_name> <8>
31+
--name <hosted_cluster_name> \
32+
--node-pool-replicas=<node_pool_replica_count> \
33+
--base-domain <basedomain> \
34+
--pull-secret <path_to_pull_secret> \
35+
--sts-creds <path_to_sts_credential_file> \
36+
--region <region> \
37+
--endpoint-access Private \
38+
--role-arn <role_name>
3839
----
39-
<1> Specify the name of your hosted cluster, for instance, `example`.
40-
<2> Specify the node pool replica count, for example, `3`.
41-
<3> Specify your base domain, for example, `example.com`.
42-
<4> Specify the path to your pull secret, for example, `/user/name/pullsecret`.
43-
<5> Specify the path to your {aws-short} STS credentials file, for example, `/home/user/sts-creds/sts-creds.json`.
44-
<6> Specify the {aws-short} region name, for example, `us-east-1`.
45-
<7> Defines whether a cluster is public or private.
46-
<8> Specify the Amazon Resource Name (ARN), for example, `arn:aws:iam::820196288204:role/myrole`. For more information about ARN roles, see "Identity and Access Management (IAM) permissions".
4740
+
48-
The following API endpoints for the hosted cluster are accessible through a private DNS zone:
41+
where:
4942
+
5043
--
44+
`<hosted_cluster_name>`:: Specifies the name of your hosted cluster, such as, `example`.
45+
`<node_pool_replica_count>`:: Specifies the node pool replica count, for example, `3`.
46+
`<basedomain>`:: Specifies your base domain, for example, `example.com`.
47+
`<path_to_pull_secret>`:: Specifies the path to your pull secret, for example, `/user/name/pullsecret`.
48+
`<path_to_sts_credential_file>`:: Specifies the path to your {aws-short} STS credentials file, for example, `/home/user/sts-creds/sts-creds.json`.
49+
`<region>`:: Specifies the {aws-short} region name, for example, `us-east-1`.
50+
`Private`:: Specifies that the cluster is private.
51+
`<role_name>`:: Specifies the Amazon Resource Name (ARN), for example, `arn:aws:iam::820196288204:role/myrole`. For more information about ARN roles, see "Identity and Access Management (IAM) permissions".
52+
--
53+
+
54+
The following API endpoints for the hosted cluster are accessible through a private DNS zone:
55+
5156
* `api.<hosted_cluster_name>.hypershift.local`
5257
* `*.apps.<hosted_cluster_name>.hypershift.local`
53-
--

0 commit comments

Comments
 (0)