Skip to content

Commit 8ae427e

Browse files
Merge pull request #66328 from laubai/osdocs-8034-custom-secgroups-day1-cli
OSDOCS#8034: additional custom security groups at ROSA cluster creation time
2 parents 718b75c + c2f3674 commit 8ae427e

23 files changed

+119
-90
lines changed

cli_reference/rosa_cli/rosa-manage-objects-cli.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ include::modules/rosa-create-objects.adoc[leveloffset=+1]
1818
* See xref:../../rosa_architecture/rosa_policy_service_definition/rosa-service-definition.adoc#rosa-sdpolicy-aws-instance-types_rosa-service-definition[AWS Instance types] for a list of supported instance types.
1919
* See xref:../../rosa_architecture/rosa-sts-about-iam-resources.adoc#rosa-sts-account-wide-roles-and-policies_rosa-sts-about-iam-resources[Account-wide IAM role and policy reference] for a list of IAM roles needed for cluster creation.
2020
* See xref:../../rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc#rosa-sts-understanding-aws-account-association_rosa-sts-creating-a-cluster-with-customizations[Understanding AWS account association] for more information about the OCM role and user role.
21+
* See xref:../../rosa_install_access_delete_clusters/rosa_getting_started_iam/rosa-aws-prereqs.adoc#rosa-security-groups_prerequisites[Security groups] for information about security group requirements.
2122

2223
include::modules/rosa-edit-objects.adoc[leveloffset=+1]
2324
include::modules/rosa-delete-objects.adoc[leveloffset=+1]

cloud_experts_tutorials/rosa-mobb-cli-quickstart.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,13 @@ ROSA can be installed using command line parameters or in interactive mode. For
211211
```
212212
Cluster name:
213213
Multiple availability zones (y/N):
214-
AWS region (select):
215-
OpenShift version (select):
214+
AWS region: (select)
215+
OpenShift version: (select)
216216
Install into an existing VPC (y/N):
217-
Compute nodes instance type (optional):
217+
Compute nodes instance type (optional): (select)
218218
Enable autoscaling (y/N):
219219
Compute nodes [2]:
220+
Additional Security Group IDs (optional): (select)
220221
Machine CIDR [10.0.0.0/16]:
221222
Service CIDR [172.30.0.0/16]:
222223
Pod CIDR [10.128.0.0/14]:

modules/creating-a-machine-pool-cli.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $ rosa create machinepool --cluster=<cluster-name> \
3131
ifdef::openshift-rosa[]
3232
--disk-size=<disk_size> <8>
3333
--availability-zone=<az> <9>
34+
--additional-security-group-ids <sec_group_id> <10>
3435
3536
endif::openshift-rosa[]
3637
----
@@ -44,6 +45,7 @@ endif::openshift-rosa[]
4445
ifdef::openshift-rosa[]
4546
<8> Optional: Specifies the worker node disk size. The value can be in GB, GiB, TB, or TiB. Replace `<disk_size>` with a numeric value and unit, for example `--disk-size=200GiB`.
4647
<9> Optional: For Multi-AZ clusters, you can create a machine pool in a Single-AZ of your choice. Replace `<az>` with a Single-AZ.
48+
<10> Optional: For machine pools in clusters that do not have Red Hat managed VPCs, you can select additional custom security groups to use in your machine pools. You must have already created the security groups and associated them with the VPC you selected for this cluster. For more information, see the requirements for _Security groups_ in _Prepare your environment_.
4749
endif::openshift-rosa[]
4850
+
4951
[IMPORTANT]

modules/rosa-adding-node-labels.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ $ rosa list machinepools --cluster=<cluster_name>
109109
.Example output
110110
[source,terminal]
111111
----
112-
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES
113-
Default No 2 m5.xlarge us-east-1a N/A
114-
db-nodes-mp No 2 m5.xlarge app=db, tier=backend us-east-1a No
112+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES DISK SIZE SG IDs
113+
Default No 2 m5.xlarge us-east-1a N/A 300 GiB sg-0e375ff0ec4a6cfa2
114+
db-nodes-mp No 2 m5.xlarge app=db, tier=backend us-east-1a No 300 GiB sg-0e375ff0ec4a6cfa2
115115
----
116116

117117
. Verify that the labels are included for your machine pool in the output.

modules/rosa-adding-taints-cli.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ $ rosa list machinepools --cluster=<cluster_name>
4040
+
4141
[source,terminal]
4242
----
43-
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES
44-
Default No 2 m5.xlarge us-east-1a N/A
45-
db-nodes-mp No 2 m5.xlarge us-east-1a No
43+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES DISK SIZE SG IDs
44+
Default No 2 m5.xlarge us-east-1a N/A 300 GiB sg-0e375ff0ec4a6cfa2
45+
db-nodes-mp No 2 m5.xlarge us-east-1a No 300 GiB sg-0e375ff0ec4a6cfa2
4646
----
4747

4848
. Add or update the taints for a machine pool:
@@ -110,9 +110,9 @@ $ rosa list machinepools --cluster=<cluster_name>
110110
.Example output
111111
[source,terminal]
112112
----
113-
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES
114-
Default No 2 m5.xlarge us-east-1a N/A
115-
db-nodes-mp No 2 m5.xlarge key1=value1:NoSchedule, key2=value2:NoExecute us-east-1a No
113+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES DISK SIZE SG IDs
114+
Default No 2 m5.xlarge us-east-1a N/A 300GiB sg-0e375ff0ec4a6cfa2
115+
db-nodes-mp No 2 m5.xlarge key1=value1:NoSchedule, key2=value2:NoExecute us-east-1a No 300GiB sg-0e375ff0ec4a6cfa2
116116
----
117117

118118
. Verify that the taints are included for your machine pool in the output.

modules/rosa-adding-tuning.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ $ rosa list machinepools --cluster=<cluster_name>
3434
+
3535
[source,terminal]
3636
----
37-
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SUBNET VERSION AUTOREPAIR TUNING CONFIGS MESSAGE
38-
Default No 2 m5.xlarge us-east-1a N/A 4.12.14 Yes
39-
db-nodes-mp No 2 m5.xlarge us-east-1a No 4.12.14 Yes
37+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SUBNETS VERSION AUTOREPAIR TUNING CONFIGS MESSAGE
38+
Default No 2 m5.xlarge us-east-1a N/A 4.12.14 Yes
39+
db-nodes-mp No 2 m5.xlarge us-east-1a No 4.12.14 Yes
4040
----
4141

4242
. You can add tuning configurations to an existing or new machine pool.

modules/rosa-aws-privatelink-create-cluster.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// * rosa_install_access_delete_clusters/rosa-aws-privatelink-creating-cluster.adoc
44
:_mod-docs-content-type: PROCEDURE
5-
[id="rosa-aws-privatelink-create-cluster.adoc_{context}"]
5+
[id="rosa-aws-privatelink-create-cluster_{context}"]
66
= Creating an AWS PrivateLink cluster
77

88
You can create an AWS PrivateLink cluster using the {product-title} (ROSA) CLI, `rosa`.
@@ -14,13 +14,15 @@ AWS PrivateLink is supported on existing VPCs only.
1414

1515
.Prerequisites
1616

17-
You have installed {product-title}.
17+
* You have available AWS service quotas.
18+
* You have enabled the ROSA service in the AWS Console.
19+
* You have installed and configured the latest {product-title} (ROSA) CLI, `rosa`, on your installation host.
1820
1921
.Procedure
2022

2123
Creating a cluster can take up to 40 minutes.
2224

23-
. With AWS PrivateLink, you can create a cluster with a single availability zone (Single-AZ) or multiple availability zones (Multi-AZ). In either case, your machine's classless inter-domain routing (CIDR) must match your virtual private cloud's CIDR. See https://docs.openshift.com/container-platform/4.7/installing/installing_aws/installing-aws-vpc.html#installation-custom-aws-vpc-requirements_installing-aws-vpc[Requirements for using your own VPC] and link:https://docs.openshift.com/container-platform/4.7/installing/installing_aws/installing-aws-vpc.html#installation-custom-aws-vpc-validation_installing-aws-vpc[VPC Validation] for more information.
25+
. With AWS PrivateLink, you can create a cluster with a single availability zone (Single-AZ) or multiple availability zones (Multi-AZ). In either case, your machine's classless inter-domain routing (CIDR) must match your virtual private cloud's CIDR. See https://docs.openshift.com/container-platform/4.13/installing/installing_aws/installing-aws-vpc.html#installation-custom-aws-vpc-requirements_installing-aws-vpc[Requirements for using your own VPC] and link:https://docs.openshift.com/container-platform/4.13/installing/installing_aws/installing-aws-vpc.html#installation-custom-aws-vpc-validation_installing-aws-vpc[VPC Validation] for more information.
2426
+
2527
[IMPORTANT]
2628
====

modules/rosa-aws-provisioned.adoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ A *public subnet* connects directly to the internet through an internet gateway.
8080

8181
* *NAT gateways*: One NAT Gateway per public subnet.
8282

83-
=== Sample VPC Architecture
84-
83+
.Sample VPC Architecture
8584
image::VPC-Diagram.png[VPC Reference Architecture]
8685

8786
[id="rosa-security-groups_{context}"]
8887
== Security groups
8988

9089
AWS security groups provide security at the protocol and port access level; they are associated with EC2 instances and Elastic Load Balancing (ELB) load balancers. Each security group contains a set of rules that filter traffic coming in and out of one or more EC2 instances. You must ensure the ports required for the OpenShift installation are open on your network and configured to allow access between hosts.
9190

91+
.Required ports for default security groups
9292
[cols="2a,2a,2a,2a",options="header"]
9393
|===
9494

@@ -131,3 +131,11 @@ AWS security groups provide security at the protocol and port access level; they
131131
|`19531`
132132

133133
|===
134+
135+
[id="rosa-security-groups-custom_{context}"]
136+
=== Additional custom security groups
137+
When you create a cluster using an existing non-managed VPC, you can add additional custom security groups during cluster creation. Custom security groups are subject to the following limitations:
138+
139+
* You must create the custom security groups in AWS before you create the cluster. For more information, see link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html[Amazon EC2 security groups for Linux instances].
140+
* You must associate the custom security groups with the VPC that the cluster will be installed into. Your custom security groups cannot be associated with another VPC.
141+
* You might need to request additional quota for your VPC if you are adding additional custom security groups. For information on AWS quota requirements for ROSA, see _Required AWS service quotas_ in _Prepare your environment_. For information on requesting an AWS quota increase, see link:https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html[Requesting a quota increase].

modules/rosa-create-objects.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ $ rosa create cluster --cluster-name=<cluster_name> [arguments]
116116
|===
117117
|Option |Definition
118118

119+
|--additional-compute-security-group-ids <sec_group_id>
120+
|The identifier of one or more additional security groups to use in addition to the default security groups. For more information on additional security groups, see the requirements for _Security groups_ in _Prepare your environment_.
121+
119122
a|--cluster-name <cluster_name>
120123
|Required. The name of the cluster. When used with the `create cluster` command, this argument is used to set the cluster name and to generate a sub-domain for your cluster on `openshiftapps.com`. The value for this argument must be unique within your organization.
121124

122125
|--compute-machine-type <instance_type>
123126
|The instance type for compute nodes in the cluster. This determines the amount of memory and vCPU that is allocated to each compute node. For more information on valid instance types, see _AWS Instance types_ in _ROSA service definition_.
124127

125-
|--compute-nodes n
126-
|The number of worker nodes to provision per availability zone. Single-zone clusters require at least 2 nodes. Multi-zone clusters require at least 3 nodes. Default: `2` for single-zone clusters; `3` for multi-zone clusters.
127-
128128
|--controlplane-iam-role <arn>
129129
|The ARN of the IAM role to attach to control plane instances.
130130

@@ -180,6 +180,9 @@ OVN-Kubernetes, the default network provider in ROSA 4.11 and later, uses the `1
180180
|--region <region_name>
181181
|The name of the AWS region where your worker pool will be located, for example, `us-east-1`. This argument overrides the `AWS_REGION` environment variable.
182182

183+
|--replicas n
184+
|The number of worker nodes to provision per availability zone. Single-zone clusters require at least 2 nodes. Multi-zone clusters require at least 3 nodes. Default: `2` for single-zone clusters; `3` for multi-zone clusters.
185+
183186
|--role-arn <arn>
184187
|The ARN of the installer role that {cluster-manager} uses to create the cluster. This is required if you have not already created account roles.
185188

@@ -500,6 +503,10 @@ $ rosa create machinepool --cluster=<cluster_name> | <cluster_id> --replicas=<nu
500503
|===
501504
|Option |Definition
502505

506+
// Note for writers: This command works the same way as rosa create --additional-compute-security-group-ids but all subsequent machinepools are compute only so we don't specify compute here yet; consistency across commands to come in OCM-3111.
507+
|--additional-security-group-ids <sec_group_id>
508+
|The identifier of one or more additional security groups to use in addition to the default security groups for this machine pool. For more information on additional security groups, see the requirements for _Security groups_ in _Prepare your environment_.
509+
503510
a|--cluster <cluster_name>\|<cluster_id>
504511
|Required: The name or ID of the cluster to which the machine pool will be added.
505512

modules/rosa-enabling-autoscaling-nodes.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ $ rosa list machinepools --cluster=<cluster_name>
2525
+
2626
[source,terminal]
2727
----
28-
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TINTS AVAILABILITY ZONES
29-
default No 2 m5.xlarge us-east-1a
30-
mp1 No 2 m5.xlarge us-east-1a
28+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES DISK SIZE SG IDs
29+
default No 2 m5.xlarge us-east-1a 300GiB sg-0e375ff0ec4a6cfa2
30+
mp1 No 2 m5.xlarge us-east-1a 300GiB sg-0e375ff0ec4a6cfa2
3131
----
3232
+
3333
. Get the ID of the machine pools that you want to configure.

0 commit comments

Comments
 (0)