This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cluster:154 [2017/03/03 19:41] hmeij07 [OpenHPC] |
cluster:154 [2017/03/09 15:46] hmeij07 [Deploy] |
||
---|---|---|---|
Line 55: | Line 55: | ||
</ | </ | ||
+ | * next add OpenHPC component, install the RPM package which also enables repo EPEL | ||
+ | |||
+ | < | ||
+ | |||
+ | [root@ohpc0-test ~]# yum install http:// | ||
+ | |||
+ | Installed: | ||
+ | ohpc-release.x86_64 0:1.2-1 | ||
+ | Dependency Installed: | ||
+ | epel-release.noarch 0:7-9 | ||
+ | |||
+ | [root@ohpc0-test ~]# yum repolist | ||
+ | repo id repo name | ||
+ | OpenHPC | ||
+ | OpenHPC-updates | ||
+ | base/ | ||
+ | *epel/ | ||
+ | extras/ | ||
+ | updates/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Next provisioning, | ||
+ | |||
+ | < | ||
+ | |||
+ | yum -y groupinstall ohpc-base | ||
+ | yum -y groupinstall ohpc-warewulf | ||
+ | # for openlava if we decide not slurm | ||
+ | yum install tcl-devel | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | yum -y groupinstall ohpc-slurm-server | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Configure '' | ||
+ | |||
+ | ==== Configure ==== | ||
+ | |||
+ | * Warewulf (do yourself a favor and check changes in file to avoid typos) | ||
+ | |||
+ | < | ||
+ | |||
+ | perl -pi -e " | ||
+ | |||
+ | perl -pi -e " | ||
+ | |||
+ | perl -pi -e " | ||
+ | perl -pi -e " | ||
+ | |||
+ | | ||
+ | # -ni not -pi | ||
+ | perl -ni -e "print unless /^\s+Order allow, | ||
+ | |||
+ | # restart/ | ||
+ | systemctl restart xinetd | ||
+ | systemctl enable mariadb.service | ||
+ | systemctl restart mariadb | ||
+ | systemctl enable httpd.service | ||
+ | systemctl restart httpd | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | * Now let get ready to provision a node. First we need to build a CHROOT environment. | ||
+ | |||
+ | < | ||
+ | |||
+ | # defined repo | ||
+ | less / | ||
+ | |||
+ | # admin area | ||
+ | ls -R / | ||
+ | |||
+ | # use another disk for images | ||
+ | mkdir /data | ||
+ | mkfs.xfs -f /dev/sdb1 | ||
+ | mount /data | ||
+ | mkdir -p / | ||
+ | |||
+ | # this yields an error as 7.2.1511 is already deprecated | ||
+ | wwmkchroot centos-7 / | ||
+ | "This directory (and version of CentOS) is deprecated. | ||
+ | you should use /7/ and not /7.2.1511/ in your path." | ||
+ | # so we follow their advise and edit the repo destination s/ | ||
+ | vi / | ||
+ | |||
+ | # try again | ||
+ | wwmkchroot centos-7 / | ||
+ | # ls / | ||
+ | bin boot dev etc fastboot | ||
+ | proc root run sbin srv sys tmp usr var | ||
+ | # du -hs / | ||
+ | 490M / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Next customize the CHROOT environment | ||
+ | |||
+ | < | ||
+ | |||
+ | cp -p / | ||
+ | yum -y --installroot=/ | ||
+ | yum -y --installroot=/ | ||
+ | yum -y --installroot=/ | ||
+ | yum -y --installroot=/ | ||
+ | # pass on infiniband | ||
+ | |||
+ | # if it does not exist on **master** issue command '' | ||
+ | cat ~/ | ||
+ | cat ~/ | ||
+ | |||
+ | echo " | ||
+ | >> / | ||
+ | echo " | ||
+ | >> / | ||
+ | |||
+ | chroot / | ||
+ | echo " | ||
+ | |||
+ | # finally on **master** issue | ||
+ | perl -pi -e " | ||
+ | echo "/home *(rw, | ||
+ | echo "/ | ||
+ | exportfs -ra | ||
+ | systemctl restart nfs | ||
+ | systemctl enable nfs-server | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Deploy ==== | ||
+ | |||
+ | * Next we PXE boot the compute node for imaging (after building bootstrp image and VNFS) | ||
+ | |||
+ | < | ||
+ | |||
+ | # Both are loaded in database; back up if production | ||
+ | echo " | ||
+ | wwbootstrap `uname -r` | ||
+ | # Bootstrap image ' | ||
+ | wwvnfs -y --chroot / | ||
+ | # VNFS ' | ||
+ | # Wrote a new configuration file at: / | ||
+ | |||
+ | wwsh -y file import / | ||
+ | wwsh -y file set network --path / | ||
+ | wwsh -y node new ohpc0 --ipaddr=192.168.1.248 --hwaddr=00: | ||
+ | |||
+ | wwsh -y file import /etc/passwd | ||
+ | wwsh -y file import /etc/group | ||
+ | wwsh -y file import /etc/shadow | ||
+ | wwsh -y file import / | ||
+ | wwsh -y file import / | ||
+ | wwsh -y provision set ohpc0 --vnfs=centos7.2 --bootstrap=`uname -r` \ | ||
+ | | ||
+ | systemctl restart dhcpd | ||
+ | wwsh pxe update | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Note: the next part is optional but I recommend it. Warewulf by defaults deploys '' | ||
+ | |||
+ | < | ||
+ | |||
+ | yum -y --installroot=/ | ||
+ | wwvnfs -y --chroot / | ||
+ | |||
+ | wwsh -y object modify -s bootloader=sda -t node ohpc0 | ||
+ | wwsh -y object modify -s diskpartition=sda -t node ohpc0 | ||
+ | wwsh -y object modify -s diskformat=sda1, | ||
+ | wwsh -y object modify -s filesystems=\ | ||
+ | | ||
+ | | ||
+ | wwsh -y object modify -s bootlocal=EXIT -t node ohpc0 | ||
+ | |||
+ | |||
+ | [root@ohpc0-test ~]# wwsh -y object print ohpc0 -p :all | ||
+ | #### node ohpc0 ############################################################### | ||
+ | 4: NAME = ohpc0 | ||
+ | 4: BOOTLOADER = sda | ||
+ | 4: BOOTSTRAPID = 1 | ||
+ | 4: DISKFORMAT = sda1, | ||
+ | 4: DISKPARTITION = sda | ||
+ | 4: FILEIDS | ||
+ | 4: FILESYSTEMS = dev=sda2: | ||
+ | mountpoint=/: | ||
+ | mountpoint=/ | ||
+ | 4: NETDEVS | ||
+ | NETDEVS.enp8s0.NAME | ||
+ | NETDEVS.enp8s0.HWADDR | ||
+ | NETDEVS.enp8s0.IPADDR | ||
+ | 4: NODENAME | ||
+ | 4: VNFSID | ||
+ | |||
+ | [root@ohpc0-test ~]# wwsh -y bootstrap list | ||
+ | BOOTSTRAP NAME SIZE (M) | ||
+ | 3.10.0-327.el7.x86_64 | ||
+ | |||
+ | [root@ohpc0-test ~]# wwsh -y vnfs list | ||
+ | VNFS NAME SIZE (M) CHROOT LOCATION | ||
+ | centos7.2 | ||
+ | |||
+ | </ | ||
\\ | \\ | ||
**[[cluster: | **[[cluster: |