×

This document contains a set of prerequisites that must be run once before you can create your first ROSA cluster.

AWS

An AWS account with the AWS ROSA prerequisites met.

AWS console ROSA prequisites

AWS CLI

MacOS
  • Install AWS CLI using the MacOS command line:

    $ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
    $ sudo installer -pkg AWSCLIV2.pkg -target /

    See AWS Documentation for alternative install options.

Linux
  • Install AWS CLI using the Linux command line:

    $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    $ unzip awscliv2.zip
    $ sudo ./aws/install

    See AWS Documentation for alternative install options.

Windows
  • Install AWS CLI using the Windows command line:

    $ C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

    See AWS Documentation for alternative install options.

Prepare AWS Account for OpenShift

  1. Configure the AWS CLI by running:

    $ aws configure
  2. You will be required to enter an AWS Access Key ID and an AWS Secret Access Key along with a default region name and output format:

    $ aws configure
    Sample output
    AWS Access Key ID []:
    AWS Secret Access Key []:
    Default region name [us-east-2]:
    Default output format [json]:

    The AWS Access Key ID and AWS Secret Access Key values can be obtained by logging in to the AWS console and creating an Access Key in the Security Credentials section of the IAM dashboard for your user.

  3. Validate your credentials:

    $ aws sts get-caller-identity

    You should receive output similar to the following:

    Sample output
    {
        "UserId": <your ID>,
        "Account": <your account>,
        "Arn": <your arn>
    }
  4. If this is a new AWS account that has never had a AWS Load Balancer (ALB) installed in it, run the following:

    $ aws iam create-service-linked-role --aws-service-name \
        "elasticloadbalancing.amazonaws.com"

Get a Red Hat Offline Access Token

  1. Log into OpenShift Cluster Manager Hybrid Cloud Console.

  2. Navigate to OpenShift Cluster Manager API Token.

  3. Copy the Offline Access Token and save it for the next step.

Set up the OpenShift CLI (oc)

  1. Download the operating system specific OpenShift CLI from Red Hat.

  2. Extract the downloaded file on your local machine.

  3. Place the extracted oc executable in your operating system path or local directory.

Set up the ROSA CLI (rosa)

  1. Download the operating system specific ROSA CLI from Red Hat.

  2. Extract the downloaded file on your local machine.

  3. Place the extracted rosa and kubectl executables in your operating system path or local directory.

  4. Log in to ROSA:

    $ rosa login

    You will be prompted to enter in the Red Hat Offline Access Token you retrieved earlier and should receive the following message:

    Logged in as <email address> on 'https://api.openshift.com'
  5. Verify that ROSA has the minimal quota:

    $ rosa verify quota

    Expected output:

    AWS quota ok

Associate your AWS account with your Red Hat account

To perform ROSA cluster provisioning tasks, you must create ocm-role and user-role IAM resources in your AWS account and link them to your Red Hat organization.

  1. Create the ocm-role which the OpenShift Cluster Manager will use to be able to administer and Create ROSA clusters. If this has already been done for your OpenShift Cluster Manager Organization, you can skip to creating the user-role:

    If you have multiple AWS accounts that you want to associate with your Red Hat Organization, you can use the --profile option to specify the AWS profile you want to associate.

    $ rosa create ocm-role --mode auto --yes
  2. Create the User Role that allows OpenShift Cluster Manager to verify that users creating a cluster have access to the current AWS account:

    If you have multiple AWS accounts that you want to associate with your Red Hat Organization, you can use the --profile option to specify the AWS profile you want to associate.

    $ rosa create user-role --mode auto --yes
  3. Create the ROSA Account Roles which give the ROSA installer and machines permissions to perform actions in your account:

    $ rosa create account-roles --mode auto --yes

Conclusion

You are now ready to create your first cluster.