User Tools

Site Tools


cluster:154

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cluster:154 [2017/03/08 18:19]
hmeij07 [Configure]
cluster:154 [2017/03/08 20:36]
hmeij07 [Deploy]
Line 166: Line 166:
 yum -y --installroot=/data/ohpc/images/centos7.2 install lmod-ohpc yum -y --installroot=/data/ohpc/images/centos7.2 install lmod-ohpc
 # pass on infiniband # pass on infiniband
 +
 +# if it does not exist on **master** issue command ''wwinit ssh''
 +cat ~/.ssh/cluster.pub
 +cat ~/.ssh/cluster.pub >> /data/ohpc/images/centos7.2/root/.ssh/authorized_keys
 +
 +echo "192.168.1.249:/home /home nfs nfsvers=3,rsize=1024,wsize=1024,cto 0 0 " \
 +      >> /data/ohpc/images/centos7.2/etc/fstab
 +echo "192.168.1.249:/opt/ohpc/pub /opt/ohpc/pub nfs nfsvers=3 0 0 " \
 +      >> /data/ohpc/images/centos7.2/etc/fstab
 +
 +chroot /data/ohpc/images/centos7.2 systemctl enable ntpd
 +echo "server 192.168.1.249" >> /data/ohpc/images/centos7.2/etc/ntp.conf
 +
 +# finally on **master** issue
 +perl -pi -e "s/ControlMachine=\S+/ControlMachine=ohpc0-test/" /etc/slurm/slurm.conf
 +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 -ra
 +systemctl restart nfs
 +systemctl enable nfs-server
  
 </code> </code>
 +
 +==== Deploy ====
 +
 +  * Next we PXE boot the compute node for imaging (after building bootstrp image and VNFS)
 +
 +<code>
 +
 +# Both are loaded in database; back up if production
 +echo "drivers += updates/kernel" >> /etc/warewulf/bootstrap.conf
 +wwbootstrap `uname -r`
 +# Bootstrap image '3.10.0-327.el7.x86_64' is ready
 +wwvnfs -y --chroot /data/ohpc/images/centos7.2
 +# VNFS 'centos7.2' has been imported
 +# Wrote a new configuration file at: /etc/warewulf/vnfs/centos7.2.conf
 +
 +wwsh -y file import /tmp/network.12501 --name network
 +wwsh -y file set network --path /etc/sysconfig/network --mode=0644 --uid=0 
 +wwsh -y node new ohpc0 --ipaddr=192.168.1.248 --hwaddr=00:15:C5:EF:08:61 -D enp8s0
 +
 +wwsh -y file import /etc/passwd
 +wwsh -y file import /etc/group
 +wwsh -y file import /etc/shadow
 +wwsh -y file import /etc/slurm/slurm.conf
 +wwsh -y file import /etc/munge/munge.key
 +wwsh -y provision set ohpc0 --vnfs=centos7.2 --bootstrap=`uname -r` \
 +     --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
 +systemctl restart dhcpd
 +wwsh pxe update
 +
 +</code>
 +
 +  * Note: the next part is optional but I recommend it. Warewulf by defaults deploys ''stateless'' (in memory) but I'd rather deploy ''statefull'' in which VNFS is written to disk. The advantage is that if the node crashed, it will reboot without the help of the **master**, and Linux typically survives crashes. Actually I like the ''golden image'' even better, customize a node, then create the image. More details at [[cluster:144|Warewulf Golden Image]]
 +
 +
 \\ \\
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
cluster/154.txt ยท Last modified: 2018/08/17 12:48 by hmeij07