mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
98 lines
5.6 KiB
Plaintext
98 lines
5.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * installing/installing_aws/ipi/installing-aws-outposts.adoc
|
|
|
|
ifeval::["{context}" == "installing-aws-outposts"]
|
|
:outposts:
|
|
endif::[]
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="installation-creating-aws-vpc-subnets-edge_{context}"]
|
|
= Creating subnets for AWS edge compute services
|
|
|
|
Before you configure a machine set for edge compute nodes in your {product-title} cluster, you must create a subnet in {zone-type}.
|
|
ifndef::outposts[Complete the following procedure for each Wavelength Zone that you want to deploy compute nodes to.]
|
|
|
|
You can use the provided CloudFormation template and create a CloudFormation stack. You can then use this stack to custom provision a subnet.
|
|
|
|
[NOTE]
|
|
====
|
|
If you do not use the provided CloudFormation template to create your AWS infrastructure, you must review the provided information and manually create the infrastructure. If your cluster does not initialize correctly, you might have to contact Red Hat support with your installation logs.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You configured an AWS account.
|
|
* You added your AWS keys and region to your local AWS profile by running `aws configure`.
|
|
ifndef::outposts[* You opted in to the {zone-type} group.]
|
|
ifdef::outposts[* You have obtained the required information about your environment from your {product-title} cluster, Outpost, and AWS account.]
|
|
|
|
.Procedure
|
|
|
|
. Go to the section of the documentation named "CloudFormation template for the VPC subnet", and copy the syntax from the template. Save the copied template syntax as a YAML file on your local system. This template describes the VPC that your cluster requires.
|
|
|
|
. Run the following command to deploy the CloudFormation template, which creates a stack of AWS resources that represent the VPC:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws cloudformation create-stack --stack-name <stack_name> \// <1>
|
|
--region ${CLUSTER_REGION} \
|
|
--template-body file://<template>.yaml \// <2>
|
|
--parameters \
|
|
ParameterKey=VpcId,ParameterValue="${VPC_ID}" \// <3>
|
|
ParameterKey=ClusterName,ParameterValue="${CLUSTER_NAME}" \// <4>
|
|
ParameterKey=ZoneName,ParameterValue="${ZONE_NAME}" \// <5>
|
|
ParameterKey=PublicRouteTableId,ParameterValue="${ROUTE_TABLE_PUB}" \// <6>
|
|
ParameterKey=PublicSubnetCidr,ParameterValue="${SUBNET_CIDR_PUB}" \// <7>
|
|
ParameterKey=PrivateRouteTableId,ParameterValue="${ROUTE_TABLE_PVT}" \// <8>
|
|
ifndef::outposts[ ParameterKey=PrivateSubnetCidr,ParameterValue="${SUBNET_CIDR_PVT}" <9>]
|
|
ifdef::outposts[]
|
|
ParameterKey=PrivateSubnetCidr,ParameterValue="${SUBNET_CIDR_PVT}" \// <9>
|
|
ParameterKey=PrivateSubnetLabel,ParameterValue="private-outpost" \
|
|
ParameterKey=PublicSubnetLabel,ParameterValue="public-outpost" \
|
|
ParameterKey=OutpostArn,ParameterValue="${OUTPOST_ARN}" <10>
|
|
endif::outposts[]
|
|
----
|
|
ifndef::outposts[<1> `<stack_name>` is the name for the CloudFormation stack, such as `cluster-wl-<local_zone_shortname>` for Local Zones and `cluster-wl-<wavelength_zone_shortname>` for Wavelength Zones. You need the name of this stack if you remove the cluster.]
|
|
ifdef::outposts[<1> `<stack_name>` is the name for the CloudFormation stack, such as `cluster-<outpost_name>`.]
|
|
<2> `<template>` is the relative path and the name of the CloudFormation template YAML file that you saved.
|
|
<3> `${VPC_ID}` is the VPC ID, which is the value `VpcID` in the output of the CloudFormation template for the VPC.
|
|
<4> `${CLUSTER_NAME}` is the value of *ClusterName* to be used as a prefix of the new AWS resource names.
|
|
<5> `${ZONE_NAME}` is the value of {zone-type} name to create the subnets.
|
|
ifndef::outposts[<6> `${ROUTE_TABLE_PUB}` is the Public Route Table Id extracted from the CloudFormation template. For Local Zones, the public route table is extracted from the VPC CloudFormation Stack. For Wavelength Zones, the value must be extracted from the output of the VPC's carrier gateway CloudFormation stack.]
|
|
ifdef::outposts[<6> `${ROUTE_TABLE_PUB}` is the Public Route Table ID created in the `${VPC_ID}` used to associate the public subnets on Outposts. Specify the public route table to associate the Outpost subnet created by this stack.]
|
|
<7> `${SUBNET_CIDR_PUB}` is a valid CIDR block that is used to create the public subnet. This block must be part of the VPC CIDR block `VpcCidr`.
|
|
ifndef::outposts[<8> `${ROUTE_TABLE_PVT}` is the *PrivateRouteTableId* extracted from the output of the VPC's CloudFormation stack.]
|
|
ifdef::outposts[<8> `${ROUTE_TABLE_PVT}` is the Private Route Table ID created in the `${VPC_ID}` used to associate the private subnets on Outposts. Specify the private route table to associate the Outpost subnet created by this stack.]
|
|
<9> `${SUBNET_CIDR_PVT}` is a valid CIDR block that is used to create the private subnet. This block must be part of the VPC CIDR block `VpcCidr`.
|
|
ifdef::outposts[<10> `${OUTPOST_ARN}` is the Amazon Resource Name (ARN) for the Outpost.]
|
|
+
|
|
.Example output
|
|
[source,text]
|
|
----
|
|
arn:aws:cloudformation:us-east-1:123456789012:stack/<stack_name>/dbedae40-820e-11eb-2fd3-12a48460849f
|
|
----
|
|
|
|
.Verification
|
|
|
|
* Confirm that the template components exist by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws cloudformation describe-stacks --stack-name <stack_name>
|
|
----
|
|
+
|
|
After the `StackStatus` displays `CREATE_COMPLETE`, the output displays values for the following parameters:
|
|
+
|
|
--
|
|
[horizontal]
|
|
`PublicSubnetId`:: The IDs of the public subnet created by the CloudFormation stack.
|
|
`PrivateSubnetId`:: The IDs of the private subnet created by the CloudFormation stack.
|
|
--
|
|
+
|
|
Ensure that you provide these parameter values to the other CloudFormation templates that you run to create for your cluster.
|
|
|
|
ifeval::["{context}" == "installing-aws-outposts"]
|
|
:!outposts:
|
|
endif::[]
|