|
| 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 of this section 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: Customize your VPC by specifying additional parameters. |
| 52 | ++ |
| 53 | +You can use the `--param` flag to specify changes to the default VPC template. The following example command specifies custom values for `region`, `Name`, `AvailabilityZoneCount` and `VpcCidr`. |
| 54 | ++ |
| 55 | +[source,terminal] |
| 56 | +---- |
| 57 | +$ rosa create network --param Region=us-east-2 --param Name=quickstart-stack --param AvailabilityZoneCount=3 --param VpcCidr=10.0.0.0/16 |
| 58 | +---- |
| 59 | ++ |
| 60 | +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 that are encountered, please follow the error message instructions or contact AWS support. |
| 61 | + |
| 62 | +.Verification |
| 63 | +* When completed, you receive a summary of the created resources: |
| 64 | ++ |
| 65 | +[source,bash] |
| 66 | +---- |
| 67 | +INFO[0140] Resources created in stack: |
| 68 | +INFO[0140] Resource: AttachGateway, Type: AWS::EC2::VPCGatewayAttachment, ID: <gateway-id> |
| 69 | +INFO[0140] Resource: EC2VPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 70 | +INFO[0140] Resource: EcrApiVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 71 | +INFO[0140] Resource: EcrDkrVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 72 | +INFO[0140] Resource: ElasticIP1, Type: AWS::EC2::EIP, ID: <IP> |
| 73 | +INFO[0140] Resource: ElasticIP2, Type: AWS::EC2::EIP, ID: <IP> |
| 74 | +INFO[0140] Resource: InternetGateway, Type: AWS::EC2::InternetGateway, ID: igw-016e1a71b9812464e |
| 75 | +INFO[0140] Resource: KMSVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 76 | +INFO[0140] Resource: NATGateway1, Type: AWS::EC2::NatGateway, ID: <nat-gateway-id> |
| 77 | +INFO[0140] Resource: PrivateRoute, Type: AWS::EC2::Route, ID: <route-id> |
| 78 | +INFO[0140] Resource: PrivateRouteTable, Type: AWS::EC2::RouteTable, ID: <route-id> |
| 79 | +INFO[0140] Resource: PrivateSubnetRouteTableAssociation1, Type: AWS::EC2::SubnetRouteTableAssociation, ID: <route-id> |
| 80 | +INFO[0140] Resource: PublicRoute, Type: AWS::EC2::Route, ID: <route-id> |
| 81 | +INFO[0140] Resource: PublicRouteTable, Type: AWS::EC2::RouteTable, ID: <route-id> |
| 82 | +INFO[0140] Resource: PublicSubnetRouteTableAssociation1, Type: AWS::EC2::SubnetRouteTableAssociation, ID: <route-id> |
| 83 | +INFO[0140] Resource: S3VPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 84 | +INFO[0140] Resource: STSVPCEndpoint, Type: AWS::EC2::VPCEndpoint, ID: <vpce-id> |
| 85 | +INFO[0140] Resource: SecurityGroup, Type: AWS::EC2::SecurityGroup, ID: <security-group-id> |
| 86 | +INFO[0140] Resource: SubnetPrivate1, Type: AWS::EC2::Subnet, ID: <private-subnet-id-1> \ <1> |
| 87 | +INFO[0140] Resource: SubnetPublic1, Type: AWS::EC2::Subnet, ID: <public-subnet-id-1> \ <1> |
| 88 | +INFO[0140] Resource: VPC, Type: AWS::EC2::VPC, ID: <vpc-id> |
| 89 | +INFO[0140] Stack rosa-network-stack-5555 created \ <2> |
| 90 | +---- |
| 91 | +<1> These two subnet IDs are used to create your cluster when using the `rosa create cluster` command. |
| 92 | +<2> The network stack name is used to delete the resource later. |
0 commit comments