This procedure details the steps required to configure the hosts bare metal servers using the OCCNE os_install image, running within an os-install docker container, which provides a PXE based installer pre-configured to aid in the provisioning of the required hosts. This procedure will require the use of an inventory file (hosts.ini) which provides the install with all the necessary information about the cluster.
These procedures provide the steps required to install the OL7 image onto all hosts via the Bastion Host using a occne/os_install container. Once completed, all hosts includes all necessary rpm updates and tools necessary to run the k8-install procedure.
Limitations and Expectations
All steps are executable from a SSH application (putty) connected laptop accessible via the Management Interface.
References
https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html
Table 3-11 Procedure to run the auto OS-installer container
Step # | Procedure | Description |
---|---|---|
1.
|
Initial Configuration on the Bastion Host to Support the OS Install | This procedure is used to provide the steps
for creating directories and copying all supporting files to the appropriate
directories on the Bastion Host so that the OS Install Container successfully
installs OL7 onto each host.
Note: The cluster_name field is derived from the hosts.ini file field: occne_cluster_name.
|
2.
|
Retrieve the updated version of the Kickstart Configuration file |
The initial install of the OS requires an updated version of the kickstart configuration file. This file is maintained on the Oracle OHC software download site and must be copied to the appropriate folder prior to executing the initial OS install steps below.
|
3.
|
Copy the OL7 ISO to the Bastion Host |
The iso file is normally accessible from a Customer Site Specific repository. It is accessible because the ToR switch configurations were completed in procedure: OCCNE Configure Top of Rack 93180YC-EX Switches. For this procedure the file has already been copied to the /var/occne directory on RMS2 and can be copied to the same directory on the Bastion Host. Copy from RMS2, the OL7 ISO file to the /var/occne directory. The example below uses OracleLinux-7.5-x86_64-disc1.iso. Note: If the user copies this ISO from their laptop then they must use an application like WinSCP pointing to the Management Interface IP. $ scp root@172.16.3.5:/var/occne/OracleLinux-7.5-x86_64-disc1.iso /var/occne/OracleLinux-7.5-x86_64-disc1.iso |
4.
|
Set up the Boot Loader on the Bastion Host |
Execute the following commands:
Note: The
iso can be unmounted after the files have been copied if the user wishes to do
so using the command:
$ mkdir -p /var/occne/pxelinux $ mount -t iso9660 -o loop /var/occne/OracleLinux-7.5-x86_64-disc1.iso /mnt $ cp /mnt/isolinux/initrd.img /var/occne/pxelinux $ cp /mnt/isolinux/vmlinuz /var/occne/pxelinux |
5.
|
Verify and Set the PXE Configuration File Permissions on the Bastion Host | Each file configured in the step above must be
open for read and write permissions.
$ chmod 777 /var/occne/pxelinux $ chmod 777 /var/occne/pxelinux/vmlinuz $ chmod 777 /var/occne/pxelinux/initrd.img |
6.
|
Copy and Update .repo files |
|
7.
|
Execute the OS Install on the Hosts from the Bastion Host |
This procedure requires executing docker run for four different Ansible tags. Note: The <image_name>:<image_tag> represent the images in the docker image registry accessible by Bastion host. Note: The initial OS install is performed from the OS install container running bash because the new kickstart configuration file must be copied over the existing configuration prior to executing the Ansible playbook. Note: The <limit_filter> value used in the commands below is based on the settings in the hosts.ini file. See reference 1 above. An example used in this procedure is host_hp_gen_10[0:7]. The example hosts.ini file includes a grouping referred to as host_hp_gen_10. This can be considered an array of hosts with the 0:7 indicating the hosts (or indexes into that array) to include in the execution of the ansible commands listed below. In this example, the hosts would be all the k8s nodes (RMS3-5 and blades 1-4), db-1 (RMS1) and not include db-2 (RMS2). The settings at a customer site are specific to the site hosts.ini file and those used in this procedure are presented here as an example only. An example is illustrated below: Example section from a hosts.ini file:[host_hp_gen_10] k8s-1.rainbow.lab.us.oracle.com ansible_host=172.16.3.6ilo=192.168.20.123mac=48-df-37-7a-41-60 k8s-2.rainbow.lab.us.oracle.com ansible_host=172.16.3.7ilo=192.168.20.124mac=48-df-37-7a-2f-60 k8s-3.rainbow.lab.us.oracle.com ansible_host=172.16.3.8ilo=192.168.20.125mac=48-df-37-7a-2f-70 k8s-4.rainbow.lab.us.oracle.com ansible_host=172.16.3.11ilo=192.168.20.141mac=d0-67-26-b1-8c-50 k8s-5.rainbow.lab.us.oracle.com ansible_host=172.16.3.12ilo=192.168.20.142mac=d0-67-26-ac-4a-30 k8s-6.rainbow.lab.us.oracle.com ansible_host=172.16.3.13ilo=192.168.20.143mac=d0-67-26-c8-88-30 k8s-7.rainbow.lab.us.oracle.com ansible_host=172.16.3.14ilo=192.168.20.144mac=20-67-7c-08-94-40 db-1.rainbow.lab.us.oracle.com ansible_host=172.16.3.4ilo=192.168.20.121mac=48-df-37-7a-41-50 db-2.rainbow.lab.us.oracle.com ansible_host=172.16.3.5ilo=192.168.20.122mac=48-df-37-7a-40-40 In the above example host_hp_gen_10[0:7] would be all of the above hosts except for db-2 (RMS2) which is index 8 starting at index 0. So using limit filter of [0:7] would install all hosts except RMS2.
|
8.
|
Re-instantiate the management link bridge on RMS1 |
|