RedHatOfficial / ocp4-vsphere-upi-automation

Automates most of the manual steps of deploying OCP4.x cluster on vSphere
MIT License
131 stars 107 forks source link

Change VM Folder creation to install.yml from pre_install.yml #47

Closed cptmorgan-rh closed 4 years ago

cptmorgan-rh commented 4 years ago

In the Documentation for OCP 4.5 it states you need to create a folder in VMware with the same name as your cluster. However, doing so will result in the VMware StorageClass to fail because the folder name it is looking for is the infraID.

To resolve this I have moved the folder creating to the install.yaml file.

Using jq I parse the metadata.json file to obtain the infraID and we update the fact that is used to create the folder in vCenter later in the playbook.

Example install-config.yaml:

apiVersion: v1
baseDomain: lab.int
compute:
- hyperthreading: Enabled   
  name: worker
  replicas: 0
controlPlane:
  hyperthreading: Enabled   
  name: master
  replicas: 3 
metadata:
  name: openshift <--- Name of folder to create per OCP Docs
platform:
  vsphere:
    vcenter: 10.0.0.1
    username: administrator@vsphere.local
    password: <redacted>
    datacenter: DC
    defaultDatastore: datastore0
fips: False
pullSecret: 

Error message when trying to create a PVC using the StorageClass 'thin' that is created by the VMWare UPI installer.

Failed to provision volume with StorageClass "thin": folder '/LAB/vm/openshift-hkzhw' not found

BZ 1849434

ironicbadger commented 4 years ago

Sorely needed +1