Prerequisites
Before beginning the installation process for the OpenShift Container Platform cluster on Oracle Cloud Infrastructure (OCI), ensure you have all the necessary accounts, resources, and configurations in place for a successful installation.
Accounts and Resources
- Red Hat Account: A Red Hat account and access to either the Assisted Installer or the Agent-based Installer.
- OCI Account: An OCI account with an Identity Domain and permissions to manage the following resources:
Additional Resources
- An internet domain to serve the OpenShift Container Platform console that runs on cluster resources in OCI.
- An SSH key pair for cluster installation.
- A pull secret from the Red Hat Hybrid Cloud Console. For more information, see Using image pull secrets (Red Hat documentation).
- (Optional) A dedicated compartment for the cluster resources. You can also use an existing compartment. For more information, see Understanding Compartments and Creating a Compartment.
- (Optional) An Object Storage bucket to store the discovery ISO image. You can also use an existing bucket. For more information, see Creating an Object Storage Bucket.
- Firewall access (Disconnected or Restricted Environments): If you use a firewall in your OCI environment and plan to use a Telemetry service, ensure the firewall has allowlisted OpenShift Container Platform to access the sites required. For more information, see Configuring your firewall for OpenShift Container Platform (Red Hat documentation).
- Supported instance shapes: Before creating an OCI instance for a cluster, verify which VM and bare metal shapes are certified for Red Hat Enterprise Linux (RHEL). For more information, see Supported Shapes and Cloud instance types on the Red Hat Ecosystem Catalog portal.
-
Permissions: OpenShift requires Manage permissions to perform operations on instances, volumes, and networking resources. Deploy OpenShift in a dedicated compartment to avoid conflicts with other applications that might be running in the same compartment.
Resource Attribution Tags
Before installing an OpenShift cluster on OCI, download and run the create-resource-attribution-tags stack from the OpenShift on OCI Releases page on GitHub. This stack creates a tag namespace defined-tags (openshift-tags)and and defined tags (openshift-resource) required which are used to tag OpenShift resources. These are required before using other Terraform stacks.
See Tags and Tag Namespace Concepts for instructions. For high-level tagging details, see the Terraform Defined Resources for OpenShift on OCI page on GitHub. For specific resource definitions, access the resource_attribution_tag folder in the shared_modules directory.
- Run the
create-resource-attribution-tagsstack before running thecreate-clusterstack to avoid installation failure. - The
create-resource-attribution-tagsstack only needs to be run once. If the tag namespace and defined-tags already exist, you can skip this step for future installations. - A tagging controller runs in the background to ensure the required OpenShift resource attribution tags are present on cluster resources during installation and ongoing reconciliation.
Configuration Files
The latest version of the stack with the required configuration files is automatically loaded when you open the Red Hat OpenShift plugin in the OCI Console.
To access an earlier version of the stack, navigate to the OpenShift on OCI Releases GitHub page and download the create-cluster.zip file from the Assets folder.
The create-cluster.zip file includes:
- Custom Manifests: The manifest files needed for OpenShift cluster installation. For more information about the files, see Custom Manifests.
- Terraform Stacks: The Terraform stack code for provisioning OCI infrastructure to create and manage OpenShift clusters. For more information, see Terraform Defined Resources for OpenShift.Note
To make changes to the manifests or Terraform code, you can clone the oracle-quickstart / oci-openshift GitHub repository and access thecustom_manifestsandterraform-stacksdirectories directly. Review the documentation in the repository and generate new Terraform stack zip files by running themakecommand.
Prerequisites for Autoscaling
In addition to other prerequisites, if you want to create an autoscaling stack, you need to download a stack Terraform (for adding autoscaling to an existing cluster), prepare an autoscaling RedHat Linux CoreOS (RHCOS) source image, and get a Pre-Authenticated Request (PAR) URL. You also need to install the RedHat OpenShift CLI, oc.
If you want to add autoscaling to an existing cluster, download an Autoscaler Operator stack from https://github.com/oracle-quickstart/oci-openshift/releases. Download the latest version of
create-autoscaler-operator.Note
You do not need to download a Terraform if you are creating a new cluster with Autoscaling.Download an OpenShift RHCOS image. Choose the image from https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/.
For example, for OpenShift 4.19.0:
curl -LO https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.19/4.19.0/rhcos-4.19.0-x86_64-openstack.x86_64.qcow2.gz gzip -d rhcos-4.19.0-x86_64-openstack.x86_64.qcow2.gzChoose either Virtual Machine or Bare Metal.
For Virtual Machine: Use the downloaded
qcow2directly:- Upload the
qcow2to Object Storage. - Create a Read PAR URL for that object, with Pre-authenticated request target: Object and Access type: Permit object reads. See: Creating a Pre-Authenticated Request in Object Storage.
- Store this PAR URL for the Terraform Stack.
For Bare Metal: Patch the downloaded
qcow2with iSCSI kargs using theiscsi.shshell script:- Copy the
iscsi.shscript from https://github.com/oracle-quickstart/oci-openshift/blob/main/assets/autoscaler/iscsi.sh. - Run the script on the
qcow2. For example:cd /path/to/iscsi.sh colima ssh sudo ./iscsi.sh /path/to/rhcos-4.19.0-x86_64-openstack.x86_64.qcow2
This creates:
rhcos-4.19.0-x86_64-openstack.x86_64-iscsi.qcow2- Upload the
- Upload the
-iscsi.qcow2to Object Storage. - Create a Read PAR URL for that object, with Pre-authenticated request target: Object and Access type: Permit object reads. See: Creating a Pre-Authenticated Request in Object Storage.
- Store this PAR URL for the Terraform Stack. You will need to paste it into the Autoscaler Image Source URI field when configuring your deployment with the Assisted or Agent-based installer.
- Install the RedHat OpenShift CLI,
oc. For the latest instructions, check the RedHat documentation. For example, for 4.22: https://docs.redhat.com/en/documentation/openshift_container_platform/4.22/html/cli_tools/openshift-cli-oc