Prerequisites for installation
Before you can start the build process to install the Red Hat® OpenShift® cluster, the following steps are required.
- Order new subnets for the Red Hat OpenShift environment.
- A private portable subnet for the Red Hat OpenShift cluster NSX ESG.
- A public portable subnet for the Red Hat OpenShift cluster NSX ESG.
- Download Red Hat OpenShift 4.7 - Access to a Red Hat® subscription to download the installer, pull secret, and Red Hat Enterprise CoreOS OVA.
- Download RHEL 8.0 ISO - Access to a Red Hat subscription to download the Red Hat Enterprise Linux® 8.x ISO for the bastion host.
- IBM Cloud® environment details - Collect the following details for IBM Cloud for VMware® Solutions environment.
- VMware Cloud Foundation for Classic - Automated instance details and passwords
- The additional private portable subnet information
- The additional public portable subnet information
- Download and install
govc
-govc
is a VMware vSphere® CLI, an alternative to the GUI, and suited for automation tasks.
Ordering new subnets for the Red Hat OpenShift environment
- Log in to the IBM Cloud for VMware Solutions console.
- Click Infrastructure > Classic Infrastructure > Network > IP management > Subnets from the left navigation menu.
- Click Order IP Subnets.
Review the following requirements.
- 8 Public portable addresses assigned to the Public VLAN collected in the previous step.
- 64 Private portable addresses assigned to the Private VLAN collected in the previous step.
Downloading Red Hat OpenShift 4.7
Access the Red Hat OpenShift Infrastructure Providers page.
- Download the installer.
- Download the Pull Secret.
- Download the Red Hat Enterprise Linux CoreOS (RHEL CoreOS) OVA image or download the OVA by using the following code. Replace 4.x and 4.x.3 with the current Red Hat OpenShift version, for example, 4.7.
curl -O https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.x/latest/rhcos-4.x.3-x86_64-vmware.x86_64.ova
- Download the command-line tools if you want to run the commands from a desktop or outside Bastion host.
Downloading RHEL 8.0 ISO
Download the ISO image for the bastion host.
- Go to the Red Hat Product downloads page.
- Click RHEL 8.x Release and select the 8.x version.
- Download the source ISO images.
- The ISO file name is
rhel-8.x-x86_64-dvd.iso
.
Collecting vCenter Server instance details
Access the IBM Cloud environment details.
- Log in to the IBM Cloud for VMware Solutions console.
- Click the IBM Cloud for VMware Solutions instance under Deployed Instances.
- From the Summary page, collect the vCenter and Active Directory information.
- Click Infrastructure and select the cluster.
- Under Network Interfaces, collect the Public and Private VLANs.
Downloading and installing govc
The govc
command is used to upload the OVF and ISO to a datastore from the jump-server or remote device.
If your jump-host or remote device uses Windows®, then download from Downloads.
If your remote device uses macOS, then use the following command: brew install govmomi/tap/govc
If you need to install Homebrew, see Installing Homebrew on a Mac.
If your jump-host or remote device uses Linux, complete the following steps:
- Download
govc
and make it executable. Runcurl -L https://github.com/vmware/govmomi/releases/download/v0.20.0/govc_linux_amd64.gz | gunzip > /usr/local/bin/govc
. - Run
chmod +x /usr/local/bin/govc
.
Validating Distributed PortGroup and Datastore names
vCenter Server deployment uses deployment-specific naming for the datastores and distributed PortGroups. This runbook uses 'vsanDatastore', 'SDDC-DPortGroup-Mgmt' and 'SDDC-DPortGroup-External'. You need to use your vCenter Server deployment-specific network and storage names in your deployment configurations. For example, you might have datastore such as 'workload_share_YgkI8' (in case IBM Cloud File Storage for Classic is used for the datastore) or your private portgoup can be like 'fra04test-fra04-test01-dpg-mgmt'.
You can validate the private and public Distributed PortGroup names and the datastore names for your deployment by using GOVC.
export GOVC_URL='10.208.17.2'
export GOVC_USERNAME='administrator@vsphere.local'
export GOVC_PASSWORD='xxxxx'
export GOVC_INSECURE=1
# Distributed Port Group names
govc ls network | grep -E 'dpg-mgmt|SDDC-DPortGroup-Mgmt' | awk -F / '{print $4}'
govc ls network | grep -E 'dpg-external|SDDC-DPortGroup-External' | awk -F / '{print $4}'
# Datastore names
govc ls datastore | grep -E 'vsan|share' | awk -F / '{print $4}'
Pick your deployment-specific values and use them throughout the runbook.
Uploading the OVA image to vCenter
You must upload and import the RHEL ISO and RHEL CoreOS OVA downloads from the previous steps into the vCenter Server instance datastore. You must rename the OVA image to rhcos-latest in order for the image to work with the Terraform templates used later in the build process.
On the jump-server or remote device, by using an editor of your choice, such as Visual Studio Code, copy the following and change for your values. Replace the x in 4.x.3 with the current Red Hat OpenShift version, for example, 4.7.
export GOVC_URL='10.208.17.2'
export GOVC_USERNAME='administrator@vsphere.local'
export GOVC_PASSWORD='xxxxx'
export GOVC_INSECURE=1
export GOVC_NETWORK='SDDC-DPortGroup-Mgmt'
export GOVC_DATASTORE='vsanDatastore'
rhcos-4.x-x86_64-vmware.x86_64.ova
govc import.spec ./rhcos-4.x-x86_64-vmware.x86_64.ova | python -m json.tool > rhcos.json
vi rhcos.json
- replace "Network": "SDDC-DPortGroup-Mgmt"
- leave name as "VM network"
govc import.ova -options=./rhcos.json -name=rhcos-4.x-x86_64-vmware.x86_64.ova
govc vm.markastemplate vm/rhcos-latest
Uploading the ISO image to vCenter storage
Use the following govc
example to upload the ISO image for the creation of the bastion node:
export GOVC_URL='10.208.17.2'
export GOVC_USERNAME='administrator@vsphere.local'
export GOVC_PASSWORD='xxx'
export GOVC_INSECURE=1
export GOVC_DATASTORE='vsanDatastore'
govc datastore.mkdir isos
govc datastore.upload rhel-8.x-x86_64-dvd.iso isos/rhel-8.x-x86_64-dvd.iso