|
| 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-west-2` |
| 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 | +. To see a list of parameters available in the default template you can run: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ rosa create network --help |
| 53 | +---- |
| 54 | + |
| 55 | +. 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: |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +$ rosa create network --param Region=us-west-2 --param Name=quickstart-stack --param AvailabilityZoneCount=1 --param VpcCidr=10.0.0.0/16 |
| 60 | +---- |
| 61 | + |
| 62 | +. The full list of parameters available in the default template. |
| 63 | ++ |
| 64 | +.Example template |
| 65 | ++ |
| 66 | +[source,yaml] |
| 67 | +---- |
| 68 | +Parameters: |
| 69 | + AvailabilityZoneCount: |
| 70 | + Type: Number |
| 71 | + Description: "Number of Availability Zones to use" |
| 72 | + Default: 1 |
| 73 | + MinValue: 1 |
| 74 | + MaxValue: 3 |
| 75 | + Region: |
| 76 | + Type: String |
| 77 | + Description: "AWS Region" |
| 78 | + Default: "us-west-2" |
| 79 | + Name: |
| 80 | + Type: String |
| 81 | + Description: "Name prefix for resources" |
| 82 | + VpcCidr: |
| 83 | + Type: String |
| 84 | + Description: CIDR block for the VPC |
| 85 | + Default: '10.0.0.0/16' |
| 86 | +---- |
| 87 | ++ |
| 88 | +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. |
| 89 | ++ |
| 90 | +[NOTE] |
| 91 | +==== |
| 92 | +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. |
| 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 | +---- |
0 commit comments