Skip to content

Commit 63bada5

Browse files
committed
OSDOCS-13576: Added info on rosa create network command
1 parent 4487bdb commit 63bada5

6 files changed

+263
-11
lines changed

modules/rosa-hcp-create-network.adoc

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
4+
5+
ifeval::["{context}" == "rosa-hcp-egress-lockdown-install"]
6+
:egress-lockdown-rosa:
7+
endif::[]
8+
9+
:_mod-docs-content-type: PROCEDURE
10+
[id="rosa-hcp-create-network_{context}"]
11+
= Creating a Virtual Private Cloud using the ROSA CLI
12+
13+
The `rosa create network` command is available in v.1.2.48 or later of the ROSA CLI. This command uses AWS CloudFormation to create a VPC and other networking components used to install a ROSA cluster. CloudFormation is a native AWS infrastructure-as-code tool, compatible with the AWS CLI. For more information on AWS CloudFormation, see the additional resources.
14+
15+
If you do not specify a template, CloudFormation uses a default template that creates the following parameters:
16+
17+
[cols="2a,3a",options="header"]
18+
|===
19+
|VPC parameter
20+
|Value
21+
22+
| Availability Zones
23+
| 1
24+
25+
| Region
26+
| `us-east-1`
27+
28+
| VPC CIDR
29+
| `10.0.0.0/16`
30+
|===
31+
32+
You can create and customize CloudFormation templates can also be used with the command. See the additional resources for information on the Default VPC template.
33+
34+
.Prerequisites
35+
36+
* You have configured your AWS account
37+
* You have configured your Red Hat accounts
38+
* You have installed and configured the ROSA CLI to the latest version
39+
40+
.Procedure
41+
. Use the following command to create an AWS VPC using the default CloudFormations template:
42+
+
43+
[source,terminal]
44+
----
45+
$ rosa create network
46+
----
47+
48+
. Optional: If you want to modify a parameter, you can specify `--param Param1=Value1`, `--param Param2=Value2`, and so on. For example, if you wanted to modify the region, name, AZ count, and VPC's CIDR parameters, you could run:
49+
+
50+
[source,terminal]
51+
----
52+
$ rosa create network --param Region=us-west-2 --param Name=quickstart-stack --param AvailabilityZoneCount=1 --param VpcCidr=10.0.0.0/16
53+
----
54+
55+
. The full list of parameters available in the default template.
56+
+
57+
.Example template
58+
+
59+
[source,yaml]
60+
----
61+
Parameters:
62+
AvailabilityZoneCount:
63+
Type: Number
64+
Description: "Number of Availability Zones to use"
65+
Default: 1
66+
MinValue: 1
67+
MaxValue: 3
68+
Region:
69+
Type: String
70+
Description: "AWS Region"
71+
Default: "us-west-2"
72+
Name:
73+
Type: String
74+
Description: "Name prefix for resources"
75+
VpcCidr:
76+
Type: String
77+
Description: CIDR block for the VPC
78+
Default: '10.0.0.0/16'
79+
----
80+
+
81+
The command takes about 5 minutes to run, providing regular status updates from AWS as resources are created. If there is an issue with CloudFormation, a rollback will be attempted. If any other issues are encountered, please follow the error message instructions or contact AWS support.
82+
+
83+
[NOTE]
84+
====
85+
Save the subnet IDs that are created as a result of this command since these subnets are needed when creating the cluster. Replace `$SUBNET_IDS` in the `rosa cluster create` command below with these values in a comma-separated list.
86+
87+
During the cluster creation, you can select your create network stack with the following step:
88+
89+
[source,terminal]
90+
----
91+
? Additional 'Compute' Security Group IDs (optional): sg-0d1fba92a71d6cc6d ('rosa-network-stack-269733383066-SecurityGroup-zD8qkxnh6wwL')
92+
----
93+
====
94+
95+
. To delete the Cloudformation stack that was created, run the following command:
96+
+
97+
[source,terminal]
98+
----
99+
$ aws cloudformation delete-stack --stack-name [Name]
100+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="rosa-hcp-custom-create-network_{context}"]
7+
= Configuring and using custom CloudFormation templates
8+
9+
You can use a custom CloudFormation template by specifying a new directory with `--template-dir`, and then specifying a template name when you use `rosa create network`. You can also simply use the aws cloudformations command directly when using custom CloudFormation templates.
10+
11+
.Procedure
12+
13+
* Run the following command to use a CloudFormation template stored locally at `/rosa/templates/customtemplatename/cloudformation.yaml`:
14+
+
15+
[source,terminal]
16+
----
17+
$ rosa create network customtemplatename --template-dir='/rosa/templates'
18+
----
19+
+
20+
[NOTE]
21+
====
22+
The default directory is `/cmd/create/network/templates/rosa/`.
23+
24+
As with any VPC used for ROSA, the VPC created by this method is not managed by ROSA, and ROSA is not aware of its dependency on this VPC. If you manipulate the VPC while a ROSA cluster is running within it, you could introduce risk to the cluster.
25+
====

rosa_hcp/rosa-hcp-creating-cluster-with-aws-kms-key.adoc

+34-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ To create a {hcp-title} cluster, you must have the following items:
2222
* Operator roles
2323

2424
[id="rosa-hcp-creating-cluster-with-aws-kms-key-creating-vpc"]
25-
=== Creating a Virtual Private Cloud for your {hcp-title} clusters
25+
== Creating a Virtual Private Cloud for your {hcp-title} clusters
2626

27-
You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You can use the following methods to create a VPC:
27+
You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You can use the following methods to create a VPC:
2828

29+
* Create a VPC using the ROSA CLI
2930
* Create a VPC by using a Terraform template
3031
* Manually create the VPC resources in the AWS console
3132

@@ -34,24 +35,53 @@ You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You c
3435
The Terraform instructions are for testing and demonstration purposes. Your own installation requires some modifications to the VPC for your own use. You should also ensure that when you use this Terraform script it is in the same region that you intend to install your cluster. In these examples, use `us-east-2`.
3536
====
3637

37-
include::snippets/imp-rosa-hcp-no-shared-vpc-support.adoc[leveloffset=+0]
38+
[discrete]
39+
include::modules/rosa-hcp-create-network.adoc[leveloffset=+3]
40+
[discrete]
41+
include::modules/rosa-hcp-custom-create-network.adoc[leveloffset=+3]
42+
43+
[role="_additional-resources"]
44+
[id="additional-resources_rosa-hcp-create-network-kms-key"]
45+
.Additional resources
46+
47+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
48+
* See this link:https://github.com/openshift/rosa/blob/master/cmd/create/network/templates/rosa-quickstart-default-vpc/cloudformation.yaml[default VPC AWS CloudFormation template] for more information.
3849

3950
[discrete]
4051
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
4152

4253
[role="_additional-resources"]
54+
[id="additional-resources_rosa-hcp-vpc-terraform-kms-key"]
4355
.Additional resources
4456

4557
* See the link:https://github.com/openshift-cs/terraform-vpc-example[Terraform VPC] repository for a detailed list of all options available when customizing the VPC for your needs.
4658

4759
[discrete]
48-
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+3]
60+
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
61+
62+
[id="troubleshooting_shared-vpc-hcp_vpc-creation-kms-key"]
63+
=== Troubleshooting
64+
65+
If your cluster fails to install, check these common troubleshooting issues:
66+
67+
* Make sure your link:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html[DHCP option set] includes a domain name, and ensure that the domain name does not include any spaces or capital letters.
68+
* If your VPC uses a custom DNS resolver (the `domain name servers` field of your DHCP option set is not `AmazonProvideDNS`), make sure it is able to properly resolve the private hosted zones configured in Route53.
69+
70+
For more information about troubleshooting ROSA cluster installations, see xref:../support/troubleshooting/rosa-troubleshooting-installations.adoc#rosa-troubleshooting-installations[Troubleshooting {product-title} installations].
71+
72+
==== Get support
73+
If you need additional xref:../support/getting-support.adoc#getting-support[support], visit the Red Hat Customer Portal to review knowledge base articles, submit a support case, and review additional product documentation and resources.
74+
75+
[discrete]
76+
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
4977

5078
[role="_additional-resources"]
79+
[id="additional-resources_rosa-hcp-vpc-aws-kms-key"]
5180
.Additional resources
5281

5382
* link:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-getting-started.html[Get Started with Amazon VPC]
5483
* link:https://developer.hashicorp.com/terraform[HashiCorp Terraform documentation]
84+
* link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/deploy/subnet_discovery/[Subnet Auto Discovery]
5585

5686
include::modules/rosa-hcp-creating-account-wide-sts-roles-and-policies.adoc[leveloffset=+2]
5787

rosa_hcp/rosa-hcp-egress-lockdown-install.adoc

+49-5
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,72 @@ While you may install and upgrade your clusters as you would a regular cluster,
5151
====
5252

5353
[id="rosa-hcp-egress-lockdown-install-creating_{context}"]
54-
== Creating a Virtual Private Cloud for your egress lockdown {hcp-title} clusters
54+
== Creating a Virtual Private Cloud for your {hcp-title} clusters
5555

56-
You must have a Virtual Private Cloud (VPC) to create {hcp-title} clusters. You can use one of the following methods to create a VPC:
56+
You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You can use the following methods to create a VPC:
5757

58+
* Create a VPC using the ROSA CLI
5859
* Create a VPC by using a Terraform template
5960
* Manually create the VPC resources in the AWS console
6061

6162
[NOTE]
6263
====
63-
The Terraform instructions are for testing and demonstration purposes. Your own installation requires modifications to the VPC for your specific needs and constraints. You should also ensure that when you use the following Terraform script it is in the same region that you intend to install your cluster.
64+
The Terraform instructions are for testing and demonstration purposes. Your own installation requires some modifications to the VPC for your own use. You should also ensure that when you use this Terraform script it is in the same region that you intend to install your cluster. In these examples, use `us-east-2`.
6465
====
6566

66-
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+2]
67+
[discrete]
68+
include::modules/rosa-hcp-create-network.adoc[leveloffset=+3]
69+
[discrete]
70+
include::modules/rosa-hcp-custom-create-network.adoc[leveloffset=+3]
6771

6872
[role="_additional-resources"]
73+
[id="additional-resources_rosa-hcp-create-network-egress-lockdown"]
6974
.Additional resources
7075

71-
* See the link:https://github.com/openshift-cs/terraform-vpc-example/tree/main/zero-egress[Zero Egress Terraform VPC Example] repository for a detailed list of all options available when customizing the VPC for your needs.
76+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
77+
* See this link:https://github.com/openshift/rosa/blob/master/cmd/create/network/templates/rosa-quickstart-default-vpc/cloudformation.yaml[default VPC AWS CloudFormation template] for more information.
7278

79+
[discrete]
80+
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
81+
82+
[role="_additional-resources"]
83+
[id="additional-resources_rosa-hcp-vpc-terraform-egress-lockdown"]
84+
.Additional resources
85+
86+
* See the link:https://github.com/openshift-cs/terraform-vpc-example[Terraform VPC] repository for a detailed list of all options available when customizing the VPC for your needs.
87+
88+
[discrete]
7389
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
90+
91+
[id="troubleshooting_shared-vpc-hcp_vpc-creation-egress-lockdown"]
92+
=== Troubleshooting
93+
94+
If your cluster fails to install, check these common troubleshooting issues:
95+
96+
* Make sure your link:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html[DHCP option set] includes a domain name, and ensure that the domain name does not include any spaces or capital letters.
97+
* If your VPC uses a custom DNS resolver (the `domain name servers` field of your DHCP option set is not `AmazonProvideDNS`), make sure it is able to properly resolve the private hosted zones configured in Route53.
98+
99+
For more information about troubleshooting ROSA cluster installations, see xref:../support/troubleshooting/rosa-troubleshooting-installations.adoc#rosa-troubleshooting-installations[Troubleshooting {product-title} installations].
100+
101+
==== Get support
102+
If you need additional xref:../support/getting-support.adoc#getting-support[support], visit the Red Hat Customer Portal to review knowledge base articles, submit a support case, and review additional product documentation and resources.
103+
74104
[discrete]
75105
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
106+
107+
[role="_additional-resources"]
108+
[id="additional-resources_rosa-hcp-vpc-aws-egress-lockdown"]
109+
.Additional resources
110+
111+
* link:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-getting-started.html[Get Started with Amazon VPC]
112+
* link:https://developer.hashicorp.com/terraform[HashiCorp Terraform documentation]
113+
* link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/deploy/subnet_discovery/[Subnet Auto Discovery]
114+
115+
[role="_additional-resources"]
116+
.Additional resources
117+
118+
* See the link:https://github.com/openshift-cs/terraform-vpc-example/tree/main/zero-egress[Zero Egress Terraform VPC Example] repository for a detailed list of all options available when customizing the VPC for your needs.
119+
76120
[discrete]
77121
include::modules/rosa-hcp-sgs-and-vpce.adoc[leveloffset=+3]
78122

rosa_hcp/rosa-hcp-quickstart-guide.adoc

+42-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include::modules/rosa-sts-creating-account-wide-sts-roles-and-policies.adoc[leve
2828

2929
You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You can use the following methods to create a VPC:
3030

31+
* Create a VPC using the ROSA CLI
3132
* Create a VPC by using a Terraform template
3233
* Manually create the VPC resources in the AWS console
3334

@@ -37,14 +38,53 @@ The Terraform instructions are for testing and demonstration purposes. Your own
3738
====
3839

3940
[discrete]
40-
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=1]
41+
include::modules/rosa-hcp-create-network.adoc[leveloffset=+3]
42+
[discrete]
43+
include::modules/rosa-hcp-custom-create-network.adoc[leveloffset=+3]
44+
45+
[role="_additional-resources"]
46+
[id="additional-resources_rosa-hcp-create-network-quickstart"]
47+
.Additional resources
48+
49+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
50+
* See this link:https://github.com/openshift/rosa/blob/master/cmd/create/network/templates/rosa-quickstart-default-vpc/cloudformation.yaml[default VPC AWS CloudFormation template] for more information.
51+
52+
[discrete]
53+
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
4154

4255
[role="_additional-resources"]
43-
[id="additional-resources_rosa-hcp-quickstart-vpc-terraform"]
56+
[id="additional-resources_rosa-hcp-vpc-terraform-quickstart"]
4457
.Additional resources
4558

4659
* See the link:https://github.com/openshift-cs/terraform-vpc-example[Terraform VPC] repository for a detailed list of all options available when customizing the VPC for your needs.
4760

61+
[discrete]
62+
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
63+
64+
[id="troubleshooting_shared-vpc-hcp_vpc-creation-quickstart"]
65+
=== Troubleshooting
66+
67+
If your cluster fails to install, check these common troubleshooting issues:
68+
69+
* Make sure your link:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html[DHCP option set] includes a domain name, and ensure that the domain name does not include any spaces or capital letters.
70+
* If your VPC uses a custom DNS resolver (the `domain name servers` field of your DHCP option set is not `AmazonProvideDNS`), make sure it is able to properly resolve the private hosted zones configured in Route53.
71+
72+
For more information about troubleshooting ROSA cluster installations, see xref:../support/troubleshooting/rosa-troubleshooting-installations.adoc#rosa-troubleshooting-installations[Troubleshooting {product-title} installations].
73+
74+
==== Get support
75+
If you need additional xref:../support/getting-support.adoc#getting-support[support], visit the Red Hat Customer Portal to review knowledge base articles, submit a support case, and review additional product documentation and resources.
76+
77+
[discrete]
78+
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
79+
80+
[role="_additional-resources"]
81+
[id="additional-resources_rosa-hcp-vpc-aws-quickstart"]
82+
.Additional resources
83+
84+
* link:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-getting-started.html[Get Started with Amazon VPC]
85+
* link:https://developer.hashicorp.com/terraform[HashiCorp Terraform documentation]
86+
* link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/deploy/subnet_discovery/[Subnet Auto Discovery]
87+
4888
include::modules/rosa-sts-byo-oidc.adoc[leveloffset=+1]
4989
include::modules/rosa-operator-config.adoc[leveloffset=+1]
5090
include::modules/rosa-hcp-sts-creating-a-cluster-cli.adoc[leveloffset=+1]

rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc

+13
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ To create a {hcp-title} cluster, you must have the following items:
7373

7474
You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You can use the following methods to create a VPC:
7575

76+
* Create a VPC using the ROSA CLI
7677
* Create a VPC by using a Terraform template
7778
* Manually create the VPC resources in the AWS console
7879

@@ -81,6 +82,18 @@ You must have a Virtual Private Cloud (VPC) to create {hcp-title} cluster. You c
8182
The Terraform instructions are for testing and demonstration purposes. Your own installation requires some modifications to the VPC for your own use. You should also ensure that when you use this Terraform script it is in the same region that you intend to install your cluster. In these examples, use `us-east-2`.
8283
====
8384

85+
[discrete]
86+
include::modules/rosa-hcp-create-network.adoc[leveloffset=+3]
87+
[discrete]
88+
include::modules/rosa-hcp-custom-create-network.adoc[leveloffset=+3]
89+
90+
[role="_additional-resources"]
91+
[id="additional-resources_rosa-hcp-create-network"]
92+
.Additional resources
93+
94+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
95+
* See this link:https://github.com/openshift/rosa/blob/master/cmd/create/network/templates/rosa-quickstart-default-vpc/cloudformation.yaml[default VPC AWS CloudFormation template] for more information.
96+
8497
[discrete]
8598
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
8699

0 commit comments

Comments
 (0)