Skip to content

basic unattended Centos8 ISO image installation with xCat

Notifications You must be signed in to change notification settings

yasseryehya/basic-install-with-xcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

basic-install-with-xcat

basic unattended Centos8 ISO image installation with xCat. the following steps are based on a diskless installation

Management node and ISO image

  • both MN OS and the ISO image are based on CentOS-Stream-8-x86_64-20220513-dvd1.iso
  • memory of the MN: 4 GB

Configure the Base OS Repository

  • coppied the iso image to /tmp on the management node
  • mounted the iso to /mnt/iso/centos8 on the management node
  • created a yum repo file /etc/yum.repos.d/centos8.repo
  • contents of centos8.repo:
[centos8-appstream]
name=Centos8 packages
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=file:///mnt/iso/centos8/AppStream
enabled=1
gpgcheck=1

Configure the Management Node

  • hostnamectl set-hostname xcatmn.cluster.com
  • contents of /etc/sysconfig/network-scripts/ifcfg-ens160:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens160
UUID=f8c0d05b-7177-4b1c-b6b3-8f4fb7db5298
DEVICE=ens160
ONBOOT=yes

IPADDR=192.168.121.143
NETMASK=255.255.255.0
GATEWAY=192.168.121.2
PREFIX=24
DNS1=192.168.121.143
  • contents of /etc/resolv.conf:
# Generated by NetworkManager
search cluster.com
nameserver 192.168.121.143

Automatic Install Using go-xcat

Download the go-xcat tool using wget:

  • wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat
  • chmod +x /tmp/go-xcat

Run the go-xcat tool:

  • /tmp/go-xcat install
  • source /etc/profile.d/xcat.sh
  • /tmp/go-xcat -x devel install

configuring credentials to be used on the compute nodes

  • chtab key=system passwd.username=root passwd.password=root

osimage definition

  • copycds /tmp/CentOS-Stream-8-x86_64-20220513-dvd1.iso
  • genimage centos-stream8-x86_64-netboot-compute
  • packimage centos-stream8-x86_64-netboot-compute

some of the current site table values:

domain=cluster.com
forwarders=192.168.121.2
master=192.168.121.143
nameservers=192.168.121.143

Initialize DHCP services

  • chdef -t site dhcpinterfaces="ens160,virbr0"

node definition

  • mkdef -t node -o cn1 arch=x86_64 mac="00:0C:29:16:54:EB" ip="192.168.121.170" netboot="xnba" groups="all"

Hosts and DNS

  • makehosts cn1
  • makedns -n # was asked to disable SELINUX (was disabled already!)

create a new DHCP configuration file with the networks defined

  • makedhcp -n --> I got this: No dynamic range specified for 192.168.121.0. If hardware discovery is being used, a dynamic range is required.
  • makedhcp -a

assign image definition to compute nodes

  • nodeset cn1 osimage=centos-stream8-x86_64-netboot-compute

deployment

  • power on the compute node
  • OS installation starts on the memory (diskless) and login prompt appears
  • Issue when compute node had less than 2 GB of RAM. solved by using RAM >= 3 GB

xcatprobe

xcatprobe osdeploy -n <node_range>

  • osdeploy operating system provision process. Supports two modes - ‘Realtime monitor’ and ‘Replay history’.
  • Realtime monitor: This is a default. This tool with monitor provision state of the node. Trigger ‘Realtime monitor’ before rebooting target node to do provisioning.
  • Replay history: Used after provisioning is finished to probe the previously completed provisioning.

backup xcat database

storing a backup copy of xcat DB so it can be restored later if needed

  • mkdir ~/Documents/xcat-backup
  • dumpxCATdb -p ~/Documents/xcat-backup
  • restoring data can be done with restorexCATdb -p <path_to_the_saved_database>

postscripts

  • add the script to /install/postscript/
  • vim /install/postscripts/{script-name}
  • chdef cn1 -p postscripts={script-name}
  • the script should be run on the next boot of the compute node (diskless)
  • in case of dikfull installation:
    • updatenode cn2 -P
    • the previous command should run the script right away

parallel shell

  • xdsh cn1,cn2 "touch /root/test-file"

kickstart

  • kickstart file is created in diskfull installtion case and we is at /install/autoinst/{node_name} and we can modify it.

references

About

basic unattended Centos8 ISO image installation with xCat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published