User Tools

Site Tools


cluster:139

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:139 [2015/04/16 18:29]
hmeij
cluster:139 [2015/07/31 18:06]
hmeij [Warewulf LBL]
Line 59: Line 59:
 </code> </code>
  
-Next comes a piece of mystery. When executing  ''wwinit ALL'' I ran into a lether, no less, error. After much digging found the answer here and surprisingly found little in the documentation on this.+Next comes a piece of mystery. When executing  ''wwinit ALL'' I ran into a lethal, no less, error. After much digging found the answer here and surprisingly found little in the documentation on this.
  
   * Lethal error thrown by module: /usr/libexec/warewulf/wwinit/91-vnfs.init   * Lethal error thrown by module: /usr/libexec/warewulf/wwinit/91-vnfs.init
Line 218: Line 218:
     * add links in rc3.d and rc5.d     * add links in rc3.d and rc5.d
     * remove sendmail links     * remove sendmail links
 +  * yum install perl
 +  * yum install munge
 +    * build RPMs from tar ball
   * rebuild the VNFS and reboot   * rebuild the VNFS and reboot
 +
 +Sometimes you can edit the files in the chroot directly, sometimes you must modify the installtoot directly.  It's easiest to just do the latter all the time.
 +
 +<code>
 +
 +[root@petaltail ~]# cd /var/chroots
 +[root@petaltail chroots]# chroot centos-6
 +[root@petaltail /]# pwd                  
 +/                          <--- inside of installroot              
 +[root@petaltail /]# mkdir /var/log/munge 
 +[root@petaltail /]# chown munge:munge /var/log/munge
 +[root@petaltail /]# mkdir /var/log/slurm
 +[root@petaltail /]# chown slurm:munge /var/log/slurm
 +chown: invalid user: `slurm:munge'
 +
 +# since the passwd|shadow|group files come from database you need to create the relevant lines
 +
 +[root@petaltail /]# chown slurm:munge /var/log/slurm
 +[root@petaltail /]# exit
 +exit
 +[root@petaltail chroots]# ls
 +centos-6
 +
 +# outside edit commenting out rc.local directives making these dirs etc
 +[root@petaltail chroots]# vi centos-6/etc/rc.local
 +
 +# and don't forget
 +[root@petaltail chroots]# wwvnfs --chroot /var/chroots/centos-6 --hybridpath=/vnfs  -y
 +
 +# reboot node
 +</code>
 +
 +
 +To build short hostnames you can create a template inside of the chroot environment.
 +
 +<code>
 +
 +#--- build file CHROOT/root/wwtemplates/network.ww
 + NETWORKING=yes
 + HOSTNAME=%{NODENAME}
 +#--- end 
 +
 +# add that file (using wwsh provision) to the nodes.
 +
 +[root@]# wwsh file import /var/chroot/centos-6/root/wwtemplates/network.ww \
 + --path=/etc/sysconfig/network --name=network.ww
 +
 +[root@]# wwsh provision set n[00-15] --fileadd=network.ww
 +
 +</code>
 +
 +Second interface: create a template inside of the chroot environment.
 +
 +<code>
 +
 +wwsh node set b49 --netdev=eth1 \
 +--hwaddr=00:00:00:00:00:00 --ipaddr=10.10.1.55 \
 +--netmask=255.255.0.0  --network=255.255.0.0
 +
 +#--- build file CHROOT/root/wwtemplates/ifcfg-eth1.ww
 +DEVICE=eth1
 +BOOTPROTO=static
 +ONBOOT=yes
 +HWADDR=%{NETDEVS::ETH1::HWADDR}
 +IPADDR=%{NETDEVS::ETH1::IPADDR}
 +NETMASK=%{NETDEVS::ETH1::NETMASK}
 +NETWORK=%{NETDEVS::ETH1::NETWORK}
 +#--- end 
 +
 +# add that file (using wwsh provision) to the nodes.
 +
 +[root@]# wwsh file import /var/chroot/centos-6/root/wwtemplates/ifcfg-eth1.ww \
 + --path=/etc/sysconfig/network-scripts/ifcfg-eth1 --name=ifcfg-eth1.ww
 +
 +[root@]# wwsh provision set n[00-15] --fileadd=ifcfg-eth1.ww
 +
 +</code>
 +
 +Now, lets put it all together which can form the basis for a script.
 +
 +<code>
 +
 +# make sure it boots across network, alter BIOS settings
 +
 +wwsh node new b6 --netdev=eth0 \
 +--hwaddr=00:00:00:00:00:00 --ipaddr=192.168.1.12 \
 +--netmask=255.255.0.0  --network=255.255.0.0
 +--groups=wwnodes
 +
 +wwsh node set b6 --netdev=eth1 \
 +--hwaddr=00:00:00:00:00:00 --ipaddr=10.10.100.12 \
 +--netmask=255.255.0.0  --network=255.255.0.0
 +
 +wwsh provision set b6 --fileadd passwd,shadow,group
 +wwsh provision set b6 --fileadd hosts,bashrc,profile
 +wwsh provision set b6 --fileadd network.ww,ifcfg-eth1.ww
 +
 +
 +</code>
 +
  
 Useful links Useful links
cluster/139.txt ยท Last modified: 2018/08/16 12:58 by hmeij07