# Deploying operating system on bare-metal nodes
Figure 11: High Level Flow diagram of the OS Deployment Process
Pre-requisites
- Centos 7 or RHEL Installer machine with the following configurations is essential to initiate the OS deployment process.
- At least 600 GB disk space (especially in the “/” partition), 4 CPU cores and 8GB RAM.
- 1 network interface with static IP address configured on same network as the management plane of the bare-metal servers and has access to internet.
- Python 3.6 or above is present and latest version associated pip is present.
- Ansible 2.9 should be installed
- OS ISO image is present in the HTTP file path within the installer machine.
- Ensure that SELinux status is disabled.
# SUSE hosts Configuration
* 2 network interfaces for the production network
* 1 local drive to be used as the boot device
* Boot mode is set to UEFI
* Boot order – Hard disk
* Secure Boot – disabled
# Installation
- Enable Python3 and Ansible Environment as mentioned in Installer machine section of deployment guide.
- Setup the installer machine.
> cd $BASE_DIR/Lite_Touch_Installation/playbooks/roles/os_deployment/tasks
> sh setup.sh
Enter the installer machine OS. (“rhel7” for RHEL OS and “centos7” for Centos OS)
NOTE
Run the below command to fix any unwanted space, tabs error.
> sed -i ‘s/r$//’ <path>/setup.sh
- Execute setup.sh script to install requirements for os deployment. Script expects the installer machine OS type, Please enter "rhel7" if the installer machine OS type is RHEL or "centos7" if the installer machine OS type is CentOS.
NOTE
Run the below command to fix any unwanted space, tabs error.
> sed -i 's/r$//' <path>/setup.sh
- The vars.yml file contains config and server section, both of which needs to be updated with values for all the variables present within them.
a. Edit config section in vars.yml file present in “$BASE_DIR/Lite_Touch_Installation/group_vars/all/” folder with the following command and add the details of web server and operating system to be installed. Default password for Ansible Vault file “vars.yml” is changeme.
Command to edit vars.yml
> ansible-vault edit vars.yml
b. Example values for the input configuration is as follows
{
“HTTP_server_base_url” : “http://10.0.x.x/”,
“HTTP_file_path” : “/usr/share/nginx/html/”,
“OS_type” : “sles15”,
“OS_image_name” : “<os_iso_image_name_with_extension>”
}
NOTE
Acceptable values for “OS_type” variable is “sles15” for SUSE 15 SP3.
c. Edit server section in vars.yml file present in “$BASE_DIR/Lite_Touch_Installation/group_vars/all/” folder Example values for the input configuration for deploying SLES 15 SP3 is as follows.
Note
- It is recommended to provide a complex password for the “Host_Password” variable.
[
{
“Server_serial_number” : “MXxxxxxDP”,
“ILO_Address” : “10.0.x.x”,
“ILO_Username” : “username”,
“ILO_Password” : “password”,
“Hostname” : “sles01.twentynet.local”,
“NodeRole” : “controller”,
“Bonding_Interface1” : “eth*”,
“Bonding_Interface2” : “eth*”,
“Host_IP” : “20.x.x.x”,
“Host_Username” : “root”,
“Host_Password” : “Password”,
“Host_Netmask” : “255.x.x.x”,
“Host_Prefix” : “8”,
“Host_Gateway” : “20.x.x.x”,
“Host_DNS” : “20.x.x.x”,
“Host_Search” : “twentynet.local”,
“GPU_Host” : “yes”
},
{
“Server_serial_number” : “MXxxxxxDQ”,
“ILO_Address” : “10.0.x.x”,
“ILO_Username” : “username”,
“ILO_Password” : “password”,
“Hostname” : “sles02.twentynet.local”,
“NodeRole” : “gateway”,
“Bonding_Interface1” : “eth*”,
“Bonding_Interface2” : “eth*”,
“Host_IP” : “20.0.x.x”,
“Host_Username” : “root”,
“Host_Password” : “Password”,
“Host_Netmask” : “255.x.x.x”,
“Host_Prefix” : “8”,
“Host_Gateway” : “20.x.x.x”,
“Host_DNS” : “20.x.x.x”,
“Host_Search” : “twentynet.local”,
“GPU_Host” : “No”
}
]
NOTE
Acceptable values for “GPU_Host” variable is “yes” for host which has GPU cards and “No” for hosts which do not have GPU cards.
- Change the current working directory to "$BASE_DIR/Lite_Touch_Installation/" and execute the playbook to deploy operating system using the following command.
> cd $BASE_DIR/Lite_Touch_Installation/
> ansible-playbook -i hosts playbooks/os_deployment.yml --ask-vault-pass
NOTE
- Generic settings done as part of kickstart file for SLES are as follows. It is recommended that the user reviews and modifies the kickstart files (autoinst.xml file) to suit their requirements.
Minimal Installation
Language – en_US
Keyboard & layout – US
Partition
/boot/efi ,fstype=”vfat” ,size=500MiB
root, size = 150G
srv , size = 100G
swap, size = 62.96G
var, size = 100G
home, size = 25G
NOTE
Specified Partitions are inline with HPERE implementation and is advised not to make changes to this.
timezone – America/NewYork
NIC teaming is performed with devices as specified in Bonding_Interface field of vars.yml, server section of the input file. It is further assigned with the Host_IP, Netmask, Domain as defined in the input file.
- Signature handling (accepting file without checksum, with non-trusted gpg key, unsigned file etc) is disabled by default to avoid any pop-ups and warnings and have an unattended installation. These properties can be modified according to the requirements in kickstart_files/autoinst.xml.
<accept_file_without_checksum
config:type=”boolean”>true</accept_file_without_checksum>
+ <accept_non_trusted_gpg_key
config:type=”boolean”>true</accept_non_trusted_gpg_key>
+ <accept_unknown_gpg_key
config:type=”boolean”>true</accept_unknown_gpg_key>
+ <accept_unsigned_file
config:type=”boolean”>true</accept_unsigned_file>
+ <accept_verification_failed
config:type=”boolean”>false</accept_verification_failed>
+ <import_gpg_key
config:type=”boolean”>true</import_gpg_key>