Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 70 additions & 90 deletions modules/installation-creating-aws-bootstrap.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ To initialize the {product-title} control plane, create the bootstrap node in {a

[NOTE]
====
If you do not use the provided `CloudFormation` template to create your bootstrap
node, 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.
If you do not use the provided `CloudFormation` template to create your bootstrap node, 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
Expand All @@ -32,22 +29,27 @@ have to contact Red Hat support with your installation logs.
+
[source,terminal]
----
$ aws s3 mb s3://<cluster_name>-infra <1>
$ aws s3 mb s3://<cluster_name>-infra
----
<1> `<cluster_name>-infra` is the bucket name. When creating the `install-config.yaml` file, replace `<cluster_name>` with the name specified for the cluster.
+
where `<cluster_name>-infra` is the bucket name. When creating the `install-config.yaml` file, replace `<cluster_name>` with the name specified for the cluster.
+
--
You must use a presigned URL for your S3 bucket, instead of the `s3://` schema, if you are:
** Deploying to a region that has endpoints that differ from the {aws-short} SDK.
** Deploying a proxy.
** Providing your own custom endpoints.

* Deploying to a region that has endpoints that differ from the {aws-short} SDK.
* Deploying a proxy.
* Providing your own custom endpoints.
--

. Upload the `bootstrap.ign` Ignition config file to the bucket by running the following command:
+
[source,terminal]
----
$ aws s3 cp <installation_directory>/bootstrap.ign s3://<cluster_name>-infra/bootstrap.ign <1>
$ aws s3 cp <installation_directory>/bootstrap.ign s3://<cluster_name>-infra/bootstrap.ign
----
<1> For `<installation_directory>`, specify the path to the directory that you stored the installation files in.
+
where `<installation_directory>` is the path to the directory that you stored the installation files in.

. Verify that the file uploaded by running the following command:
+
Expand All @@ -73,97 +75,75 @@ The bootstrap Ignition config file does have secrets, such as X.509 keys. The fo
----
[
{
"ParameterKey": "InfrastructureName", <1>
"ParameterValue": "mycluster-<random_string>" <2>
"ParameterKey": "InfrastructureName",
"ParameterValue": "mycluster-<random_string>"
},
{
"ParameterKey": "RhcosAmi", <3>
"ParameterValue": "ami-<random_string>" <4>
"ParameterKey": "RhcosAmi",
"ParameterValue": "ami-<random_string>"
},
{
"ParameterKey": "AllowedBootstrapSshCidr", <5>
"ParameterValue": "0.0.0.0/0" <6>
"ParameterKey": "AllowedBootstrapSshCidr",
"ParameterValue": "0.0.0.0/0"
},
{
"ParameterKey": "PublicSubnet", <7>
"ParameterValue": "subnet-<random_string>" <8>
"ParameterKey": "PublicSubnet",
"ParameterValue": "subnet-<random_string>"
},
{
"ParameterKey": "MasterSecurityGroupId", <9>
"ParameterValue": "sg-<random_string>" <10>
"ParameterKey": "MasterSecurityGroupId",
"ParameterValue": "sg-<random_string>"
},
{
"ParameterKey": "VpcId", <11>
"ParameterValue": "vpc-<random_string>" <12>
"ParameterKey": "VpcId",
"ParameterValue": "vpc-<random_string>"
},
{
"ParameterKey": "BootstrapIgnitionLocation", <13>
"ParameterValue": "s3://<bucket_name>/bootstrap.ign" <14>
"ParameterKey": "BootstrapIgnitionLocation",
"ParameterValue": "s3://<bucket_name>/bootstrap.ign"
},
{
"ParameterKey": "AutoRegisterELB", <15>
"ParameterValue": "yes" <16>
"ParameterKey": "AutoRegisterELB",
"ParameterValue": "yes"
},
{
"ParameterKey": "RegisterNlbIpTargetsLambdaArn", <17>
"ParameterValue": "arn:aws:lambda:<aws_region>:<account_number>:function:<dns_stack_name>-RegisterNlbIpTargets-<random_string>" <18>
"ParameterKey": "RegisterNlbIpTargetsLambdaArn",
"ParameterValue": "arn:aws:lambda:<aws_region>:<account_number>:function:<dns_stack_name>-RegisterNlbIpTargets-<random_string>"
},
{
"ParameterKey": "ExternalApiTargetGroupArn", <19>
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Exter-<random_string>" <20>
"ParameterKey": "ExternalApiTargetGroupArn",
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Exter-<random_string>"
},
{
"ParameterKey": "InternalApiTargetGroupArn", <21>
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Inter-<random_string>" <22>
"ParameterKey": "InternalApiTargetGroupArn",
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Inter-<random_string>"
},
{
"ParameterKey": "InternalServiceTargetGroupArn", <23>
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Inter-<random_string>" <24>
"ParameterKey": "InternalServiceTargetGroupArn",
"ParameterValue": "arn:aws:elasticloadbalancing:<aws_region>:<account_number>:targetgroup/<dns_stack_name>-Inter-<random_string>"
}
]

----
<1> The name for your cluster infrastructure that your Ignition config files encode for the cluster.
<2> Specify the infrastructure name that you extracted from the Ignition config
file metadata, which has the format `<cluster_name>-<random_string>`.
<3> Current {op-system-first} AMI to use for the bootstrap node based on your selected architecture.
<4> Specify a valid `AWS::EC2::Image::Id` value.
<5> CIDR block to allow SSH access to the bootstrap node.
<6> Specify a CIDR block in the format `x.x.x.x/16-24`.
<7> The public subnet in your VPC to launch the bootstrap node into.
<8> Specify the `PublicSubnetIds` value from the output of the `CloudFormation`
template for the VPC.
<9> The control plane security group ID for registering temporary rules.
<10> Specify the `MasterSecurityGroupId` value from the output of the
`CloudFormation` template for the security group and roles.
<11> The VPC that the created resources will belong to.
<12> Specify the `VpcId` value from the output of the `CloudFormation` template
for the VPC.
<13> Location to fetch bootstrap Ignition config file from.
<14> Specify the S3 bucket and file name in the form
`s3://<bucket_name>/bootstrap.ign`.
<15> Whether or not to register a network load balancer (NLB).
<16> Specify `yes` or `no`. If you specify `yes`, you must give a Lambda
Amazon Resource Name (ARN) value.
<17> The ARN for NLB IP target registration lambda group.
<18> Specify the `RegisterNlbIpTargetsLambda` value from the output of the
`CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if
deploying the cluster to an {aws-short} `GovCloud` region.
<19> The ARN for external API load balancer target group.
<20> Specify the `ExternalApiTargetGroupArn` value from the output of the
`CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if
deploying the cluster to an {aws-short} `GovCloud` region.
<21> The ARN for internal API load balancer target group.
<22> Specify the `InternalApiTargetGroupArn` value from the output of the
`CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if
deploying the cluster to an {aws-short} `GovCloud` region.
<23> The ARN for internal service load balancer target group.
<24> Specify the `InternalServiceTargetGroupArn` value from the output of the
`CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if
deploying the cluster to an {aws-short} `GovCloud` region.

. Copy the template from the *`CloudFormation` template for the bootstrap machine* section and save it as a YAML file on your computer. This template
describes the bootstrap machine that your cluster requires.
+
where:
+
--
`InfrastructureName`:: Specifies the name for your cluster infrastructure that your Ignition config files encode for the cluster. Specify the infrastructure name that you extracted from the Ignition config file metadata, which has the format `<cluster_name>-<random_string>`.
`RhcosAmi`:: Specifies the current {op-system-first} AMI to use for the bootstrap node based on your selected architecture. Specify a valid `AWS::EC2::Image::Id` value.
`AllowedBootstrapSshCidr`:: Specifies the CIDR block to allow SSH access to the bootstrap node. Specify a CIDR block in the format `x.x.x.x/16-24`.
`PublicSubnet`:: Specifies the public subnet in your VPC to launch the bootstrap node into. Specify the `PublicSubnetIds` value from the output of the `CloudFormation` template for the VPC.
`MasterSecurityGroupId`:: Specifies the control plane security group ID for registering temporary rules. Specify the `MasterSecurityGroupId` value from the output of the `CloudFormation` template for the security group and roles.
`VpcId`:: Specifies the VPC that the created resources will belong to. Specify the `VpcId` value from the output of the `CloudFormation` template for the VPC.
`BootstrapIgnitionLocation`:: Specifies the location to fetch the bootstrap Ignition config file from. Specify the S3 bucket and file name in the form `s3://<bucket_name>/bootstrap.ign`.
`AutoRegisterELB`:: Specifies whether to register a network load balancer (NLB). Specify `yes` or `no`. If you specify `yes`, you must give a Lambda Amazon Resource Name (ARN) value.
`RegisterNlbIpTargetsLambdaArn`:: Specifies the ARN for NLB IP target registration lambda group. Specify the `RegisterNlbIpTargetsLambda` value from the output of the `CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if deploying the cluster to an {aws-short} `GovCloud` region.
`ExternalApiTargetGroupArn`:: Specifies the ARN for external API load balancer target group. Specify the `ExternalApiTargetGroupArn` value from the output of the `CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if deploying the cluster to an {aws-short} `GovCloud` region.
`InternalApiTargetGroupArn`:: Specifies the ARN for internal API load balancer target group. Specify the `InternalApiTargetGroupArn` value from the output of the `CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if deploying the cluster to an {aws-short} `GovCloud` region.
`InternalServiceTargetGroupArn`:: Specifies the ARN for internal service load balancer target group. Specify the `InternalServiceTargetGroupArn` value from the output of the `CloudFormation` template for DNS and load balancing. Use `arn:aws-us-gov` if deploying the cluster to an {aws-short} `GovCloud` region.
--

. Copy the template from the *`CloudFormation` template for the bootstrap machine* section and save it as a YAML file on your computer. This template describes the bootstrap machine that your cluster requires.

. Optional: If you are deploying the cluster with a proxy, you must update the ignition in the template to add the `ignition.config.proxy` fields. Additionally, If you have added the Amazon EC2, Elastic Load Balancing, and S3 VPC endpoints to your VPC, you must add these endpoints to the `noProxy` field.

Expand All @@ -176,18 +156,20 @@ You must enter the command on a single line.
+
[source,terminal]
----
$ aws cloudformation create-stack --stack-name <name> <1>
--template-body file://<template>.yaml <2>
--parameters file://<parameters>.json <3>
--capabilities CAPABILITY_NAMED_IAM <4>
$ aws cloudformation create-stack --stack-name <name> \
--template-body file://<template>.yaml \
--parameters file://<parameters>.json \
--capabilities CAPABILITY_NAMED_IAM
----
<1> `<name>` is the name for the `CloudFormation` stack, such as `cluster-bootstrap`.
You need the name of this stack if you remove the cluster.
<2> `<template>` is the relative path to and name of the `CloudFormation` template
YAML file that you saved.
<3> `<parameters>` is the relative path to and name of the `CloudFormation`
parameters JSON file.
<4> You must explicitly declare the `CAPABILITY_NAMED_IAM` capability because the provided template creates some `AWS::IAM::Role` and `AWS::IAM::InstanceProfile` resources.
+
where:
+
--
`<name>`:: Specifies the name for the `CloudFormation` stack, such as `cluster-bootstrap`. You need the name of this stack if you remove the cluster.
`<template>`:: Specifies the relative path to and name of the `CloudFormation` template YAML file that you saved.
`<parameters>`:: Specifies the relative path to and name of the `CloudFormation` parameters JSON file.
`CAPABILITY_NAMED_IAM`:: You must explicitly declare this capability because the provided template creates some `AWS::IAM::Role` and `AWS::IAM::InstanceProfile` resources.
--
+
.Example output
[source,terminal]
Expand All @@ -202,9 +184,7 @@ arn:aws:cloudformation:us-east-1:269333783861:stack/cluster-bootstrap/12944486-2
$ aws cloudformation describe-stacks --stack-name <name>
----
+
After the `StackStatus` displays `CREATE_COMPLETE`, the output displays values
for the following parameters. You must give these parameter values to
the other `CloudFormation` templates that you run to create your cluster:
After the `StackStatus` displays `CREATE_COMPLETE`, the output displays values for the following parameters. You must give these parameter values to the other `CloudFormation` templates that you run to create your cluster:
[horizontal]
`BootstrapInstanceId`:: The bootstrap Instance ID.
`BootstrapPublicIp`:: The bootstrap node public IP address.
Expand Down
Loading