User Tools

Site Tools


cluster:139

Warning: Undefined array key -1 in /usr/share/dokuwiki/inc/html.php on line 1458

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
cluster:139 [2015/04/16 10:59]
hmeij
cluster:139 [2018/08/16 08:58] (current)
hmeij07 [3.99]
Line 2: Line 2:
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
  
-===== Warewulf LBL =====+===== Warewulf Stateless =====
  
   * [[http://warewulf.lbl.gov/trac]] Warewulf is a scalable systems management suite originally developed to manage large high-performance Linux clusters.  My Project Kusu replacement since IBM bought up Platform LSF and dished the hpccommunnity.org web site, grrrh. (old info at https://dokuwiki.wesleyan.edu/doku.php?id=cluster:88)   * [[http://warewulf.lbl.gov/trac]] Warewulf is a scalable systems management suite originally developed to manage large high-performance Linux clusters.  My Project Kusu replacement since IBM bought up Platform LSF and dished the hpccommunnity.org web site, grrrh. (old info at https://dokuwiki.wesleyan.edu/doku.php?id=cluster:88)
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
   * answer is here https://groups.google.com/a/lbl.gov/forum/#!topic/warewulf/5OhfZCf_eqE   * answer is here https://groups.google.com/a/lbl.gov/forum/#!topic/warewulf/5OhfZCf_eqE
 +  * quoting 
 +
 +<code>
 +What it appears you'll need to do initially is build out a chroot
 +directory. For example, for a Scientific Linux 6.x install, you'd do:
 +
 +    # wwmkchroot sl-6 /var/chroots/sl-6     (or whatever path you want
 +to store them at -- run wwmkchroot -h for the help)
 +
 +  That will give the base chroot for the VNFS at /var/chroots/sl-6.
 +You'll then set the environment variable CHROOTDIR when you execute
 +wwinit.
 +
 +    # CHROOTDIR=/var/chroots/sl-6 wwinit VNFS
 +
 +  I know when you use the 'icr' wwinit functions, it creates a base
 +chroot based upon the host OS. But none of the other wwinit scripts,
 +by default, create one; So you will need to build the chroot and
 +specify where the directory is. Then when the VNFS part of wwinit is
 +ran, it will build the VNFS and import it into the datastore at that
 +time, setting the one specified as the default VNFS in the
 +configuration.
 +</code>
  
 So we start by making the chroot directories, first we'll build a generic centos-6. Then we initialize the warewulf environment. So we start by making the chroot directories, first we'll build a generic centos-6. Then we initialize the warewulf environment.
Line 188: Line 211:
 wwvnfs --chroot /var/chroots/centos-6 --hybridpath=/vnfs wwvnfs --chroot /var/chroots/centos-6 --hybridpath=/vnfs
 Overwrite original: y Overwrite original: y
 +
 +# reboot node, observe mount, then add NTP to chgroot
 +
 +yum --tolerant --installroot /var/chroots/centos-6 -y install ntp
 +
 +vi etc/init.d/ntpd (inside of chroot, edit)
 +# chkconfig: 35 58 74
 +
 +# then make the following links in etc/rc[3|5].d/S58ntpd pointing to ../init.d/ntpd
 +
 +vi etc/ntp.conf (inside of chroot, sole contents are, IP is master on private network)
 +restrict default ignore
 +restrict 127.0.0.0
 +server 192.168.1.217
 +restrict 192.168.1.217 nomodify
 +
 +wwvnfs --chroot /var/chroots/centos-6 --hybridpath=/vnfs -y
 +VNFS 'centos-6 has been imported
 +
 +# reboot node
  
 </code> </code>
 +
 +Then build the node up:
 +
 +  * use yum to install the openlava 2.2.1 RPM (pulls in tcl)
 +    * copy the openlava config files into the centos-6 are
 +  * use yum to install postfix 
 +    * add links in rc3.d and rc5.d
 +    * remove sendmail links
 +  * yum install perl
 +  * yum install munge
 +    * build RPMs from tar ball
 +  * 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>
 +
 +
 +[[cluster:144|Warewulf Golden Image]]
  
 Useful links Useful links
Line 197: Line 354:
   * http://warewulf.lbl.gov/trac/wiki/Documentation   * http://warewulf.lbl.gov/trac/wiki/Documentation
  
 +==== 3.6.99 ====
 +
 +<code>
 +
 +  764  cd warewulf/
 +  765  wget http://warewulf.lbl.gov/downloadds/testing/3.6.99/warewulf-common-3.6.99.tar.gz
 +  766  wget http://warewulf.lbl.gov/downloads/testing/3.6.99/warewulf-common-3.6.99.tar.gz
 +  767  wget http://warewulf.lbl.gov/downloads/testing/3.6.99/warewulf-provision-3.6.99.tar.gz
 +  768  wget http://warewulf.lbl.gov/downloads/testing/3.6.99/warewulf-cluster-3.6.99.tar.gz
 +  769  wget http://warewulf.lbl.gov/downloads/testing/3.6.99/warewulf-vnfs-3.6.99.tar.gz
 +  
 +  771  yum groupinstall "Development Tools"
 + 
 +  773  man rpmbuild
 +  774  rpmbuild --help
 +  775  rpmbuild -ta warewulf-common-3.6.99.tar.gz 
 +  778  rpmbuild -ta warewulf-cluster-3.6.99.tar.gz 
 +  779  rpmbuild -ta warewulf-vnfs-3.6.99.tar.gz 
 +  
 +  782  yum install libselinux-devel
 +  784  yum install  libacl-devel  libattr-devel
 +  785  rpmbuild -ta warewulf-provision-3.6.99.tar.gz 
 +
 +</code>
 +
 +[[cluster:143|Warewulf Statefull]]  [[cluster:144|Warewulf Golden Image]]
 \\ \\
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
cluster/139.1429196357.txt.gz ยท Last modified: 2015/04/16 10:59 by hmeij