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 16:20] hmeij [Warewulf Golden Image] |
cluster:144 [2018/07/26 18:52] (current) hmeij07 [Deploying] |
||
---|---|---|---|
Line 45: | Line 45: | ||
As opposed to the stateless, which grabs it's OS content from the master node, in the " | As opposed to the stateless, which grabs it's OS content from the master node, in the " | ||
- | 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.... | ||
</ | </ | ||
- | More on the '' | + | 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 / | + | 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 / |
< | < | ||
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 104: | Line 113: | ||
The console of the target node will now show the IP being assigned, the '' | 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 botos of local disk. | + | After all that is done, disable provisioning so that the master ignores the PXE boot and the target node boots of local disk. |
< | < | ||
Line 112: | Line 121: | ||
</ | </ | ||
- | + | ||
+ | **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 += / | ||
+ | #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) | ||
+ | |||
+ | < | ||
+ | |||
+ | # | ||
+ | |||
+ | # deploy a n0.chroot node via PXE golden image transfer | ||
+ | # dynamic files are always in stateless CHROOT/ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | if [ $# != 6 ]; then | ||
+ | echo " | ||
+ | | ||
+ | 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=" | ||
+ | | ||
+ | # 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: |