# yum -y install http://build.openhpc.community/OpenHPC:/1.3/CentOS_7/x86_64/ohpc-release-1.3-1.el7.x86_64.rpm
# yum -y install ohpc-base
# yum -y install ohpc-warewulf
# yum -y install chrony
# systemctl enable ntpd.service
# systemctl enable chronyd
# echo "allow all" >> /etc/chrony.conf
# systemctl restart chronyd
# yum -y install ohpc-slurm-server
# perl -pi -e "s/ControlMachine=\S+/ControlMachine=master/" /etc/slurm/slurm.conf
# perl -pi -e "s/device = eth1/device = enp0s3/" /etc/warewulf/provision.conf
# perl -pi -e "s/^\s+disable\s+= yes/ disable = no/" /etc/xinetd.d/tftp
# ifconfig enp0s3 192.168.1.254 netmask 255.255.255.0 up
# systemctl restart xinetd
# systemctl enable mariadb.service # systemctl restart mariadb
# systemctl enable httpd.service
# systemctl restart httpd
# systemctl enable dhcpd.service
# export CHROOT=/opt/ohpc/admin/images/centos7.5
# wwmkchroot centos-7 $CHROOT
# yum -y --installroot=$CHROOT install ohpc-base-compute
# cp -p /etc/resolv.conf $CHROOT/etc/resolv.conf
# yum -y --installroot=$CHROOT install ohpc-slurm-client
# yum -y install ohpc-slurm-client
# vi $CHROOT/etc/hosts
master 192.168.1.254
# yum -y --installroot=$CHROOT install ntp
# yum -y --installroot=$CHROOT install chrony
# yum -y --installroot=$CHROOT install kernel
# yum -y --installroot=$CHROOT install lmod-ohpc
# yum -y install lmod-ohpc
# wwinit database
# wwinit ssh_keys
(by mount /home and /opt/ohpc/pub from master node)
# echo "192.168.1.254:/home /home nfs nfsvers=3,nodev,nosuid,noatime 0 0" >> $CHROOT/etc/fstab
# echo "192.168.1.254:/opt/ohpc/pub /opt/ohpc/pub nfs nfsvers=3,nodev,noatime 0 0" >> $CHROOT/etc/fstab
# echo "192.168.1.254:/share /share nfs nfsvers=3,nodev,nosuid,noatime 0 0" >> $CHROOT/etc/fstab
# echo "/home *(rw,no_subtree_check,fsid=10,no_root_squash)" >> /etc/exports
# echo "/opt/ohpc/pub *(ro,no_subtree_check,fsid=11)" >> /etc/exports
# exportfs -a
# systemctl restart nfs-server
# systemctl enable nfs-server
# chroot $CHROOT systemctl enable ntpd
# chroot $CHROOT systemctl enable chrony
# echo "server 192.168.1.254 iburst" >> $CHROOT/etc/ntp.conf
# echo "server 192.168.1.254 iburst" >> $CHROOT/etc/chrony.conf
# perl -pi -e "s/^NodeName=(\S+)/NodeName=c[1-2]/" /etc/slurm/slurm.conf
# perl -pi -e "s/^PartitionName=normal Nodes=(\S+)/PartitionName=normal Nodes=c[1-2]/" /etc/slurm/slurm.conf
# perl -pi -e "s/^Sockets=(\S+)/Sockets=1/" /etc/slurm/slurm.conf
# perl -pi -e "s/^CoresPerSocket=(\S+)/CoresPerSocket=2/" /etc/slurm/slurm.conf
# perl -pi -e "s/^ThreadsPerCore=(\S+)/ThreadsPerCore=1/" /etc/slurm/slurm.conf
ClusterName=galaxy.cluster
SlurmctldHost=master
# perl -pi -e "s/^NodeName=(\S+)/NodeName=c[1-2]/" $CHROOT/etc/slurm/slurm.conf
# perl -pi -e "s/^PartitionName=normal Nodes=(\S+)/PartitionName=normal Nodes=c[1-2]/" $CHROOT/etc/slurm/slurm.conf
# perl -pi -e "s/^Sockets=(\S+)/Sockets=1/" $CHROOT/etc/slurm/slurm.conf
# perl -pi -e "s/^CoresPerSocket=(\S+)/CoresPerSocket=2/" $CHROOT/etc/slurm/slurm.conf
# perl -pi -e "s/^ThreadsPerCore=(\S+)/ThreadsPerCore=1/" $CHROOT/etc/slurm/slurm.conf
ClusterName=galaxy.cluster
SlurmctldHost=master
# systemctl enable munge
# systemctl enable slurmctld
# systemctl start munge
# systemctl start slurmctld
# chroot $CHROOT systemctl enable slurmd
# perl -pi -e 's/# End of file/\* soft memlock unlimited\n$&/s' /etc/security/limits.conf
# perl -pi -e 's/# End of file/\* hard memlock unlimited\n$&/s' /etc/security/limits.conf
# perl -pi -e 's/# End of file/\* soft memlock unlimited\n$&/s' $CHROOT/etc/security/limits.conf
# perl -pi -e 's/# End of file/\* hard memlock unlimited\n$&/s' $CHROOT/etc/security/limits.conf
# perl -pi -e "s/\\#\\\$ModLoad imudp/\\\$ModLoad imudp/" /etc/rsyslog.conf
# perl -pi -e "s/\\#\\\$UDPServerRun 514/\\\$UDPServerRun 514/" /etc/rsyslog.conf
# systemctl restart rsyslog
# echo "*.* @192.168.1.254:514" >> $CHROOT/etc/rsyslog.conf
# perl -pi -e "s/^\*\.info/\\#\*\.info/" $CHROOT/etc/rsyslog.conf
# perl -pi -e "s/^authpriv/\\#authpriv/" $CHROOT/etc/rsyslog.conf
# perl -pi -e "s/^mail/\\#mail/" $CHROOT/etc/rsyslog.conf
# perl -pi -e "s/^cron/\\#cron/" $CHROOT/etc/rsyslog.conf
# perl -pi -e "s/^uucp/\\#uucp/" $CHROOT/etc/rsyslog.conf
# yum -y install ohpc-ganglia
# yum -y --installroot=$CHROOT install ganglia-gmond-ohpc
# cp /opt/ohpc/pub/examples/ganglia/gmond.conf /etc/ganglia/gmond.conf
# perl -pi -e "s/<sms>/master/" /etc/ganglia/gmond.conf
# cp /etc/ganglia/gmond.conf $CHROOT/etc/ganglia/gmond.conf
# echo "gridname MySite.." >> /etc/ganglia/gmetad.conf
# systemctl enable gmond
# systemctl enable gmetad
# systemctl start gmond
# systemctl start gmetad
# chroot $CHROOT systemctl enable gmond
# systemctl try-restart httpd
(by adm: master ansd compute:${compute_prefix}[1-${num_computes}] by compute_prefix = c and num_computes =2)
# yum -y install clustershell-ohpc
# cd /etc/clustershell/groups.d
# mv local.cfg local.cfg.orig
# echo "adm: master" > local.cfg
# echo "compute: c[1-2]" >> local.cfg
# echo "all: @adm,@compute" >> local.cfg
# wwsh file import /etc/passwd
# wwsh file import /etc/group
# wwsh file import /etc/shadow
# wwsh file import /etc/slurm/slurm.conf
# wwsh file import /etc/munge/munge.key
# wwsh file list
# export WW_CONF=/etc/warewulf/bootstrap.conf
# echo "drivers += updates/kernel/" >> $WW_CONF
# echo "drivers += overlay" >> $WW_CONF
# wwbootstrap `uname -r`
# wwvnfs --chroot $CHROOT
(by GATEWAYDEV=enp0s8 is Public interface // using in internal lan group)
# echo "GATEWAYDEV=enp0s8" > /tmp/network.$$
# wwsh -y file import /tmp/network.$$ --name network
# wwsh -y file set network --path /etc/sysconfig/network --mode=0644 --uid=0
# wwsh file list
We have 2 compute nodes
# wwsh -y node new c1 --ipaddr=192.168.1.253 --hwaddr=08:00:27:99:B3:4F -D enp0s8
# wwsh -y node new c2 --ipaddr=192.168.1.252 --hwaddr=08:00:27:99:B3:5F -D enp0s8
# wwsh node list
# wwsh -y provision set "c1" --vnfs=centos7.5 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
# wwsh -y provision set "c2" --vnfs=centos7.5 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
# wwsh provision list
# systemctl restart gmond
# systemctl restart gmetad
# systemctl restart dhcpd
# wwsh pxe update
# wwsh file resync
Open compute node and waiting for finish and you can check by:
# pdsh -w c1 uptime
# pdsh -w c[1-2] uptime
# systemctl restart munge
# systemctl restart slurmctld
# pdsh -w c[1-2] systemctl restart slurmd
# munge -n | unmunge
# munge -n | ssh c1 unmunge
# munge -n | ssh c2 unmunge
# systemctl status slurmctld
# ssh c1 systemctl status slurmd
# ssh c2 systemctl status slurmd
# scontrol show nodes