XCAT Installation on Centos 8
Base Level Setup
Note: Starting point Centos minimal 8.2 with networking in place and setup
We start by setting the hostname and disabling SElinux
setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux yum -y install vim tmux wget rsyslog systemctl enable rsyslog systemctl start rsyslog
Setup naming and hosts file
Set the hostname
hostnamectl set-hostname deploy.dt.internal
Set the /etc/hosts file
# Ensure there is a /etc/hosts entry for the internal interface 192.168.102.253 deploy.dt.internal deploy
Disable the firewall
Disable the firewall
systemctl disable firewalld systemctl stop firewalld
Setup the software repos
yum -y install yum-utils wget --no-check-certificate -P /etc/yum.repos.d https://xcat.org/files/xcat/repos/yum/latest/xcat-core/xcat-core.repo yum -y install centos-release-stream wget --no-check-certificate -P /etc/yum.repos.d https://xcat.org/files/xcat/repos/yum/xcat-dep/rh8/x86_64/xcat-dep.repo
Add provisioning services on the headnode
yum -y install xCAT echo ". /etc/profile.d/xcat.sh" >> ~/.bashrc source ~/.bashrc
Setup Networking for provisioning
In this example we are using ```enp1s0f1``` as the internal interface (i.e. the pxeboot / provisioning interface)
# setup networking for provisioning
${sms_eth_internal}=enp1s0f1
${sms_ip}=192.168.102.253
${internal_netmask}=24
# these commands seemed pointless as i already had setup - but revisit if issues later on. not sure what that broadcast + command does
ip link set dev enp1s0f1 up
ip address add 192.168.102.253/24 broadcast + dev enp1s0f1
# set the DHCP interface
chdef -t site dhcpinterfaces="xcatmn|enp1s0f1"
Add the Centos DVD to the installer
Update the URL for more recent versions if required.
# grab the centos dvd iso to create a local repo wget http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso copycds ./CentOS-8.2.2004-x86_64-dvd1.iso
Query available images
lsdef -t osimage
Add a node to the installation.
# add a node # note: serialport=0 (ttyS0) # serialport=1 (ttyS1) [root@deploy ~]# mkdef -t node node0001 groups=compute,all ip=192.168.102.10 mac=00:15:B2:AA:E2:60 netboot=xnba arch=x86_64 bmc=192.168.101.10 bmcusername=admin bmcpassword=admin mgt=ipmi serialport=0 serialspeed=115200 provmethod=centos8-x86_64-install-compute 1 object definitions have been created or modified. # set the root password chtab key=system passwd.username=root passwd.password=`openssl rand -base64 12` # set the domain name chdef -t site domain=dt.internal
Finalise the setup - below will create the /tftpboot files and /etc/hosts etc.
# finalise the setup # Complete network service configurations makehosts makenetworks makedhcp -n makedns -n
Set the nodes to pxeboot
# Associate desired provisioning image for computes nodeset compute osimage=centos8-x86_64-install-compute rinstall nvme0001 osimage=centos8-x86_64-install-compute
Useful commands
# check the node stats
lsdef -t node -l
lsdef -o node0001
# check the operating systems stats
lsdef -t osimage -o centos8-x86_64-install-compute
# change a node mac address
makedhcp -d <nodename>
chdef -t node -o <nodename> mac=<new-mac>
makedhcp <nodename>
lsdef -o node001
# reinstall a node
# currstate=boot
nodeset node0001 osimage=centos8-x86_64-install-compute
[root@deploy nets]# lsdef node0001 | grep currstate
currstate=install centos8-x86_64-compute
# using a console session - whats the root password?
tabedit passwd
# setup RAID1 for the compute nodes
mkdir -p /install/custom/partition/
wget https://raw.githubusercontent.com/xcat2/xcat-extensions/master/partition/raid1_rh.sh -O /install/custom/partition/raid1_rh.sh
# reprovision the node
rinstall node0001 osimage=centos8-x86_64-install-compute
# disk notes: check status of RAID array
cat /proc/mdstat
mdadm --detail /dev/mdX
# add a new node to an existing cluster