This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cluster:139 [2015/04/17 19:41] hmeij [Warewulf LBL] |
cluster:139 [2015/07/31 18:06] hmeij [Warewulf LBL] |
||
---|---|---|---|
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: / | ||
Line 222: | Line 222: | ||
* build RPMs from tar ball | * 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. | ||
+ | |||
+ | < | ||
+ | |||
+ | [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, | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
Useful links | Useful links |