User Tools

Site Tools


cluster:154

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:154 [2017/03/20 10:09]
hmeij07 [Deploy]
cluster:154 [2018/08/17 08:48] (current)
hmeij07
Line 2: Line 2:
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
  
-==== OpenHPC ====+==== OpenHPC page 1====
  
   * install vanilla CentOS 7.2 on //master//   * install vanilla CentOS 7.2 on //master//
Line 10: Line 10:
  
 <code> <code>
- +              
-[root@ohpc0-test ~]# systemctl stop firewalld                +[root@ohpc0-test ~]# systemctl disable NetworkManager  
 +             
 [root@ohpc0-test ~]# systemctl disable firewalld          [root@ohpc0-test ~]# systemctl disable firewalld         
            
-[root@ohpc0-test ~]#  yum install iptables-services -y                          +[root@ohpc0-test ~]#  yum install iptables-services -y    
 +                       
 [root@ohpc0-test ~]# systemctl enable iptables [root@ohpc0-test ~]# systemctl enable iptables
-[root@ohpc0-test ~]# systemctl enable ip6tables 
  
 [root@ohpc0-test ~]# vi /etc/sysconfig/iptables [root@ohpc0-test ~]# vi /etc/sysconfig/iptables
  
 # lock up port 22: note "eth1" # lock up port 22: note "eth1"
--A INPUT -i enp8s0 -p tcp -m state --state NEW -m tcp -s 129.133.0.0/16 --dport 22 -j ACCEPT+-A INPUT -p tcp -m state --state NEW -m tcp -s 129.133.0.0/16 --dport 22 -j ACCEPT
  
 # local allow: note "eth0" # local allow: note "eth0"
--A INPUT -i enp4s0 -d 192.168.0.0/16 -p tcp --dport 0:65535 -j ACCEPT +-A INPUT -d 192.168.0.0/16 -p tcp --dport 0:65535 -j ACCEPT 
--A INPUT -i enp4s0 -d 192.168.0.0/16 -p udp --dport 0:65535 -j ACCEPT+-A INPUT -d 192.168.0.0/16 -p udp --dport 0:65535 -j ACCEPT
  
-[root@ohpc0-test ~]# vi /etc/sysconfig/ip6tables+[root@ohpc0-test ~]# reboot
  
-comment out port 22 +check firwewall
- +
-[root@ohpc0-test ~]# systemctl restart iptables +
-[root@ohpc0-test ~]# systemctl restart ip6tables+
 [root@ohpc0-test ~]# iptables -L [root@ohpc0-test ~]# iptables -L
 Chain INPUT (policy ACCEPT) Chain INPUT (policy ACCEPT)
-target     prot opt source               destination +...
-ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED +
-ACCEPT     icmp --  anywhere             anywhere +
-ACCEPT     all  --  anywhere             anywhere+
 ACCEPT     tcp  --  129.133.0.0/16       anywhere             state NEW tcp dpt:ssh ACCEPT     tcp  --  129.133.0.0/16       anywhere             state NEW tcp dpt:ssh
 ACCEPT     tcp  --  anywhere             192.168.0.0/16       tcp ACCEPT     tcp  --  anywhere             192.168.0.0/16       tcp
Line 44: Line 39:
 REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited
  
-Chain FORWARD (policy ACCEPT) +# copy global hpc /etc/hosts in place 
-target     prot opt source               destination +# check hostname is on provisioning network 
-REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited +[root@ohpc0-test ~]# ping `hostname` 
- +PING ohpc0-test (192.168.1.249) 56(84) bytes of data. 
-Chain OUTPUT (policy ACCEPT) +64 bytes from ohpc0-test (192.168.1.249): icmp_seq=1 ttl=64 time=0.043 ms
-target     prot opt source               destination +
- +
-[root@ohpc0-test ~]# reboot+
  
 </code> </code>
Line 112: Line 104:
 # -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 181: Line 181:
 # finally on **master** issue # finally on **master** issue
 perl -pi -e "s/ControlMachine=\S+/ControlMachine=ohpc0-test/" /etc/slurm/slurm.conf perl -pi -e "s/ControlMachine=\S+/ControlMachine=ohpc0-test/" /etc/slurm/slurm.conf
 +# this turned out to be wrong, first I change the hostname to ''ohpc0-slurm'' ControllerMachine=
 +# added line in /etc/hosts pointing this to 192.168.1.249, then I defined ''/etc/slurm/slurm.con''
 +
 +NodeName=ohpc0-slurm NodeAddr=192.168.1.249 CPUs=2 \
 +        RealMemory=8 Sockets=2 CoresPerSocket=4 ThreadsPerCore=2 State=UNKNOWN
 +NodeName=n29 NodeAddr=192.168.102.38 CPUs=2 \
 +        RealMemory=8 Sockets=2 CoresPerSocket=4 ThreadsPerCore=2 State=UNKNOWN
 +NodeName=n31 NodeAddr=192.168.102.40 CPUs=2 
 +        RealMemory=8 Sockets=2 CoresPerSocket=4 ThreadsPerCore=2 State=UNKNOWN
 +PartitionName=test Nodes=n29,n31 Default=YES MaxTime=INFINITE State=UP
 +
 +
 +
 +
 +
 echo "/home *(rw,no_subtree_check,fsid=10,no_root_squash)" >> /etc/exports echo "/home *(rw,no_subtree_check,fsid=10,no_root_squash)" >> /etc/exports
 echo "/opt/ohpc/pub *(ro,no_subtree_check,fsid=11)" >> /etc/exports echo "/opt/ohpc/pub *(ro,no_subtree_check,fsid=11)" >> /etc/exports
Line 280: Line 295:
 On towards testing the tools. 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>
 +
 +page 1 - [[cluster:155|OpenHPC page 2]] - [[cluster:156|OpenHPC page 3]] - [[cluster:160|OpenHPC page 4]]
 \\ \\
 **[[cluster:0|Back]]** **[[cluster:0|Back]]**
cluster/154.1490018956.txt.gz · Last modified: 2017/03/20 10:09 by hmeij07