Difference between revisions of "XCAT Installation on Centos 7"
Jump to navigation
Jump to search
| (18 intermediate revisions by the same user not shown) | |||
| Line 29: | Line 29: | ||
== Disable the firewall == | == Disable the firewall == | ||
| + | Disable the firewall | ||
| + | |||
| + | <pre> | ||
| + | systemctl disable firewalld | ||
| + | systemctl stop firewalld | ||
| + | </pre> | ||
| + | |||
== Setup the software repos == | == Setup the software repos == | ||
| + | <pre> | ||
| + | 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/rh7/x86_64/xcat-dep.repo | ||
| + | </pre> | ||
| + | |||
| + | Note: Centos repos also stored here, do not delete! | ||
| + | |||
| + | == Add provisioning services on the headnode == | ||
| + | <pre> | ||
| + | yum -y install xCAT | ||
| + | echo ". /etc/profile.d/xcat.sh" >> ~/.bashrc | ||
| + | source ~/.bashrc | ||
| + | </pre> | ||
| + | |||
== Download CentOS == | == Download CentOS == | ||
| − | wget http://mirrors.ukfast.co.uk/sites/ftp.centos.org/7.9.2009/isos/x86_64/CentOS-7-x86_64- | + | wget http://mirrors.ukfast.co.uk/sites/ftp.centos.org/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso |
| + | |||
== Define Compute image for provisioning == | == Define Compute image for provisioning == | ||
copycds ${iso_path}/CentOS-7-x86_64-DVD-1908.iso (where ${iso_path} is directory of the iso) | copycds ${iso_path}/CentOS-7-x86_64-DVD-1908.iso (where ${iso_path} is directory of the iso) | ||
| Line 38: | Line 63: | ||
== Enable ssh during the installation on the compute nodes == | == Enable ssh during the installation on the compute nodes == | ||
| + | <pre> | ||
| + | # enables ssh to the node during installation | ||
| + | chdef -t site clustersite xcatdebugmode=2 | ||
| + | lsdef -t site clustersite | ||
| + | </pre> | ||
| + | |||
== Enable the time service (Chronyd) == | == Enable the time service (Chronyd) == | ||
| + | <pre> | ||
| + | # add to the end of the file /etc/chrony.conf (note below for Indonesia, select correct tz) | ||
| + | echo " | ||
| + | server 1.id.pool.ntp.org | ||
| + | server 2.id.pool.ntp.org | ||
| + | server 3.id.pool.ntp.org | ||
| + | server 4.id.pool.ntp.org" >> /etc/chrony.conf | ||
| + | |||
| + | systemctl enable chronyd | ||
| + | systemctl start chronyd | ||
| + | </pre> | ||
| + | |||
== Add a node to the installation == | == Add a node to the installation == | ||
| + | |||
| + | <pre> | ||
| + | # add a node | ||
| + | # note: serialport=0 (ttyS0) | ||
| + | # serialport=1 (ttyS1) | ||
| + | # replace each parameter with appropriate information | ||
| + | [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=centos7.9-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 | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | Finalise the setup - below will create the /tftpboot files and /etc/hosts etc. | ||
| + | |||
| + | <pre> | ||
| + | # finalise the setup | ||
| + | # Complete network service configurations | ||
| + | makehosts | ||
| + | makenetworks | ||
| + | makedhcp -n | ||
| + | makedns -n | ||
| + | </pre> | ||
| + | |||
| + | |||
== Check the rcons status == | == Check the rcons status == | ||
| + | |||
| + | <pre> | ||
| + | # might not be needed systemctl enable goconserver | ||
| + | # systemctl start goconserver | ||
| + | makegocons | ||
| + | makegocons -q | ||
| + | </pre> | ||
| + | |||
| + | |||
== Set the nodes to pxeboot == | == Set the nodes to pxeboot == | ||
| + | |||
| + | <pre> | ||
| + | # Associate desired provisioning image for computes | ||
| + | nodeset compute osimage=centos7.9-x86_64-install-compute | ||
| + | rinstall nvme0001 osimage=centos7.9-x86_64-install-compute | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | == Useful commands == | ||
| + | |||
| + | <pre> | ||
| + | |||
| + | # 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 | ||
| + | |||
| + | # Set the partition file as part of the provision | ||
| + | chdef -t osimage centos8-x86_64-install-compute partitionfile="s:/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 | ||
| + | </pre> | ||
Latest revision as of 17:05, 15 February 2021
Base Level Setup
Note: Starting point Centos minimal 7 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/rh7/x86_64/xcat-dep.repo
Note: Centos repos also stored here, do not delete!
Add provisioning services on the headnode
yum -y install xCAT echo ". /etc/profile.d/xcat.sh" >> ~/.bashrc source ~/.bashrc
Download CentOS
wget http://mirrors.ukfast.co.uk/sites/ftp.centos.org/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso
Define Compute image for provisioning
copycds ${iso_path}/CentOS-7-x86_64-DVD-1908.iso (where ${iso_path} is directory of the iso)
This file name must match the boot image from lsdef -t osimage
Enable ssh during the installation on the compute nodes
# enables ssh to the node during installation chdef -t site clustersite xcatdebugmode=2 lsdef -t site clustersite
Enable the time service (Chronyd)
# add to the end of the file /etc/chrony.conf (note below for Indonesia, select correct tz) echo " server 1.id.pool.ntp.org server 2.id.pool.ntp.org server 3.id.pool.ntp.org server 4.id.pool.ntp.org" >> /etc/chrony.conf systemctl enable chronyd systemctl start chronyd
Add a node to the installation
# add a node # note: serialport=0 (ttyS0) # serialport=1 (ttyS1) # replace each parameter with appropriate information [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=centos7.9-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
Check the rcons status
# might not be needed systemctl enable goconserver # systemctl start goconserver makegocons makegocons -q
Set the nodes to pxeboot
# Associate desired provisioning image for computes nodeset compute osimage=centos7.9-x86_64-install-compute rinstall nvme0001 osimage=centos7.9-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
# Set the partition file as part of the provision
chdef -t osimage centos8-x86_64-install-compute partitionfile="s:/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