This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cluster:144 [2015/12/11 15:44] hmeij [Warewulf Golden Image] |
cluster:144 [2018/07/26 18:52] (current) hmeij07 [Deploying] |
||
---|---|---|---|
Line 10: | Line 10: | ||
* Project Kusu, now defunct, but a great, simple template driven system. No fancy gui. | * Project Kusu, now defunct, but a great, simple template driven system. No fancy gui. | ||
* HP's CMU, also a great tool, golden image approach. The nice feature of CMU is that master node can delegate hundreds of node to be image by a designated compute node relieving the master node. | * HP's CMU, also a great tool, golden image approach. The nice feature of CMU is that master node can delegate hundreds of node to be image by a designated compute node relieving the master node. | ||
- | * Bright Computing, a very complex tool that takes over every config file imaginable. Simple tasks become very burdensome, never achived | + | * Bright Computing, a very complex tool that takes over every config file imaginable. Simple tasks become very burdensome, never achieved |
- | * xCAT, the behemoth of open source provisioning tools. It does it all, which means a huge learning curve. | + | * xCAT, the behemoth of open source provisioning tools and more. It does it all, which means a huge learning curve. |
- | * [[http:// | + | * [[http:// |
The requirements of the provisioning tool were two fold: | The requirements of the provisioning tool were two fold: | ||
- | * My HPCC is flooded with small jobs that run for weeks to months (no wall time) but have small memory requirements (< 1GB). Thus I want to design stateless compute nodes and frequently tailor the setup to the scientific needs (non graphical). | + | * My HPCC environment |
* The HPCC also encounters very large jobs (for us that is 16-32 cores with memory requirements in the 256 GB range) utilizing X11, OpenGL, Nvidia and other large complex analyses software. In this case one compute node is build up to satisfaction, | * The HPCC also encounters very large jobs (for us that is 16-32 cores with memory requirements in the 256 GB range) utilizing X11, OpenGL, Nvidia and other large complex analyses software. In this case one compute node is build up to satisfaction, | ||
- | So I settled on WareWulf | + | So I settled on Warewulf |
| | ||
+ | Not finding much on the " | ||
+ | Install Warewulf and poke around the shell '' | ||
< | < | ||
Line 38: | Line 40: | ||
wwsh provision set b6 --fileadd hosts, | wwsh provision set b6 --fileadd hosts, | ||
wwsh provision set b6 --fileadd network.ww, | wwsh provision set b6 --fileadd network.ww, | ||
+ | |||
+ | </ | ||
+ | |||
+ | As opposed to the stateless, which grabs it's OS content from the master node, in the " | ||
+ | |||
+ | Set '' | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | # minder: all NFS file systems unmounted? | ||
+ | # or add rsync excludes in | ||
+ | # / | ||
+ | |||
+ | mkdir / | ||
SOURCEADDR=b0 wwmkchroot golden-system / | SOURCEADDR=b0 wwmkchroot golden-system / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Next, modify the properties of the node to image. | ||
+ | [[http:// | ||
+ | |||
+ | < | ||
wwsh object modify -s bootloader=sda b6 | wwsh object modify -s bootloader=sda b6 | ||
- | wwsh object modify -s diskformat=sda1, | + | wwsh object modify -s diskformat=sda1, |
- | wwsh object modify -s filesystems=" | + | wwsh object modify -s filesystems= |
+ | " | ||
+ | dev=sda3: | ||
+ | mountpoint=/: | ||
+ | b6 | ||
+ | # see note below on filesystems.... | ||
+ | |||
+ | </ | ||
+ | |||
+ | More on the '' | ||
+ | |||
+ | Next we need to get the node booted and trasnfer the VNFS image made from the node b0 contents. At this time look on your master node in / | ||
+ | |||
+ | < | ||
+ | |||
+ | # make the image, takes 10 minutes or so | ||
wwvnfs --chroot=/ | wwvnfs --chroot=/ | ||
+ | |||
+ | # switch node to image VNFS | ||
wwsh provision set b6 --vnfs=b0.chroot | wwsh provision set b6 --vnfs=b0.chroot | ||
+ | # Rajil adds for GPU | ||
+ | # Keep in mind that nouveau should be disabled, | ||
+ | wwsh provision set c038 --kargs=\ | ||
+ | " | ||
+ | |||
+ | # just to be prudent | ||
wwsh pxe update | wwsh pxe update | ||
wwsh dhcp update | wwsh dhcp update | ||
service dhcpd restart | service dhcpd restart | ||
+ | # check the configs | ||
wwsh object print b6 -p :all | wwsh object print b6 -p :all | ||
wwsh provision list | wwsh provision list | ||
- | PXE boot node, then turn provisioning off (or on UNDEF) | + | # next for provisioning (just to sure) on first PXE boot |
+ | wwsh provision set --bootlocal=UNDEF b6 | ||
+ | |||
+ | # turn the node on | ||
+ | |||
+ | </ | ||
+ | |||
+ | The console of the target node will now show the IP being assigned, the '' | ||
+ | |||
+ | After all that is done, disable provisioning so that the master ignores the PXE boot and the target node boots of local disk. | ||
+ | |||
+ | < | ||
+ | |||
+ | # ignore PXE boot | ||
wwsh provision set --bootlocal=EXIT b6 | wwsh provision set --bootlocal=EXIT b6 | ||
+ | </ | ||
+ | |||
+ | **filesystems** | ||
+ | |||
+ | This is currently not working as expected. In my first attempts I'd specify sda1 (size=500), sda2 (size=2048, type=swap) and sda3 (size=fill) but what I end up with is a standard layout it looks like. Any sizes are also ignored. So for now I just pick the ones I want (sda1, sda3, sda7). | ||
+ | |||
+ | Note: this problem turns out to be hardware related, it is not appearing on newer hardware | ||
+ | --- // | ||
+ | |||
+ | |||
+ | This also happens after I remove any UUID references in /etc/fstab, clean up /etc/mtab and clean any and all files in / | ||
+ | |||
+ | < | ||
+ | |||
+ | fdisk -l | ||
+ | |||
+ | Disk /dev/sda: 80.0 GB, 80026361856 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | | ||
+ | I/O size (minimum/ | ||
+ | Disk identifier: 0x000ce092 | ||
+ | |||
+ | Device Boot Start | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | df -h | ||
+ | |||
+ | | ||
+ | / | ||
+ | | ||
+ | / | ||
</ | </ | ||
+ | |||
+ | Warewulf 3.6.99 and CentOS 6.5 | ||
+ | |||
+ | ==== Part 2 ==== | ||
+ | |||
+ | To avoid the problems detailed above I started over with a fresh node. First I installed CentOS 6.7 vanilla on the hard disk with partitions sda1 (/boot, 500 MB), sd2 (2048 MB, swap) and sda3 (/, size=fill). Since I had a new kernel now we need to make a new bootstrap image and provision it. | ||
+ | |||
+ | < | ||
+ | |||
+ | wwbootstrap --chroot=/ | ||
+ | wwsh provision set n22 --vnfs=n0.chroot --bootstrap=2.6.32-573.12.1.el6.x86_64 | ||
+ | |||
+ | </ | ||
+ | |||
+ | Before we create the n0.chroot VNFS image edit the file and comment out these lines, with a golden image approach we do not have a hybridization path but we want these file systems included. | ||
+ | |||
+ | < | ||
+ | |||
+ | # / | ||
+ | |||
+ | # comment out for golden image | ||
+ | #hybridize += /usr/X11R6 | ||
+ | #hybridize += / | ||
+ | #hybridize += / | ||
+ | #hybridize += / | ||
+ | |||
+ | </ | ||
+ | |||
+ | I also cleaned the following files inside the chroot environment: | ||
+ | |||
+ | < | ||
+ | |||
+ | # /etc/fstab, edited (clean also mtab and remove files / | ||
+ | tmpfs / | ||
+ | devpts | ||
+ | sysfs / | ||
+ | proc /proc | ||
+ | 10.11.103.42:/ | ||
+ | 10.11.103.42:/ | ||
+ | |||
+ | # / | ||
+ | # This file was written by Warewulf bootstrap (capability setup-filesystems) | ||
+ | (hd0) /dev/sda | ||
+ | |||
+ | # / | ||
+ | # This file was written by Warewulf bootstrap (capability setup-filesystems) | ||
+ | serial --speed= --unit= --word= --parity= | ||
+ | terminal_input console serial; terminal_output console serial | ||
+ | default 0 | ||
+ | timeout 10 | ||
+ | root (hd0,0) | ||
+ | |||
+ | title CentOS release 6.7 - 2.6.32-573.12.1.el6.x86_64 | ||
+ | kernel / | ||
+ | initrd / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now when first provisioning happens the right partitions are created and the node imaged. With bootload=EXIT or simply shutting down the warewulf master dhcpd process, the node is now booting from local disk. | ||
+ | |||
+ | Yea. | ||
+ | |||
+ | ==== Deploying ==== | ||
+ | |||
+ | As part of my deployment I edited out any device information in file ''/ | ||
+ | |||
+ | Then we build a template file with node specs in it like so: | ||
+ | |||
+ | < | ||
+ | # HP blades reverses HWADDR (don't ask) | ||
+ | # use nic port bottom (no changes) | ||
+ | # set both ipaddr/ | ||
+ | # post edit | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # reboot (with bootload=EXIT) | ||
+ | | ||
+ | | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | My deploy script (give an entire line from above as arguments) | ||
+ | |||
+ | < | ||
+ | |||
+ | #!/bin/bash | ||
+ | |||
+ | # deploy a n0.chroot node via PXE golden image transfer | ||
+ | # dynamic files are always in stateless CHROOT/ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | if [ $# != 6 ]; then | ||
+ | echo " | ||
+ | exit | ||
+ | fi | ||
+ | |||
+ | wwsh object delete $node -y | ||
+ | sleep 3 | ||
+ | |||
+ | wwsh node new $node --netdev=eth0 \ | ||
+ | | ||
+ | | ||
+ | |||
+ | wwsh node set $node --netdev=eth1 \ | ||
+ | | ||
+ | | ||
+ | |||
+ | wwsh node set $node --netdev=ib0 \ | ||
+ | | ||
+ | | ||
+ | |||
+ | wwsh provision set $node --fileadd passwd, | ||
+ | wwsh provision set $node --fileadd hosts, | ||
+ | wwsh provision set $node --fileadd network.ww, | ||
+ | |||
+ | # note: no diskpartition, | ||
+ | # otherwise add diskpartion=sda so that " | ||
+ | |||
+ | wwsh object modify -s bootloader=sda $node -y | ||
+ | wwsh object modify -s diskformat=sda1, | ||
+ | |||
+ | if [ " | ||
+ | # golden images with 3 partitions | ||
+ | wwsh object modify -s filesystems=" | ||
+ | else | ||
+ | # hp blade 4 partitions | ||
+ | wwsh object modify -s filesystems=" | ||
+ | fi | ||
+ | |||
+ | wwsh provision set $node --vnfs=n0.chroot -y | ||
+ | wwsh provision set $node --bootstrap=2.6.32-573.12.1.el6.x86_64 -y | ||
+ | |||
+ | wwsh provision set --bootlocal=UNDEF $node -y | ||
+ | |||
+ | wwsh pxe update | ||
+ | wwsh dhcp update | ||
+ | | ||
+ | | ||
+ | |||
+ | echo "now reboot: $node" | ||
+ | |||
+ | echo "wwsh provision set --bootlocal=EXIT $node -y" | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
\\ | \\ | ||
**[[cluster: | **[[cluster: |