Quick and Dirty shell script to create machinesets as seen on the Infra Node Twitch Stream
🚨 This script has been tested on OCP 4.5
Edit this script with your variables depending on your env
clusterid="cluster2-79bxd"
region="us-east-1"
zones=(us-east-1a us-east-1b us-east-1c)
ami="ami-00e472e63fc0dbe01"
clusterid
is the output ofoc get -o jsonpath='{.status.infrastructureName}' infrastructure cluster
region
is the AWS region your cluster is inzones
is an array of the AWS zones you want your infra node to be in.ami
is the name of the AWS ami of RHCOS
clusterid="cluster2-79bxd"
datacenter="Datacenter"
datastore="datastore1"
vspheresrv="vsphere.example.com"
clusterid
is the output ofoc get -o jsonpath='{.status.infrastructureName}' infrastructure cluster
datacenter
is the name of your datacenterdatastore
is the name of the datastore you want the VMs to be installed onvspheresrv
is the hostname of your vSphere/vCenter endpoint.
Run the script for AWS
./mk-machineset.sh
Run the script for vSphere
./mk-machineset.sh vsphere
Apply the manifest
⚠️ modify the files if you want to change the type of server.
oc apply -f ./out/
I make no guarantees for this QnD script, so YMMV. Use caution.