The purpose of this projecct is to automate the deployment of OpenShift (4.5) based on UPI , by producing ISO images that can be provisioned on servers via virtualmedia (or other means to upload an ISO). The procedure for composing the ISOs is heavily based on https://github.com/openshift/assisted-service and the preparation of the install is also based on https://github.com/openshift-kni/baremetal-deploy/tree/master/ansible-ipi-install.
You will need a server, which we will call provisioner from where all the procedure needs to be executed. From there, you could deploy as many clusters as you need. This is an ansible playbook, so you need to have Ansible (2.5+) installed on the host from where you will run it. When executing a baremetal deployment, you will need to consider all the requirements in terms of networking and DNS, as explained here. When performing a virtualized install, the desired number of masters and workers will be created on libvirt, and all the network automation will be provided by the playbook.
As this is an ansible playbook, the first thing that needs to be defined is the inventory file. We are providing the inventory.hosts.sample file that you can use - simply copy the content to inventory.hosts into the same path, and modify as needed. There are instructions provided into the same file.
Once you have defined the inventory, you can run the playbook. Simply execute:
ansible-playbook -v -i inventory/hosts playbook.yml
And the playbook will deploy the desired cluster for you. However, this playbook is divided into several steps, which can be run automatically using tags:
When needed, new ignition content can be added to master and worker roles. Simply create a new folder customize_ignition inside https://github.com/yrobla/openshift-upi-virtualmedia-deploy/tree/master/roles/installer-configuration/files , and create two new files called master or worker, with the ignition content you want to inject.
When deploying a new cluster, there is the possibility of injecting new manifests. Simply create a manifests folder inside https://github.com/yrobla/openshift-upi-virtualmedia-deploy/tree/master/roles/installer-configuration/files folder, and start adding manifests there.