Home > Workload Solutions > Container Platforms > Red Hat OpenShift Container Platform > Archive > Deployment Guide--Dell Ready Stack for Red Hat OpenShift Container Platform 4.3 CSI Attached Storage > Preparing and running Ansible playbooks
As user ansible, unless otherwise specified, prepare and run Ansible playbooks as follows:
[ansible@csah ~]$ sudo yum install python3
[ansible@csah ~]$ sudo pip3 install pyyaml requests
[ansible@csah python]$ python3 generate_inventory_file.py
Figure 2. Inventory file generation input tasks menu
Note: If you are unsure about the values, accept the default values, if any, that are listed for each option.
provide complete path of directory to download OCP 4.3 software bits
default [/home/ansible/files]:
Option 1 downloads OpenShift Container Platform 4.3 software from Red Hat into a directory for which user ansible has permissions. The instructions in this guide assume that the directory is specified as /home/ansible/files.
i Enter bootstrap node details including node names, the IP address assigned for bond0, and the iDRAC IP address and credentials.
ii Using iDRAC credentials, from the list of available network devices, select one interface whose MAC address is used by DHCP and PXE boot. Similarly, select interfaces to use as primary and secondary interfaces for bond:
Note: Ensure that the iDRAC IP address and credentials are accurate. If they are not accurate, you are provided with an option to continue. If you select y, then the program continues. If you select NO , then the program terminates.
enter the bootstrap node name
default [bootstrap]:
ip address for os in bootstrap node: 100.82.46.26
ip address for idrac in bootstrap node: 100.82.34.26
enter the idrac user for bootstrap: root
enter idrac password for bootstrap:
1 -> NIC.Integrated.1-1-1
2 -> NIC.Integrated.1-2-1
3 -> NIC.Slot.2-1-1
4 -> NIC.Slot.2-2-1
Select the interface used by DHCP: 3
selected interface is: NIC.Slot.2-1-1
device NIC.Slot.2-1-1 mac address is B8:59:9F:C0:35:86
adding bootstrap_node values as name: bootstrap ip: 100.82.46.26 mac: B8:59:9F:C0:35:86
1 -> NIC.Integrated.1-1-1
2 -> NIC.Integrated.1-2-1
3 -> NIC.Slot.2-1-1
4 -> NIC.Slot.2-2-1
Select the interface used by boostrap active bond interface: 3
selected interface is: NIC.Slot.2-1-1
selected bootstrap active bond interface: NIC.Slot.2-1-1
bootstrap active bond enumeration: ens2f0
1 -> NIC.Integrated.1-1-1
2 -> NIC.Integrated.1-2-1
3 -> NIC.Slot.2-1-1
4 -> NIC.Slot.2-2-1
Select the interface used by bootstrap backup bond interface: 4
Note: The selected network interface determines the calculation for network enumeration ens2fo. This network enumeration logic is tested in R640 servers.
Notes:
Provide the interfaces, IP address for bond0, node names, and other details for each node one at a time.
To ensure successful OpenShift cluster setup, enter information for at least three master nodes and two worker nodes. Bond options are added for all master/worker nodes. For the control plane, active-backup is used. For compute, active/active is used.
ensure disknames are absolutely available. Otherwise OpenShift install fails
specify the master device that will be installed
default [nvme0n1]:
specify the bootstrap device that will be installed
default [nvme0n1]:
specify the worker device that will be installed
default [nvme0n1]:
Note: This guide assumes that the NVMe drive in the first slot is used for the OpenShift installation.
specify zone file
default [/var/named/ocp.zones]:
specify cluster name
default [ocp]:
Note: Ensure that the zone file name is /var/named/<cluster name>.zones. In the example, the cluster name is ocp; the zone file is /var/named/ocp.zones.
enter http port
default [8080]:
specify dir where ignition files will be placed
directory will be created under /var/www/html
default [ignition]:
specify the version of ocp
default [4.3]:
enter the user used to install openshift
DONOT CHANGE THIS VALUE
default [core]:
enter the directory where openshift installs
directory will be created under /home/core
default [openshift]:
enter the pod network cidr
default [10.128.0.0/14]:
pod network cidr: 10.128.0.0/14
specify cidr notation for number of ips in each node:
cidr number should be an integer and less than 32
default [23]:
specify the service network cidr
default [172.30.0.0/16]:
Note: Do not change the user value from core. Only the core user is allowed to SSH into cluster nodes.
To modify any incorrect values, run the related option again and correct the values.
To review a sample file, see <git clone directory>/ansible/hosts.
Note: You must use the appropriate credentials that are required to download the software.
Notes:
You must have the appropriate Red Hat Customer Portal credentials to download the pull secret file.
This guide uses the /home/ansible/files directory containing the software code.
vars:
software_src: /home/ansible/files
pull_secret_file: pullsecret
rhel_os: rhel-server-7.8-x86_64-dvd.iso
Note: Copy the inventory_file file from the <git clone dir>/python/ to <git clone dir>/ansible/hosts directory.
[ansible@csah ansible] $ pwd
/home/ansible/openshift-bare-metal/ansible
[ansible@csah ansible] $ ansible-playbook -i hosts ocp.yml
The CSAH node is installed and configured with HTTP, HAProxy, DHCP, DNS, and PXE services. Also, the install-config.yaml file is generated, and the ignition config files are created and made available over HTTP.
Note: If there are any errors during program execution, see the inventory.log file under the <git clone dir>/python directory.