Skip to content

Commit 084378b

Browse files
authored
Merge pull request #78406 from jneczypor/OSDOCS-10765
OSDOCS-10765: Re-work "Deploying a cluster" Tutorials for ROSA with HCP
2 parents 3479a61 + 03b6134 commit 084378b

File tree

10 files changed

+61
-39
lines changed

10 files changed

+61
-39
lines changed

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Dir: rosa_learning
8484
Distros: openshift-rosa-hcp
8585
Topics:
8686
- Name: Creating a cluster workshop
87-
Dir: cloud-experts-getting-started-deploying
87+
Dir: creating_cluster_workshop
8888
Topics:
8989
- Name: Deploying a cluster
9090
File: cloud-experts-getting-started-hcp

rosa_learning/_attributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../_attributes/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../_attributes/
Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[id="cloud-experts-getting-started-hcp-guide"]
33
= Workshop: Creating a cluster
44
include::_attributes/attributes-openshift-dedicated.adoc[]
5+
include::_attributes/common-attributes.adoc[]
56
:context: cloud-experts-getting-started-hcp
67

78
toc::[]
@@ -10,27 +11,35 @@ toc::[]
1011
//Brought into ROSA product docs 2023-11-21
1112
//Updated for HCP 2024-07-01
1213

13-
Follow this workshop to deploy a sample {product-title}(ROSA) cluster. You can then use your cluster in other learning workshops.
14+
Follow this workshop to deploy a sample {product-title} (ROSA) cluster. You can then use your cluster in the next workshops.
1415

15-
== Prerequisites
16+
.Workshop objectives
1617

17-
Before deploying a ROSA cluster, you must have the following resources:
18+
* Learn to create your cluster prerequisites:
19+
** Create a sample virtual private cloud (VPC)
20+
** Create sample OpenID Connect (OIDC) resources
21+
* Create sample environment variables
22+
* Deploy a sample ROSA cluster
1823
19-
* VPC - This is a bring-your-own VPC model, also referred to as BYO-VPC.
20-
* OIDC - OIDC configuration and an OIDC provider with that specific configuration.
21-
* ROSA version 1.2.31 or higher
24+
.Prerequisites
2225

23-
In this tutorial, we will create these resources first. We will also set up some environment variables so that it is easier to run the command to create the {hcp-title} cluster.
26+
* ROSA version 1.2.31 or later
27+
* Amazon Web Service (AWS) command line interface (CLI)
28+
* ROSA CLI (`rosa`)
29+
30+
== Creating your cluster prerequisites
31+
32+
Before deploying a ROSA cluster, you must have both a VPC and OIDC resources. We will create these resources first. ROSA uses the bring your own VPC (BYO-VPC) model.
2433

2534
=== Creating a VPC
26-
. First, ensure that your AWS CLI (`aws`) is configured to use a region where {hcp-title} is available. To find out which regions are supported run the following command:
35+
. Make sure your AWS CLI (`aws`) is configured to use a region where ROSA is available. See the regions supported by the AWS CLI by running the following command:
2736
+
2837
[source,terminal]
2938
----
30-
rosa list regions --hosted-cp
39+
$ rosa list regions --hosted-cp
3140
----
3241

33-
. Create the VPC. For this tutorial, the following link:https://github.com/openshift-cs/rosaworkshop/blob/master/rosa-workshop/rosa/resources/setup-vpc.sh[script] creates the VPC and its required components for you. It uses the region configured for the `aws` CLI.
42+
. Create the VPC. For this workshop, the following link:https://github.com/openshift-cs/rosaworkshop/blob/master/rosa-workshop/rosa/resources/setup-vpc.sh[script] creates the VPC and its required components. It uses the region configured in your `aws` CLI.
3443
+
3544
[source,bash]
3645
----
@@ -141,21 +150,23 @@ echo "export PUBLIC_SUBNET_ID=$PUBLIC_SUBNET_ID"
141150
echo "export PRIVATE_SUBNET_ID=$PRIVATE_SUBNET_ID"
142151
----
143152
+
144-
For more about VPC requirements, see the xref:../../../rosa_planning/rosa-sts-aws-prereqs.adoc#rosa-vpc_rosa-sts-aws-prereqs[VPC documentation].
153+
[role="_additional-resources"]
154+
.Additional resources
155+
* For more about VPC requirements, see the xref:../../../rosa_planning/rosa-sts-aws-prereqs.adoc#rosa-vpc_rosa-sts-aws-prereqs[VPC documentation].
145156

146-
. The above script outputs two commands. Set the commands as environment variables to make running the `create cluster` command easier. Copy them from the output and run them as shown:
157+
. The script outputs commands. Set the commands as environment variables to store the subnet IDs for later use. Copy and run the commands:
147158
+
148159
[source,terminal]
149160
----
150-
export PUBLIC_SUBNET_ID=<public subnet id here>
151-
export PRIVATE_SUBNET_ID=<private subnet id here>
161+
$ export PUBLIC_SUBNET_ID=$PUBLIC_SUBNET_ID
162+
$ export PRIVATE_SUBNET_ID=$PRIVATE_SUBNET_ID
152163
----
153164

154-
. Confirm that the environment variables are set by running the following command:
165+
. Confirm your environment variables by running the following command:
155166
+
156167
[source,terminal]
157168
----
158-
echo "Public Subnet: $PUBLIC_SUBNET_ID"; echo "Private Subnet: $PRIVATE_SUBNET_ID"
169+
$ echo "Public Subnet: $PUBLIC_SUBNET_ID"; echo "Private Subnet: $PRIVATE_SUBNET_ID"
159170
----
160171
+
161172
.Example output
@@ -167,54 +178,57 @@ Private Subnet: subnet-011fe340000000000
167178
----
168179

169180
=== Creating your OIDC configuration
181+
In this workshop, we will use the automatic mode when creating the OIDC configuration. We will also store the OIDC ID as an environment variable for later use. The command uses the ROSA CLI to create your cluster's unique OIDC configuration.
170182

171-
In this tutorial, we will use the automatic mode when creating the OIDC configuration. We will also store the OIDC ID as an environment variable for later use. The command uses the ROSA CLI to create your cluster's unique OIDC configuration.
172-
173-
* To create the OIDC configuration for this tutorial, run the following command:
183+
* Create the OIDC configuration by running the following command:
174184
+
175185
[source,terminal]
176186
----
177-
export OIDC_ID=$(rosa create oidc-config --mode auto --managed --yes -o json | jq -r '.id')
187+
$ export OIDC_ID=$(rosa create oidc-config --mode auto --managed --yes -o json | jq -r '.id')
178188
----
179189

180-
=== Creating additional environment variables
190+
== Creating additional environment variables
181191

182-
* Run the following command to set up some environment variables so that it is easier to run the command to create the {hcp-title} cluster:
192+
* Run the following command to set up environment variables. These variables make it easier to run the command to create a ROSA cluster:
183193
+
184194
[source,terminal]
185195
----
186-
export CLUSTER_NAME=<enter cluster name>
187-
export REGION=<region VPC was created in>
196+
$ export CLUSTER_NAME=<cluster_name>
197+
$ export REGION=<VPC_region>
188198
----
189199
+
190200
[TIP]
191201
====
192202
Run `rosa whoami` to find the VPC region.
193203
====
194204

195-
== Creating the cluster
196-
If this is the _first time_ you are deploying ROSA in this account and you have _not_ yet created the account roles, create the account-wide roles and policies, including the Operator policies. Since ROSA uses AWS Security Token Service (STS), this step creates the AWS IAM roles and policies that are needed for ROSA to interact with your account.
205+
== Creating a cluster
197206

198-
. Run the following command to create the account-wide roles:
207+
. *Optional:* Run the following command to create the account-wide roles and policies, including the Operator policies and the AWS IAM roles and policies:
208+
+
209+
[IMPORTANT]
210+
====
211+
Only complete this step if this is the _first time_ you are deploying ROSA in this account and you have _not_ yet created your account roles and policies.
212+
====
199213
+
200214
[source,terminal]
201215
----
202-
rosa create account-roles --mode auto --yes
216+
$ rosa create account-roles --mode auto --yes
203217
----
204218

205219
. Run the following command to create the cluster:
206220
+
207221
[source,terminal]
208222
----
209-
rosa create cluster --cluster-name $CLUSTER_NAME \
210-
--subnet-ids ${PUBLIC_SUBNET_ID},${PRIVATE_SUBNET_ID} \
211-
--hosted-cp \
212-
--region $REGION \
213-
--oidc-config-id $OIDC_ID \
214-
--sts --mode auto --yes
223+
$ rosa create cluster --cluster-name $CLUSTER_NAME \
224+
--subnet-ids ${PUBLIC_SUBNET_ID},${PRIVATE_SUBNET_ID} \
225+
--hosted-cp \
226+
--region $REGION \
227+
--oidc-config-id $OIDC_ID \
228+
--sts --mode auto --yes
215229
----
216230

217-
The cluster is ready and completely usable after about 10 minutes. The cluster will have a control plane across three AWS availability zones in your selected region and create two worker nodes in your AWS account.
231+
The cluster is ready after about 10 minutes. The cluster will have a control plane across three AWS availability zones in your selected region and create two worker nodes in your AWS account.
218232

219233
== Checking the installation status
220234
. Run one of the following commands to check the status of the cluster:
@@ -223,21 +237,21 @@ The cluster is ready and completely usable after about 10 minutes. The cluster w
223237
+
224238
[source,terminal]
225239
----
226-
rosa describe cluster --cluster $CLUSTER_NAME
240+
$ rosa describe cluster --cluster $CLUSTER_NAME
227241
----
228242
+
229243
* For an abridged view of the cluster status, run:
230244
+
231245
[source,terminal]
232246
----
233-
rosa list clusters
247+
$ rosa list clusters
234248
----
235249
+
236250
* To watch the log as it progresses, run:
237251
+
238252
[source,terminal]
239253
----
240-
rosa logs install --cluster $CLUSTER_NAME --watch
254+
$ rosa logs install --cluster $CLUSTER_NAME --watch
241255
----
242256

243257
. Once the state changes to “ready” your cluster is installed. It might take a few more minutes for the worker nodes to come online.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../images/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../snippets/

rosa_learning/images

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../images/

rosa_learning/modules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules

rosa_learning/snippets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../snippets/

0 commit comments

Comments
 (0)