Based on the Installer User Provided Infraestructure (UPI) repo for VMWare, and following the Blog Post it install a minimal, parametrizable cluster with role based resource and naming and automatic kernel parametrization.
The following playbooks and scripts were tested on the following versions for this technologies:
- VMWare® VSphere® 6.7
- Red Hat CoreOS iso installer 4.3.8
- Red Hat CoreOS BIOS metal 4.3.8
- Terraform 0.12
- Python 3.6
Role based resource distribution of metal-like installation over VSphere. Runs on terraform 0.12 with the following variables (terraform.tfvars)
- vsphere_server
- vsphere_user
- vsphere_password
- vsphere_cluster
- vsphere_folder
- vsphere_datacenter
- vsphere_datastore
- vsphere_guest_id
- vsphere_iso_path
- vm_network
- cluster_id
- vm_prefix
- info
It creates the number of machines specified in the variables as well as naming them (customizable**) with specific resources per node-role.
Default specifications:
Count | Role | CPU | RAM | Disk(s) | Prefix | Ip |
---|---|---|---|---|---|---|
1 | Bootstrap | 4 | 8Gi | 1x60Gb | boots | 2 |
3 | Master | 4 | 8Gi | 1x60Gb | ctrl | 3 |
2 | Application | 4 | 8Gi | 1x60Gb | app | 4 |
vi terraform.tfvars # custom vars
terraform init
terraform plan # optional
terraform apply -auto-approve
Automatic bot for setting of network-specific kernel params of RHCOS, for openshift installation. The params that need to be sent are:
- ip
- nameserver
- coreos.inst.install_dev
- coreos.inst.image_url
- coreos.inst.ignition_url
The bot builds the string and sends it char by char. The following parameters are required:
Short Flag | Long Flag | Description |
---|---|---|
-w | --webdriver-dir | Webdriver Folder |
-s | --vsphere-url | VMWare VSphere URL |
-u | --username | VMWare VSphere user |
-p | --password | VMWare Vsphere password |
-g | --gateway | IP Gateway |
-d | --dns | DNS Server |
-m | --mask | Network Mask |
-n | --network-interface | Default Network Interface |
-b | --base-url | FQDN base url |
-i | --image-url | Install Image URL |
-l | --ignition-url | Install Ignition Base URL |
-f | --servers-file | Servers csv file |
It also needs a csv file describing the created vms with the following headers:
- Virtual Machine Name
- FQDN name
- IP
- Ignition file name (per initial role)
ocp_boots1_2,boots1,192.168.0.2,append-bootstrap.ign
ocp_ctr1_3,ctr1,192.168.0.3,master.ign
ocp_ctr2_4,ctr2,192.168.0.4,master.ign
ocp_ctr3_5,ctr3,192.168.0.5,master.ign
ocp_app1_6,app1,192.168.0.6,worker.ign
ocp_app2_7,app2,192.168.0.7,worker.ign
ocp_app3_9,app3,192.168.0.9,worker.ign
wget https://github.com/mozilla/geckodriver/releases/download/v0.**.0/geckodriver-v0.**.0-platform.tar.gz # check latest version and platform
virtualenv -p /usr/bin/python3 local-venv
pip install -r requirements.txt
vi servers.csv # customize servers
python main.py -h # check params
python main.py #...
As described in the UPI Installation Guide, the default settings cover the minimal resource requirements of compute. You need to provision externally the load balancers and the dns requirements. As well as prepare the ignition scripts with the openshift-install binary and expose them on a http server cluster-wide available.
- Terraform: loop/dynamic module loading per node role
- Terraform: custom naming function?
- Terraform: different datastore for iso?
- Selenium: search for folder name instead of choosing first
- Selenium: lambda/one loop for string build and operations
- Selenium: check if webconsole is the default choice in vsphere
VSCode 🎀