Skip to content

Commit a93f057

Browse files
committed
OSDOCS-13576: Added info on rosa create network command
1 parent d88c464 commit a93f057

6 files changed

+239
-23
lines changed

modules/rosa-hcp-create-network.adoc

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_hcp/rosa-hcp-creating-cluster-with-aws-kms-key.adoc
4+
// * rosa_hcp/rosa-hcp-egress-lockdown-install.adoc
5+
// * rosa_hcp/rosa-hcp-quickstart-guide.adoc
6+
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
7+
8+
ifeval::["{context}" == "rosa-hcp-egress-lockdown-install"]
9+
:egress-lockdown-rosa:
10+
endif::[]
11+
12+
:_mod-docs-content-type: PROCEDURE
13+
[id="rosa-hcp-create-network_{context}"]
14+
= Creating a Virtual Private Cloud using the ROSA CLI
15+
16+
The `rosa create network` command is available in v.1.2.48 or later of the ROSA command-line interface (CLI). The command uses AWS CloudFormation to create a VPC and the other networking components used to install a ROSA cluster. CloudFormation is a native AWS infrastructure-as-code tool and is compatible with the AWS CLI.
17+
18+
If you do not specify a template, CloudFormation uses a default template that creates the following parameters:
19+
20+
[cols="2a,3a",options="header"]
21+
|===
22+
|VPC parameter
23+
|Value
24+
25+
| Availability zones
26+
| 1
27+
28+
| Region
29+
| `us-east-1`
30+
31+
| VPC CIDR
32+
| `10.0.0.0/16`
33+
|===
34+
35+
You can create and customize CloudFormation templates to use with the `rosa create network` command. See the additional resources for information on the default VPC template.
36+
37+
.Prerequisites
38+
39+
* You have configured your AWS account
40+
* You have configured your Red Hat accounts
41+
* You have installed the ROSA CLI and configured it to the latest version
42+
43+
.Procedure
44+
. Create an AWS VPC using the default CloudFormations template by running the following command:
45+
+
46+
[source,terminal]
47+
----
48+
$ rosa create network
49+
----
50+
51+
. Optional: If you want to modify a parameter, you can specify the parameter using optional argument flags such as `--param Param1=Value1` and `--param Param2=Value2`. For example, if you wanted to modify the region, name, availability zone (AZ) count, and VPC's CIDR parameters, you could run:
52+
+
53+
[source,terminal]
54+
----
55+
$ rosa create network --param Region=us-west-2 --param Name=quickstart-stack --param AvailabilityZoneCount=1 --param VpcCidr=10.0.0.0/16
56+
----
57+
58+
. The full list of parameters is available in the default template.
59+
+
60+
.Example template
61+
+
62+
[source,yaml]
63+
----
64+
Parameters:
65+
AvailabilityZoneCount:
66+
Type: Number
67+
Description: "Number of Availability Zones to use"
68+
Default: 1
69+
MinValue: 1
70+
MaxValue: 3
71+
Region:
72+
Type: String
73+
Description: "AWS Region"
74+
Default: "us-west-2"
75+
Name:
76+
Type: String
77+
Description: "Name prefix for resources"
78+
VpcCidr:
79+
Type: String
80+
Description: CIDR block for the VPC
81+
Default: '10.0.0.0/16'
82+
----
83+
+
84+
The command takes about 5 minutes to run and provides regular status updates from AWS as resources are created. If there is an issue with CloudFormation, a rollback is attempted. For all other errors are encountered, please follow the error message instructions or contact AWS support.
85+
86+
.Verification
87+
. When completed, you receive a summary of the created resources:
88+
+
89+
[source,bash]
90+
----
91+
INFO[0140] Resources created in stack:
92+
INFO[0140] Resource: AttachGateway, Type: AWS::EC2::VPCGatewayAttachment, ID: <gateway-id>
93+
INFO[0140] Resource: EC2VPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
94+
INFO[0140] Resource: EcrApiVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
95+
INFO[0140] Resource: EcrDkrVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
96+
INFO[0140] Resource: ElasticIP1, Type: AWS::EC2::EIP, ID: <IP>
97+
INFO[0140] Resource: ElasticIP2, Type: AWS::EC2::EIP, ID: <IP>
98+
INFO[0140] Resource: InternetGateway, Type: AWS::EC2::InternetGateway, ID: igw-016e1a71b9812464e
99+
INFO[0140] Resource: KMSVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
100+
INFO[0140] Resource: NATGateway1, Type: AWS::EC2::NatGateway, ID: <nat-gateway-id>
101+
INFO[0140] Resource: PrivateRoute, Type: AWS::EC2::Route, ID: <route-id>
102+
INFO[0140] Resource: PrivateRouteTable, Type: AWS::EC2::RouteTable, ID: <route-id>
103+
INFO[0140] Resource: PrivateSubnetRouteTableAssociation1, Type: AWS::EC2::SubnetRouteTableAssociation, ID: <route-id>
104+
INFO[0140] Resource: PublicRoute, Type: AWS::EC2::Route, ID: <route-id>
105+
INFO[0140] Resource: PublicRouteTable, Type: AWS::EC2::RouteTable, ID: <route-id>
106+
INFO[0140] Resource: PublicSubnetRouteTableAssociation1, Type: AWS::EC2::SubnetRouteTableAssociation, ID: <route-id>
107+
INFO[0140] Resource: S3VPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
108+
INFO[0140] Resource: STSVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id>
109+
INFO[0140] Resource: SecurityGroup, Type: AWS::EC2::SecurityGroup, ID: <security-group-id>
110+
INFO[0140] Resource: SubnetPrivate1, Type: AWS::EC2::Subnet, ID: <private-subnet-id-1> \ <1>
111+
INFO[0140] Resource: SubnetPublic1, Type: AWS::EC2::Subnet, ID: <public-subnet-id-1> \ <1>
112+
INFO[0140] Resource: VPC, Type: AWS::EC2::VPC, ID: <vpc-id>
113+
INFO[0140] Stack rosa-network-stack-5555 created \ <2>
114+
----
115+
+
116+
--
117+
<1> These two subnet IDs are used to create your cluster when using the `rosa create cluster` command.
118+
<2> The network stack name is used to delete the resource later.

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

+21-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. Use one of the following methods to create a VPC:
2828

29+
* Create a VPC using the ROSA command-line interface (CLI)
2930
* Create a VPC by using a Terraform template
3031
* Manually create the VPC resources in the AWS console
3132

@@ -34,24 +35,40 @@ 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+
41+
[role="_additional-resources"]
42+
[id="additional-resources_rosa-hcp-create-network-kms-key"]
43+
.Additional resources
44+
45+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
46+
* See the 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.
3847

3948
[discrete]
4049
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
4150

4251
[role="_additional-resources"]
52+
[id="additional-resources_rosa-hcp-vpc-terraform-kms-key"]
4353
.Additional resources
4454

4555
* 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.
4656

4757
[discrete]
48-
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+3]
58+
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
59+
60+
include::snippets/vpc-troubleshooting.adoc[leveloffset=+2]
61+
62+
[discrete]
63+
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
4964

5065
[role="_additional-resources"]
66+
[id="additional-resources_rosa-hcp-vpc-aws-kms-key"]
5167
.Additional resources
5268

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

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

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

+36-5
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,59 @@ 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. Use one of the following methods to create a VPC:
5757

58+
* Create a VPC using the ROSA command-line interface (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]
6769

6870
[role="_additional-resources"]
71+
[id="additional-resources_rosa-hcp-create-network-egress-lockdown"]
6972
.Additional resources
7073

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.
74+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation documentation] for more information about structuring CloudFormation files to create VPCs.
75+
* 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.
76+
77+
[discrete]
78+
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
7279

80+
[role="_additional-resources"]
81+
[id="additional-resources_rosa-hcp-vpc-terraform-egress-lockdown"]
82+
.Additional resources
83+
84+
* 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 to your needs.
85+
86+
[discrete]
7387
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
88+
89+
include::snippets/vpc-troubleshooting.adoc[leveloffset=+2]
90+
7491
[discrete]
7592
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
93+
94+
[role="_additional-resources"]
95+
[id="additional-resources_rosa-hcp-vpc-aws-egress-lockdown"]
96+
.Additional resources
97+
98+
* link:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-getting-started.html[Get Started with Amazon VPC]
99+
* link:https://developer.hashicorp.com/terraform[HashiCorp Terraform documentation]
100+
* link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/deploy/subnet_discovery/[Subnet Auto Discovery]
101+
102+
[role="_additional-resources"]
103+
.Additional resources
104+
105+
* 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.
106+
76107
[discrete]
77108
include::modules/rosa-hcp-sgs-and-vpce.adoc[leveloffset=+3]
78109

rosa_hcp/rosa-hcp-quickstart-guide.adoc

+29-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,40 @@ 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]
4142

4243
[role="_additional-resources"]
43-
[id="additional-resources_rosa-hcp-quickstart-vpc-terraform"]
44+
[id="additional-resources_rosa-hcp-create-network-quickstart"]
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.
49+
50+
[discrete]
51+
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
52+
53+
[role="_additional-resources"]
54+
[id="additional-resources_rosa-hcp-vpc-terraform-quickstart"]
4455
.Additional resources
4556

4657
* 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.
4758

59+
[discrete]
60+
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
61+
62+
include::snippets/vpc-troubleshooting.adoc[leveloffset=+2]
63+
64+
[discrete]
65+
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]
66+
67+
[role="_additional-resources"]
68+
[id="additional-resources_rosa-hcp-vpc-aws-quickstart"]
69+
.Additional resources
70+
71+
* link:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-getting-started.html[Get Started with Amazon VPC]
72+
* link:https://developer.hashicorp.com/terraform[HashiCorp Terraform documentation]
73+
* link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/deploy/subnet_discovery/[Subnet Auto Discovery]
74+
4875
include::modules/rosa-sts-byo-oidc.adoc[leveloffset=+1]
4976
include::modules/rosa-operator-config.adoc[leveloffset=+1]
5077
include::modules/rosa-hcp-sts-creating-a-cluster-cli.adoc[leveloffset=+1]

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

+12-12
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,16 @@ 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+
88+
[role="_additional-resources"]
89+
[id="additional-resources_rosa-hcp-create-network"]
90+
.Additional resources
91+
92+
* See the link:https://aws.amazon.com/cloudformation/[AWS CloudFormation] for more information about structuring CloudFormation files to create VPCs.
93+
* 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.
94+
8495
[discrete]
8596
include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
8697

@@ -93,18 +104,7 @@ include::modules/rosa-hcp-vpc-terraform.adoc[leveloffset=+3]
93104
[discrete]
94105
include::modules/rosa-hcp-vpc-manual.adoc[leveloffset=+2]
95106

96-
[id="troubleshooting_shared-vpc-hcp_vpc-creation"]
97-
==== Troubleshooting
98-
99-
If your cluster fails to install, check these common troubleshooting issues:
100-
101-
* 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.
102-
* 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.
103-
104-
For more information about troubleshooting ROSA cluster installations, see xref:../support/troubleshooting/rosa-troubleshooting-installations.adoc#rosa-troubleshooting-installations[Troubleshooting {product-title} installations].
105-
106-
===== Get support
107-
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.
107+
include::snippets/vpc-troubleshooting.adoc[leveloffset=+2]
108108

109109
[discrete]
110110
include::modules/rosa-hcp-vpc-subnet-tagging.adoc[leveloffset=+3]

snippets/vpc-troubleshooting.adoc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Snippet included in the following assemblies:
2+
//
3+
// * rosa_hcp/rosa-hcp-creating-cluster-with-aws-kms-key.adoc
4+
// * rosa_hcp/rosa-hcp-egress-lockdown-install.adoc
5+
// * rosa_hcp/rosa-hcp-quickstart-guide.adoc
6+
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
7+
8+
:_mod-docs-content-type: SNIPPET
9+
10+
[id="troubleshooting_shared-vpc-hcp_vpc-creation_{context}"]
11+
= Troubleshooting
12+
13+
If your cluster fails to install, check these common troubleshooting issues:
14+
15+
* 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.
16+
* 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.
17+
18+
For more information about troubleshooting ROSA cluster installations, see xref:../support/troubleshooting/rosa-troubleshooting-installations.adoc#rosa-troubleshooting-installations[Troubleshooting {product-title} installations].
19+
20+
[discrete]
21+
[id="troubleshooting_vpc-support_{context}"]
22+
== Get support
23+
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.

0 commit comments

Comments
 (0)