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:15] hmeij07 |
cluster:154 [2017/03/09 15:50] hmeij07 [Deploy] |
||
---|---|---|---|
Line 4: | Line 4: | ||
==== OpenHPC ==== | ==== OpenHPC ==== | ||
- | * install vanilla CentOS 7.2 on '' | + | * install vanilla CentOS 7.2 on //master// |
* find Install_guide-CentOS7.2-SLURM-1.2.1-x86_64.pdf recipe guide on http:// | * find Install_guide-CentOS7.2-SLURM-1.2.1-x86_64.pdf recipe guide on http:// | ||
* turn selinux off | * turn selinux off | ||
Line 20: | Line 20: | ||
[root@ohpc0-test ~]# vi / | [root@ohpc0-test ~]# vi / | ||
- | # lock up port 22 | + | # lock up port 22: note " |
- | -A INPUT -i eth0 -p tcp -m state --state NEW -m tcp -s 129.133.0.0/ | + | -A INPUT -i enp4s0 |
- | # local allow: note eth1 | + | # local allow: note "eth1" |
- | -A INPUT -i eth1 -d 192.168.0.0/ | + | -A INPUT -i enp8s0 |
- | -A INPUT -i eth1 -d 192.168.0.0/ | + | -A INPUT -i enp8s0 |
[root@ohpc0-test ~]# vi / | [root@ohpc0-test ~]# vi / | ||
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=UNDEF -t node ohpc0 | ||
+ | systemctl restart dhcpd | ||
+ | wwsh pxe update | ||
+ | |||
+ | |||
+ | [root@ohpc0-test ~]# wwsh -y object print ohpc0 -p :all | ||
+ | #### node ohpc0 ############################################################### | ||
+ | 4: NAME = ohpc0 | ||
+ | 4: BOOTLOADER = sda | ||
+ | 4: BOOTLOCAL = UNDEF | ||
+ | 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: |