Skip to content

Latest commit

 

History

History
173 lines (159 loc) · 5.44 KB

installation-creating-aws-worker.adoc

File metadata and controls

173 lines (159 loc) · 5.44 KB

Creating the worker nodes in AWS

You can create worker nodes in Amazon Web Services (AWS) for your cluster to use. The easiest way to manually create these nodes is to modify the provided CloudFormation template.

Important

The CloudFormation template creates a stack that represents one worker machine. You must create a stack for each worker machine.

Note

If you do not use the provided CloudFormation template to create your worker nodes, 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
  • Configure an AWS account.

  • Generate the Ignition config files for your cluster.

  • Create and configure a VPC and associated subnets in AWS.

  • Create and configure DNS, load balancers, and listeners in AWS.

  • Create control plane and compute roles.

  • Create the bootstrap machine.

  • Create the control plane machines.

Procedure
  1. Create a JSON file that contains the parameter values that the CloudFormation template requires:

    [
      {
        "ParameterKey": "InfrastructureName", (1)
        "ParameterValue": "mycluster-<random_string>" (2)
      },
      {
        "ParameterKey": "RhcosAmi", (3)
        "ParameterValue": "ami-<random_string>" (4)
      },
      {
        "ParameterKey": "Subnet", (5)
        "ParameterValue": "subnet-<random_string>" (6)
      },
      {
        "ParameterKey": "WorkerSecurityGroupId", (7)
        "ParameterValue": "sg-<random_string>" (8)
      },
      {
        "ParameterKey": "IgnitionLocation", (9)
        "ParameterValue": "https://api-int.<cluster_name>.<domain_name>:22623/config/worker" (10)
      },
      {
        "ParameterKey": "CertificateAuthorities", (11)
        "ParameterValue": "" (12)
      },
      {
        "ParameterKey": "WorkerInstanceProfileName", (13)
        "ParameterValue": "" (14)
      },
      {
        "ParameterKey": "WorkerInstanceType", (15)
        "ParameterValue": "m4.large" (16)
      }
    ]
    1. The name for your cluster infrastructure that is encoded in your Ignition config files 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 worker nodes.

    4. Specify an AWS::EC2::Image::Id value.

    5. A subnet, preferably private, to launch the worker nodes on.

    6. Specify a subnet from the PrivateSubnets value from the output of the CloudFormation template for DNS and load balancing.

    7. The worker security group ID to associate with worker nodes.

    8. Specify the WorkerSecurityGroupId value from the output of the CloudFormation template for the security group and roles.

    9. The location to fetch bootstrap Ignition config file from.

    10. Specify the generated Ignition config location, https://api-int.<cluster_name>.<domain_name>:22623/config/worker.

    11. Base64 encoded certificate authority string to use.

    12. Specify the value from the worker.ign file that is in the installation directory. This value is the long string with the format data:text/plain;charset=utf-8;base64,ABC…​xYz==.

    13. The IAM profile to associate with worker nodes.

    14. Specify the WorkerInstanceProfile parameter value from the output of the CloudFormation template for the security group and roles.

    15. The type of AWS instance to use for the control plane machines.

    16. Allowed values:

      • m4.large

      • m4.xlarge

      • m4.2xlarge

      • m4.4xlarge

      • m4.8xlarge

      • m4.10xlarge

      • m4.16xlarge

      • c4.large

      • c4.xlarge

      • c4.2xlarge

      • c4.4xlarge

      • c4.8xlarge

      • r4.large

      • r4.xlarge

      • r4.2xlarge

      • r4.4xlarge

      • r4.8xlarge

      • r4.16xlarge

        Important

        If m4 instance types are not available in your region, such as with eu-west-3, use m5 types instead.

  2. Copy the template from the CloudFormation template for worker machines section of this topic and save it as a YAML file on your computer. This template describes the networking objects and load balancers that your cluster requires.

  3. If you specified an m5 instance type as the value for WorkerInstanceType, add that instance type to the WorkerInstanceType.AllowedValues parameter in the CloudFormation template.

  4. Create a worker stack.

    1. Launch the template:

      Important

      You must enter the command on a single line.

      $ aws cloudformation create-stack --stack-name <name> (1)
           --template-body file://<template>.yaml \ (2)
           --parameters file://<parameters>.json (3)
      1. <name> is the name for the CloudFormation stack, such as cluster-workers. 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.

    2. Confirm that the template components exist:

      $ aws cloudformation describe-stacks --stack-name <name>
  5. Continue to create worker stacks until you have created enough worker Machines for your cluster.

    Important

    You must create at least two worker machines, so you must create at least two stacks that use this CloudFormation template.