This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
cluster:139 [2015/04/08 18:50] hmeij [Warewulf LBL] |
cluster:139 [2018/08/15 15:00] hmeij07 [3.99] |
||
---|---|---|---|
Line 2: | Line 2: | ||
**[[cluster: | **[[cluster: | ||
- | ===== Warewulf | + | ===== Warewulf |
* [[http:// | * [[http:// | ||
Line 59: | Line 59: | ||
</ | </ | ||
- | Next comes a piece of mystery. When executing | + | Next comes a piece of mystery. When executing |
* Lethal error thrown by module: / | * Lethal error thrown by module: / | ||
* answer is here https:// | * answer is here https:// | ||
+ | * quoting | ||
+ | |||
+ | < | ||
+ | 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 / | ||
+ | to store them at -- run wwmkchroot -h for the help) | ||
+ | |||
+ | That will give the base chroot for the VNFS at / | ||
+ | You'll then set the environment variable CHROOTDIR when you execute | ||
+ | wwinit. | ||
+ | |||
+ | # CHROOTDIR=/ | ||
+ | |||
+ | I know when you use the ' | ||
+ | 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. | ||
+ | </ | ||
So we start by making the chroot directories, | So we start by making the chroot directories, | ||
Line 122: | Line 145: | ||
</ | </ | ||
- | Next restart some warewulf services. I had to edit the / | + | Next restart some warewulf services. I had to edit the / |
< | < | ||
Line 132: | Line 155: | ||
[root@petaltail ~]# wwsh pxe update | [root@petaltail ~]# wwsh pxe update | ||
No nodes found | No nodes found | ||
+ | |||
+ | [root@petaltail ~]# wwsh | ||
+ | Warewulf> | ||
+ | Warewulf> | ||
+ | Are you sure you want to make the following changes to 1 node(s): | ||
+ | |||
+ | SET: BOOTSTRAP | ||
+ | SET: VNFS = centos-6 | ||
+ | |||
+ | Yes/No> y | ||
+ | Warewulf> | ||
+ | |||
+ | </ | ||
+ | |||
+ | Booting the node we observe the eth0 MAC address being picked up by DHCPd followed by the tftpboot process. | ||
+ | |||
+ | < | ||
+ | |||
+ | [root@petaltail ~]# wwsh file import /etc/passwd | ||
+ | |||
+ | [root@petaltail ~]# wwsh file list | ||
+ | dynamic_hosts | ||
+ | group : -rw-r--r-- 1 root root 6247 /etc/group | ||
+ | passwd | ||
+ | shadow | ||
+ | |||
+ | [root@petaltail ~]# wwsh provision set b[0-51] --fileadd passwd | ||
+ | |||
+ | [root@petaltail ~]# wwsh provision print | ||
+ | #### b51.cluster ############################################################## | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | b51.cluster: | ||
+ | ... | ||
+ | |||
+ | </ | ||
+ | |||
+ | Next build a hybrid VNFS, this is the way to add packages to the nodes. | ||
+ | |||
+ | < | ||
+ | |||
+ | cd / | ||
+ | mkdir vnfs | ||
+ | |||
+ | vi etc/fstab (inside of chroot area, edit) | ||
+ | 192.168.1.217:/ | ||
+ | |||
+ | wwvnfs --chroot / | ||
+ | Overwrite original: y | ||
+ | |||
+ | # reboot node, observe mount, then add NTP to chgroot | ||
+ | |||
+ | yum --tolerant --installroot / | ||
+ | |||
+ | vi etc/ | ||
+ | # chkconfig: 35 58 74 | ||
+ | |||
+ | # then make the following links in etc/ | ||
+ | |||
+ | vi etc/ | ||
+ | restrict default ignore | ||
+ | restrict 127.0.0.0 | ||
+ | server 192.168.1.217 | ||
+ | restrict 192.168.1.217 nomodify | ||
+ | |||
+ | wwvnfs --chroot / | ||
+ | VNFS ' | ||
+ | |||
+ | # reboot node | ||
+ | |||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | < | ||
+ | |||
+ | [root@petaltail ~]# cd / | ||
+ | [root@petaltail chroots]# chroot centos-6 | ||
+ | [root@petaltail /]# pwd | ||
+ | / <--- inside of installroot | ||
+ | [root@petaltail /]# mkdir / | ||
+ | [root@petaltail /]# chown munge:munge / | ||
+ | [root@petaltail /]# mkdir / | ||
+ | [root@petaltail /]# chown slurm:munge / | ||
+ | chown: invalid user: `slurm: | ||
+ | |||
+ | # since the passwd|shadow|group files come from database you need to create the relevant lines | ||
+ | |||
+ | [root@petaltail /]# chown slurm:munge / | ||
+ | [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/ | ||
+ | |||
+ | # and don't forget | ||
+ | [root@petaltail chroots]# wwvnfs --chroot / | ||
+ | |||
+ | # reboot node | ||
+ | </ | ||
+ | |||
+ | |||
+ | To build short hostnames you can create a template inside of the chroot environment. | ||
+ | |||
+ | < | ||
+ | |||
+ | #--- build file CHROOT/ | ||
+ | | ||
+ | | ||
+ | #--- end | ||
+ | |||
+ | # add that file (using wwsh provision) to the nodes. | ||
+ | |||
+ | [root@]# wwsh file import / | ||
+ | | ||
+ | |||
+ | [root@]# wwsh provision set n[00-15] --fileadd=network.ww | ||
+ | |||
+ | </ | ||
+ | |||
+ | Second interface: create a template inside of the chroot environment. | ||
+ | |||
+ | < | ||
+ | |||
+ | wwsh node set b49 --netdev=eth1 \ | ||
+ | --hwaddr=00: | ||
+ | --netmask=255.255.0.0 | ||
+ | |||
+ | #--- build file CHROOT/ | ||
+ | DEVICE=eth1 | ||
+ | BOOTPROTO=static | ||
+ | ONBOOT=yes | ||
+ | HWADDR=%{NETDEVS:: | ||
+ | IPADDR=%{NETDEVS:: | ||
+ | NETMASK=%{NETDEVS:: | ||
+ | NETWORK=%{NETDEVS:: | ||
+ | #--- end | ||
+ | |||
+ | # add that file (using wwsh provision) to the nodes. | ||
+ | |||
+ | [root@]# wwsh file import / | ||
+ | | ||
+ | |||
+ | [root@]# wwsh provision set n[00-15] --fileadd=ifcfg-eth1.ww | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now, lets put it all together which can form the basis for a script. | ||
+ | |||
+ | < | ||
+ | |||
+ | # make sure it boots across network, alter BIOS settings | ||
+ | |||
+ | wwsh node new b6 --netdev=eth0 \ | ||
+ | --hwaddr=00: | ||
+ | --netmask=255.255.0.0 | ||
+ | --groups=wwnodes | ||
+ | |||
+ | wwsh node set b6 --netdev=eth1 \ | ||
+ | --hwaddr=00: | ||
+ | --netmask=255.255.0.0 | ||
+ | |||
+ | wwsh provision set b6 --fileadd passwd, | ||
+ | wwsh provision set b6 --fileadd hosts, | ||
+ | wwsh provision set b6 --fileadd network.ww, | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | [[cluster: | ||
+ | |||
+ | Useful links | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * http:// | ||
+ | |||
+ | ==== 3.99 ==== | ||
+ | |||
+ | < | ||
+ | |||
+ | 764 cd warewulf/ | ||
+ | 765 wget http:// | ||
+ | 766 wget http:// | ||
+ | 767 wget http:// | ||
+ | 768 wget http:// | ||
+ | 769 wget http:// | ||
+ | | ||
+ | 771 yum groupinstall " | ||
+ | |||
+ | 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 | ||
+ | 785 rpmbuild -ta warewulf-provision-3.6.99.tar.gz | ||
</ | </ | ||
+ | [[cluster: | ||
\\ | \\ | ||
**[[cluster: | **[[cluster: |