User Tools

Site Tools


cluster:154

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:154 [2017/03/09 16:44]
hmeij07
cluster:154 [2017/03/27 17:08]
hmeij07
Line 112: Line 112:
 # -ni not -pi # -ni not -pi
 perl -ni -e "print unless /^\s+Order allow,deny/" /etc/httpd/conf.d/warewulf-httpd.conf perl -ni -e "print unless /^\s+Order allow,deny/" /etc/httpd/conf.d/warewulf-httpd.conf
 +
 +# the recipe does not set a mysql root password but we will
 +[root@ohpc0-test]# vi /etc/warewulf/database-root.conf 
 +
 +mysql> set password for 'root'@'localhost' = PASSWORD('some_string');
 +Query OK, 0 rows affected (0.00 sec)                                
 +
 +[root@ohcp0-test]# chmod o-r /etc/warewulf/database-root.conf 
  
 # restart/enable services # restart/enable services
Line 214: Line 222:
 wwsh -y provision set ohpc0 --vnfs=centos7.2 --bootstrap=`uname -r` \ wwsh -y provision set ohpc0 --vnfs=centos7.2 --bootstrap=`uname -r` \
      --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network      --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
-systemctl restart dhcpd+
 wwsh pxe update wwsh pxe update
 +wwsh dhcp update
 +systemctl restart dhcpd
 +systemctl restart httpd
  
 </code> </code>
Line 233: Line 244:
                          mountpoint=/:dev=sda3:type=ext3:size=fill" -t node ohpc0                          mountpoint=/:dev=sda3:type=ext3:size=fill" -t node ohpc0
 wwsh -y object modify -s bootlocal=UNDEF -t node ohpc0  wwsh -y object modify -s bootlocal=UNDEF -t node ohpc0 
-systemctl restart dhcpd+
 wwsh pxe update wwsh pxe update
 +wwsh dhcp update
 +systemctl restart dhcpd
 +systemctl restart httpd
  
  
Line 255: Line 269:
        4: NODENAME   = ohpc0        4: NODENAME   = ohpc0
        4: VNFSID     = 2        4: VNFSID     = 2
 +       
 +# Strange that netmask is not listed, but when I recreated the object I used
 +wwsh -y node new ohpc0 --ipaddr=192.168.1.248 --hwaddr=00:15:c5:ef:0c:bf \
 +     --netdev=enp4s0 --netmask=255.255.0.0  --network=255.255.0.0
  
 [root@ohpc0-test ~]# wwsh -y bootstrap list [root@ohpc0-test ~]# wwsh -y bootstrap list
Line 266: Line 284:
 </code> </code>
  
 +Final notes. I now have a 3 node OpenHPC cluster up using CentOS 7.3.1611 ... because of the edit mention above of the provision template URL the CHROOT is at the latest version of CentOS. Thus I updated my SMS master too so that the construct bootstrap=`uname -r` builds an image compatible between SMS and CHROOT.
 +
 +On towards testing the tools.
 +
 +Made a little script to recreate nodes as we'll do this often. And I also some weirdo situation where eth0/1 change NIC location during PXE boot, so I work around it.
 +
 +  * ''deploy.sh''
 +
 +<code>
 +
 +#!/bin/bash
 +# enable both NIC to boot from 501/500
 +# provision black on bottom, red on top (handler swithces to this)
 +# set bootlocal to EXIT reboot, handler exits
 +# switch black to top reboot (no media, fails to hdd)
 +# insane
 +
 +node=n31
 +ipaddr0=192.168.102.40
 +hwaddr0=1c:c1:de:19:40:6f
 +wwsh object delete $node -y 
 +wwsh node new $node --netdev=eth0 --hwaddr=$hwaddr0 --ipaddr=$ipaddr0 --netmask=255.255.0.0  --network=255.255.0.0 -y
 +wwsh -y provision set $node --vnf=centos7.2 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
 +wwsh object modify -s bootloader=sda $node -y
 +wwsh object modify -s diskpartition=sda $node -y
 +wwsh object modify -s diskformat=sda1,sda2,sda3 $node -y
 +wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext3:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda3:type=ext3:size=+" $node -y
 +wwsh provision set --bootlocal=UNDEF $node -y
 +
 +node=n31e
 +ipaddr0=192.168.102.40
 +hwaddr0=1c:c1:de:19:40:6e
 +wwsh object delete $node -y 
 +wwsh node new $node --netdev=eth0 --hwaddr=$hwaddr0 --ipaddr=$ipaddr0 --netmask=255.255.0.0  --network=255.255.0.0 -y
 +wwsh -y provision set $node --vnf=centos7.2 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
 +wwsh object modify -s bootloader=sda $node -y
 +wwsh object modify -s diskpartition=sda $node -y
 +wwsh object modify -s diskformat=sda1,sda2,sda3 $node -y
 +wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext3:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda3:type=ext3:size=+" $node -y
 +wwsh provision set --bootlocal=UNDEF $node -y
 +
 +node=n29
 +ipaddr0=192.168.102.38
 +hwaddr0=1c:c1:de:1c:88:c3
 +wwsh object delete $node -y 
 +wwsh node new $node --netdev=eth0 --hwaddr=$hwaddr0 --ipaddr=$ipaddr0 --netmask=255.255.0.0  --network=255.255.0.0 -y
 +wwsh -y provision set $node --vnf=centos7.2 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
 +wwsh object modify -s bootloader=sda $node -y
 +wwsh object modify -s diskpartition=sda $node -y
 +wwsh object modify -s diskformat=sda1,sda2,sda3 $node -y
 +wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext3:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda3:type=ext3:size=+" $node -y
 +wwsh provision set --bootlocal=UNDEF $node -y
 +
 +node=n29e
 +ipaddr0=192.168.102.38
 +hwaddr0=1c:c1:de:1c:88:c2
 +wwsh object delete $node -y 
 +wwsh node new $node --netdev=eth0 --hwaddr=$hwaddr0 --ipaddr=$ipaddr0 --netmask=255.255.0.0  --network=255.255.0.0 -y
 +wwsh -y provision set $node --vnf=centos7.2 --bootstrap=`uname -r` --files=dynamic_hosts,passwd,group,shadow,slurm.conf,munge.key,network
 +wwsh object modify -s bootloader=sda $node -y
 +wwsh object modify -s diskpartition=sda $node -y
 +wwsh object modify -s diskformat=sda1,sda2,sda3 $node -y
 +wwsh object modify -s filesystems="mountpoint=/boot:dev=sda1:type=ext3:size=1024,dev=sda2:type=swap:size=6144,mountpoint=/:dev=sda3:type=ext3:size=+" $node -y
 +wwsh provision set --bootlocal=UNDEF $node -y
 +
 +wwsh pxe update
 +wwsh dhcp update
 +systemctl restart dhcpd 
 +systemctl restart httpd 
 +echo "after first boot: wwsh provision set --bootlocal=EXIT $node"
 +
 +</code>
 \\ \\
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
cluster/154.txt ยท Last modified: 2018/08/17 12:48 by hmeij07