Difference between revisions of "XCAT Installation on Centos 8.3"

From Define Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:
  
 
<pre>
 
<pre>
hostnamectl set-hostname '''<server_name.domain_name>''' # e.g. deploy.dt.internal
+
hostnamectl set-hostname <server_name.domain_name> # e.g. deploy.dt.internal
 
</pre>
 
</pre>
  
Line 17: Line 17:
 
# Ensure there is a /etc/hosts entry for the internal interface
 
# Ensure there is a /etc/hosts entry for the internal interface
  
'''<ip_address> <server_name> <server_name.domain_name>'''
+
<ip_address> <server_name> <server_name.domain_name>
 
</pre>
 
</pre>
  
Line 89: Line 89:
 
chtab key=system passwd.username=root passwd.password=`openssl rand -base64 12`
 
chtab key=system passwd.username=root passwd.password=`openssl rand -base64 12`
 
</pre>
 
</pre>
# Note; for the password generation command use the Grave Accent (backquote)` to enclose the command rather than the apostrophe '
+
Note; for the password generation command use the Grave Accent (backquote)` to enclose the command rather than the apostrophe '
  
 
== Set the site domain name ==
 
== Set the site domain name ==
Line 177: Line 177:
 
Once the installation is complete run the command to see the OS version installed on the node.
 
Once the installation is complete run the command to see the OS version installed on the node.
 
<pre>
 
<pre>
xdsh '''<node_name>''' more '''/etc/*release'''
+
xdsh <node_name> more /etc/*release
 
</pre>
 
</pre>
  

Latest revision as of 16:49, 22 February 2021

Base Level Setup

As the installation instructions will require specific values such as IP Addresses, MAC Addresses and hostnames these instructions will use data substitution place holder of .

Build server with Base Operating Software, we will use CentOS 8.3 minimal installation. Confirm networking is configured with Static IP Address for network interface.

Setup naming and hosts file

Set the hostname

hostnamectl set-hostname <server_name.domain_name> # e.g. deploy.dt.internal

Check/Set the /etc/hosts file

# Ensure there is a /etc/hosts entry for the internal interface

<ip_address> <server_name> <server_name.domain_name>

Disable the firewall and SELINUX

Disable the firewall

systemctl stop firewalld
systemctl disable firewalld

Disable SELINUX

'setenforce 0' or 'echo 0 > /sys/fs/selinux/enforce'  # This sets the mode to permissive mode temporarily until reboot.

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

You need to reboot the server to make sure SELINUX is permanently disabled.

Check to see if SELINUX is disabled by running

sestatus

Enable the time service (Chronyd)

# uncomment the following to allow the compute nodes access
# Allow NTP client access from local network.
allow 192.168.0.0/16

# 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

Install and configure some required packages

yum -y install vim tmux wget rsyslog

Enable and start rsyslog

systemctl enable rsyslog
systemctl start rsyslog

Setup the xCAT 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

Install and provision xCAT onto management node

yum -y install xCAT 
echo ". /etc/profile.d/xcat.sh" >> ~/.bashrc
source ~/.bashrc 

Configure system password for the root user on the compute nodes

chtab key=system passwd.username=root passwd.password=`openssl rand -base64 12`

Note; for the password generation command use the Grave Accent (backquote)` to enclose the command rather than the apostrophe '

Set the site domain name

chdef -t site domain=dt.internal 


Setup Networking for provisioning

Set the DHCP interface

chdef -t site dhcpinterfaces="<server_name>|<server_ifname>"

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

List parameters in clustersite

lsdef -t site clustersite

Add the Centos DVD to the installer

Check the CentOS website for URL of the required version of CentOS DVD version required and then download

wget http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso

Once downloaded import it into the xCAT database

copycds ./CentOS-8.3.2011-x86_64-dvd1.iso

Query available images

lsdef -t osimage

Add a node to the installation.

mkdef -t node <node_name> groups=compute,all ip=<node_ip_address> mac=<node_mac_address> netboot=xnba arch=x86_64 bmc=<bmc_ip_address> bmcusername=<ipmi_username> bmcpassword=<ipmi_password> mgt=ipmi serialport=0 serialspeed=115200 provmethod=centos8-x86_64-install-compute

Finalise the setup

Complete network service configurations

makehosts
makenetworks 
makedhcp -n	; Note. 'Warning: [deploy]: No dynamic range specified for 192.168.97.0. If hardware discovery is being used, a dynamic range is required.' message can be ignored as IP address is defined for the node itself.
makedns -n

Check the rcons status

systemctl status goconserver

If goconserver is not enabled or running run the appropriate commands below depending on status

systemctl enable goconserver
systemctl start goconserver	# Not necessarily required as next command will start the server if not already running

Start goconserver if not started

makegocons

List the console connection of the nodes

makegocons -q

Set the nodes to pxeboot

Associate desired provisioning image for computes

nodeset compute osimage=centos8-x86_64-install-compute

Precheck that the xCAT management node is ready for OS provision

xcatprobe xcatmn -i <server_ifname>

Install the OS to the node and then check Installation of the node

rinstall <node_name> osimage=centos8-x86_64-install-compute # osimage is optional if it has already been defined by the provmethod of the node configuration

Once the installation is complete run the command to see the OS version installed on the node.

xdsh <node_name> more /etc/*release

Adding additional nodes

Define the new node with the mkdef command.

mkdef -t node <node_name> groups=compute,all ip=<node_ip_address> mac=<node_mac_address> netboot=xnba arch=x86_64 bmc=<bmc_ip_address> bmcusername=<ipmi_username> bmcpassword=<ipmi_password> mgt=ipmi serialport=0 serialspeed=115200 provmethod=centos8-x86_64-install-compute

Update the hosts file with the new node.

makehosts <new_node_name>

Update DNS with the new node.

makedns <new_host_name>

Install OS on the new node.

rinstall <node_name> osimage=centos8-x86_64-install-compute

Once the installation is complete run the command to see the OS version installed on the node.

xdsh <new_node_name> more /etc/*release

Useful commands


# check the node stats
lsdef -t node -l
lsdef -o <node_name>

# 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

# connect to sol
rcons <nodename>
# to exit
ctrl e + c + .

# 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