cluster:144
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cluster:144 [2015/12/11 18:40] – [Warewulf Golden Image] hmeij | cluster:144 [2018/07/26 18:52] (current) – [Deploying] hmeij07 | ||
|---|---|---|---|
| Line 47: | Line 47: | ||
| Set '' | Set '' | ||
| - | * / | + | |
| < | < | ||
| # minder: all NFS file systems unmounted? | # minder: all NFS file systems unmounted? | ||
| + | # or add rsync excludes in | ||
| + | # / | ||
| mkdir / | mkdir / | ||
| Line 65: | Line 67: | ||
| 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: | dev=sda3: | ||
| - | mountpoint=/: | + | mountpoint=/: |
| b6 | b6 | ||
| + | |||
| + | # see note below on filesystems.... | ||
| </ | </ | ||
| Line 85: | Line 89: | ||
| # switch node to image VNFS | # 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 | # just to be prudent | ||
| Line 115: | Line 124: | ||
| **filesystems** | **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, | + | 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, |
| + | 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 and clean any and all files in /dev/disk and rebuild VNFS. | + | |
| + | This also happens after I remove any UUID references in /etc/fstab, clean up / | ||
| < | < | ||
| Line 150: | Line 162: | ||
| Warewulf 3.6.99 and CentOS 6.5 | 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: | ||
cluster/144.1449859207.txt.gz · Last modified: by hmeij
