In my previous blog post, I introduced the integration of Red Hat OpenShift with Oracle Cloud Infrastructure (OCI) and outlined the minimum requirements and key details. In this post, we'll take a closer look at the steps to deploy OpenShift on OCI using the agent-based installer.
Let's dive deep into each of these steps.
Step 1: Get the latest agent-based installer
To begin, be sure you have the latest OpenShift installer binary (version 4.14). Download the latest OpenShift-installer binary from Red Hat Hybrid Cloud Console – for example, here is the agent-based installer to install OpenShift on bare metal locally with agent: https://console.redhat.com/openshift/install/metal/agent-based
Downloading the agent-based installer
Use this procedure to download the agent-based installer and the command line interface (CLI) needed for your installation:
- Log in to the OpenShift web console using your login credentials.
- Navigate to Datacenter.
- Click Run Agent-based Installer locally.
- Select the operating system and architecture for the OpenShift Installer and command line interface
- Click Download Installer to download and extract the install program
- You can either download or copy the pull secret by clicking on Download pull secret or Copy pull secret
- Click Download command-line tools and place the openshift-install binary in a directory that is on your PATH
Important: Using the Agent-based Install to install a Red Hat OpenShift cluster on OCI is a Developer Preview feature. For more information Developer Preview overview, see developer and Technology Previews: How they compare
You can Request Access to Red Hat OpenShift on Oracle Cloud Infrastructure in Developer Preview form.
You can familiarize yourself with OpenShift with the official documentation:
Installation and update | Architecture | Red Hat OpenShift 4.14
Step 2: Prepare agent-config.yaml and install-config.yaml
Once your infrastructure is in place, prepare the necessary configuration files for the installation process. Modify the "agent-config.yaml" and "install-config.yaml" files to match your specific environment. Be sure that you set the rendezvousIP in "agent-config.yaml" to an IPv4 address from your VCN CIDR, if you are using IPV4 networking. Here's a minimal example for a three-node compact connected IPv4 cluster configuration:
# agent-config.yaml
apiVersion: v1alpha1
metadata:
name: <CLUSTER_NAME>
namespace: <CLUSTER_NAMESPACE>
rendezvousIP: <MUST_BE_AN_IP_FROM_MACHINE_NETWORK_VCN_CIDR>
# install-config.yaml
apiVersion: v1
metadata:
name: <CLUSTER_NAME>
baseDomain: <BASE_DOMAIN>
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
networkType: OVNKubernetes
machineNetwork:
- cidr: <MACHINE_NETWORK_VCN_CIDR>
serviceNetwork:
- 172.30.0.0/16
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
replicas: 0
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
replicas: 3
platform:
external:
platformName: oci
cloudControllerManager: External
sshKey: <PUBLIC_SSH_KEY>
pullSecret: '<PULL_SECRET>'
Step 3: Prepare cloud control manager custom manifests
Create a new directory named "openshift" and download two Oracle cloud control manager (CCM) custom manifests custom_manifests/manifests/oci-ccm.yml and custom_manifests/openshift/machineconfig-ccm.yml from the oracle-quickstart/oci-openshift GitHub repository into the "openshift" directory. Update "oci-ccm-04-cloud-controller-manager-config.yaml" with your specific settings, including region, compartment OCID, VCN OCID, and subnet OCID. These manifests deploy Oracle’s CCM during cluster installation, so that OpenShift can connect with the external Oracle Cloud Infrastructure platform.
Step 4: Prepare container storage interface custom manifests
CSI manifests allow Oracle's CSI driver to be deployed at install time. CSI custom manifests are under development. For more information, please contact Oracle on their oracle-quickstart/oci-openshift GitHub page or open a support case on the Red Hat Customer Portal.
Step 5: Generate a minimal ISO using the Red Hat OpenShift agent-based installer
With all the configuration and manifest files in place, you can now generate the agent ISO. Assuming you have the "openshift-install" binary downloaded and all files prepared, run the following command:
./openshift-install agent create image --log-level debug
This command generates the agent ISO along with an auth directory containing kubeconfig and kubeadmin passwords and a rendezvousIP file with the IP set in the agent-config.yaml.
Step 6: Create a custom image in OCI
Create a custom image in Oracle Cloud Infrastructure following the steps outlined in the Oracle documentation. You need to upload the agent ISO to a storage bucket and import it as a custom image. Be sure that you configure the image to boot using UEFI.
Step 7: Set up OCI
Before you can install an OpenShift cluster in OCI, you'll need to prepare the required infrastructure in OCI. This includes creating a compartment, setting up virtual cloud networks (VCNs), network security groups, load balancers, DNS records, instances and storage buckets, etc. Make sure that you have appropriate policies and permissions to manage these resources.
Here are some helpful Oracle documentation for these tasks:
- Create a Compartment
- Creating a VCN
- Creating Network Security Groups
- Creating a Dynamic Group and a Policy for Self-Managed Nodes
- Create Policies
- Creating a Load Balancer
- Adding a Record to a DNS Zone
- Creating compute instances
Create the compute instances in OCI based on your desired cluster topology (Single Node OpenShift, Highly Available, or Compact). Be sure to check the memory and disk requirements and select the custom image you created in Step 7. Also, make sure that at least one compute instance has the same IP address as mentioned in the agent-config.yaml file under rendezvousIP.
Once the instances are booted, you can monitor the cluster status using the kubeconfig generated during image creation. Set the KUBECONFIG environment variable and use oc commands to check the cluster nodes and operators.
oc get nodes -A
NAME STATUS ROLES AGE VERSION
master-0.private.agenttest.oraclevcn.com Ready control-plane, master, worker 15m v1.27.9+e36e183
master-1.private.agenttest.oraclevcn.com Ready control-plane, master, worker 15m v1.27.9+e36e183
master-2.private.agenttest.oraclevcn.com Ready control-plane, master, worker 15m v1.27.9+e36e183
oc get co
Truncated output
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
authentication 4.14.10 True False False 6m18s
baremetal 4.14.10 True False False 2m42s
network 4.14.10 True True False 5m58s Progressing: …
Conclusion
This deep dive provides a comprehensive guide to deploying Red Hat OpenShift on Oracle Cloud Infrastructure using the agent-based installer. Following these steps will install OpenShift in your OCI environment, whether you need a single-node cluster or a highly available multi-node setup.
Learn more
저자 소개
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.