User Tools

Site Tools


cluster:144

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cluster:144 [2015/12/23 19:17]
hmeij [Part 2]
cluster:144 [2016/02/05 13:59]
hmeij [Warewulf Golden Image]
Line 47: Line 47:
 Set ''rsync'' to work between the two. Unmount any NFS file systems on the node. Adjust the exclusion selections in template file (ie after /home is unmounted on node I do want the mount point...scratch space, etc). Set ''rsync'' to work between the two. Unmount any NFS file systems on the node. Adjust the exclusion selections in template file (ie after /home is unmounted on node I do want the mount point...scratch space, etc).
  
-  * /usr/lib/libexec/warewulf/wwmkchroot/golden-ststem.tmpl+  * /usr/libexec/warewulf/wwmkchroot/golden-system.tmpl
  
 <code> <code>
Line 211: Line 211:
  
 Yea. Yea.
 +
 +==== Deploying ====
 +
 +As part of my deployment I edited out any device information in file ''/etc/udev/rules.d/70-persistent-net.rules'', that information will be filled in on boot. Remade my VNFS. The reason for this is that in migrating from RHEL 5.5 to CentOS 6.7 I observed the order of the NICs to reverse themselves (but not always). Not sure why but will tell me what NIC eth0 will be.
 +
 +Then we build a template file with node specs in it like so:
 +
 +<code>
 +# HP blades reverses HWADDR (don't ask)
 + # use nic port bottom (no changes)
 + # set both ipaddr/hwaddr then PXEboot, wait...ww times out but images
 + # post edit
 + #   /etc/udev/rules.d fix eth? entries per below, then startup scripts
 + #   eth0 down CC 10.10.x.x onboot=no
 + #   eth1 up   CD 192.168.x.x onboot=yes
 + # reboot (with bootload=EXIT)
 + n1  1C:C1:DE:1C:82:D5 192.168.102.10 1C:C1:DE:1C:82:D4 10.10.102.10 10.11.103.10
 + n2  1C:C1:DE:1C:81:01 192.168.102.11 1C:C1:DE:1C:81:00 10.10.102.11 10.11.103.11
 +...
 +</code>
 +
 +My deploy script (give an entire line from above as arguments)
 +
 +<code>
 +
 +#!/bin/bash
 +
 + # deploy a n0.chroot node via PXE golden image transfer
 + # dynamic files are always in stateless CHROOT/centos-6/root/wwtemplates
 + node=$1
 + hwaddr0=$2
 + ipaddr0=$3
 + hwaddr1=$4
 + ipaddr1=$5
 + ipaddri=$6
 +
 + if [ $# != 6 ]; then
 +         echo "missing args: node hwaddr0 ipaddr0 hwaddr1 ipaddr1 ipaddri"
 +         exit
 + fi
 +
 + wwsh object delete $node -y 
 + sleep 3
 +
 + wwsh node new $node --netdev=eth0 \
 + --hwaddr=$hwaddr0 --ipaddr=$ipaddr0 \
 + --netmask=255.255.0.0  --network=255.255.0.0 -y
 +
 + wwsh node set $node --netdev=eth1 \
 + --hwaddr=$hwaddr1 --ipaddr=$ipaddr1 \
 + --netmask=255.255.0.0  --network=255.255.0.0 -y
 +
 + wwsh node set $node --netdev=ib0 \
 + --ipaddr=$ipaddri \
 + --netmask=255.255.0.0  --network=255.255.0.0 -y
 +
 + wwsh provision set $node --fileadd passwd,shadow,group -y
 + wwsh provision set $node --fileadd hosts,bashrc,profile -y
 + wwsh provision set $node --fileadd network.ww,ifcfg-eth1.ww,ifcfg-ib0.ww -y
 +
 + wwsh object modify -s bootloader=sda $node -y
 + wwsh object modify -s diskformat=sda1,sda4 $node -y
 +
 + if [ "$node" == 'n22' ]; then
 + # golden images with 3 partitions
 + wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext4:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda3:type=ext4:size=+" $node -y
 + else
 + # hp blade 4 partitions
 + wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext4:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda4:type=ext4:size=+" $node -y
 + 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
 + service dhcpd restart
 +
 + echo "now reboot: $node"
 +
 +
 +</code>
 +
  
 \\ \\
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
cluster/144.txt ยท Last modified: 2018/07/26 18:52 by hmeij07