Deploying Openshift in an automated way typically depends on traditional network services like dhcp-server, dns, http, etc… One method to deploying OCP is to set up a utility server to run these services. This simplfies configuration and control of the deployment.
Alhtough the utility host can be preloaded with RHEL 7 or 8, at this time the majoirty of the testing is done with RHEL 8.
-
RHEL 7.9 or 8.0+
-
installed packages: git, ansible 2.9
-
configured (accessible) repos for base, optional/appstream and ansible
-
log on to cloud.redhat.com and get your pull-secret.txt
-
internet access (either direct or via proxy)
Starting with a simple deployment of RHEL 8
-
Configure Repos (subscription-manager register)
-
Install ansible-2.9
-
Install git
yum install git ansible
As the user 'root', change to you home directory and clone the source.
cd ~ git clone http://github.com/xtophd/OCP4-Workshop
In the git project directory you just cloned, run the following to view the development activity and changes you need to be aware of.
cd ~/OCP4-Workshop git log --oneline --decorate
You can use a sample-config to start this process. Please note that in this example we are using a "utility-host-only" template.
cd ./OCP4-Workshop/config cp ../sample-configs/utility-host-only/* .
|
You must edit the config files for your deployment. There is no magic installation. |
Just like the name implies 'master-config.yml' is the main configuration file. Most parameters should be straight forward, but in particular you need to:
-
fix hostnames, mac addresses & ip addresses
-
set or comment out h_rhcosDEV and r_rhcosNIC accordingly
Adjust the workshopuser_username and workshopuser_password in the credentials.yml file.
Now, encrypt the file for security
ansible-vault encrypt credentials.yml
|
The file /root/OCP4-Workshop/config/pull-secret.txt must exist on the deployer host before you continue. |
ℹ️
|
Pull secret URL: https://cloud.redhat.com/openshift/install/metal/user-provisioned |
Using a browser, go to redhat.com and retrieve the pull-secret. You can either:
-
download the pull-secret.txt and transfer it to the config directory, OR
-
copy the pull-secret.txt to the paste buffer and then edit pull-secret.txt and paste the contents
Now it’s time to run the playbooks which configure and enable the services in preparation for the Openshift cluster deployment.
cd ./OCP4-Workshop/ bash ocp4-workshop.sh all
Once the playbooks have completed without error, you can run the playbooks again with a different flag ('usher') to help guide your manual deployment.
cd ./OCP4-Workshop/ bash prepare-ocp4-workshop.sh usher