Create an OPENSHIFT ROSA cluster via CLI

OpenShift ROSA AWS CLI

What is Red Hat OpenShift Service on AWS?

ROSA is a fully-managed, turnkey application platform that allows you to focus on delivering value to your customers by building and deploying applications. Red Hat site reliability engineering (SRE) experts manage the underlying platform so you do not have to worry about the complexity of infrastructure management. Red Hat OpenShift Service on AWS provides seamless integration with Amazon CloudWatch, AWS Identity and Access Management (IAM), Amazon Virtual Private Cloud (VPC), and a wide range of additional AWS services to further accelerate the building and delivering of differentiating experiences to your customers.
You subscribe to the service directly from your AWS account. After you create clusters, you can operate your clusters with the OpenShift web console, the Red Hat OpenShift Service on AWS CLI, or through Red Hat OpenShift Cluster Manager.
You receive OpenShift updates with new feature releases and a shared, common source for alignment with OpenShift Container Platform. ROSA supports the same versions of OpenShift as Red Hat OpenShift Dedicated and OpenShift Container Platform to achieve version consistency.

ROSA cluster deployment models
 
 
ROSA provides two cluster deployment models: ROSA with hosted control planes (ROSA with HCP) and ROSA classic. With ROSA with HCP, each cluster has a dedicated control plane that is isolated within Red Hat’s AWS account and managed by Red Hat. With ROSA classic, cluster control plane infrastructure is hosted in the customer’s AWS account.

ROSA with HCP offers a more efficient control plane architecture that helps reduce the AWS infrastructure fees incurred when running ROSA and allows for faster cluster creation times. For more information about ROSA with HCP and ROSA classic, see Deployment options.

Note
ROSA with hosted control planes does not offer compliance certifications or Federal Information Processing Standards (FIPS) at this time. For more information, see Compliance in the Red Hat documentation.

Before you start....

AWS Management Console/AWS CLI

Configure permissions for AWS services that ROSA relies on to deliver service functionality. For more information, see Prerequisites.
Install and configure the latest AWS CLI tool. For more information, see Installing our updating the latest version of the AWS CLI in the AWS CLI User Guide.
Enable ROSA in the ROSA console.

In this tutorial i will  demonstrate how to create a new cluster on AWS managed OpenShift ROSA,
it will be simple and straight forward.

Prerequisites:

  • AWS account configured.
  • ROSA enabled on your AWS account.
  • OpenShift CLI installed.

 

First thing take a peek at your AWS account details, just to be sure it’s configured:

aws sts get-caller-identity 

Log in to your Red Hat account, saving the credentials to the ROSA configuration file. You must provide a token when logging in. You can copy your token from the Red Hat OpenShift Service on AWS token page.

rosa login <TOKEN>

View ROSA profile:

rosa whoami

Verify ROSA permissions:

rosa verify permissions

init, runs a short cloud formation template that configures the AWS account ready to the deployment and management of the cluster:

rosa init 

List existing clusters:

rosa list clusters

Create a new cluster:

rosa create cluster --cluster-name=<cluster-name>

To watch the logs run:

rosa logs install -c <cluster-name> --watch

After cluster is created run describe to get the cluster details:

rosa describe cluster -c <cluster-name>

Create admin account for the cluster, the output of the following command is an oc command with the user and it’s password:

rosa create admin -c <cluster-name>

Use this command to login:

oc login https://api.<cluster-name>.pr6b.d3.openshiftapps.com:6443 --username cluster-admin --password xxxxx-xxxxx-xxxxx-xxxxx

Verify that you have admin privileges by running this:

oc whoami && oc version && oc get nodes