-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-compute.sh
75 lines (58 loc) · 1.77 KB
/
post-compute.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
##CentOS7Update4 with Mellanox & PBS Pro
##Compute node Post installation pdsh "wget -O - http://puppet/gcm-content/repo/script/post-compute.sh | bash"
#!/bin/sh
cat >/etc/yum.repos.d/local.repo<< EOF
[mlnx]
name=MLNX
baseurl=http://puppet/gcm-content/repo/
enabled=1
gpgcheck=0
[centos]
name=CentOS7Update4-local
baseurl=http://puppet/gcm-content/repo/CentOS7Update4/
enabled=1
gpgcheck=0
[rpm]
name=Custom RPM
baseurl=http://puppet/gcm-content/repo/rpm/
enabled=1
gpgcheck=0
EOF
yum install tcl tk vim numactl-devel -y
yum groupinstall 'Development tools' -y
yum groupinstall 'MLNX_OFED HPC' -y
cat > /etc/sysconfig/network-scripts/ifcfg-ib0 <<EOF
DEVICE=ib0
TYPE=InfiniBand
ONBOOT=yes
BOOTPROTO=none
IPV6INIT=no
CONNECTED_MODE=yes
NETMASK=255.255.255.0
EOF
first="$(/sbin/ip -o -4 addr list em1 | awk '{print $4}' | cut -d/ -f1 | cut -d. -f1-2)"
second=2
third="$(/sbin/ip -o -4 addr list em1 | awk '{print $4}' | cut -d/ -f1 | cut -d. -f4)"
echo "IPADDR=$first.$second.$third" >> /etc/sysconfig/network-scripts/ifcfg-ib0
systemctl enable openibd
systemctl enable pbs
systemctl disable ip6tables.service
systemctl disable autofs
cat >/etc/pbs.conf << EOF
PBS_EXEC=/opt/pbs
PBS_SERVER=master.local
PBS_START_SERVER=0
PBS_START_SCHED=0
PBS_START_COMM=0
PBS_START_MOM=1
PBS_HOME=/var/spool/pbs
PBS_CORE_LIMIT=unlimited
PBS_SCP=/bin/scp
EOF
cat >/etc/profile.d/module.sh << EOF
export MODULEPATH=/home/module
EOF
wget http://10.1.1.10/install/post/script/cuda_9.1.85_387.26_linux.run -O /tmp/cuda_9.1.85_387.26_linux.run
wget http://10.1.1.10/install/post/script/config -O /var/spool/pbs/mom_priv/config
wget http://10.1.1.10/install/post/mlnx/docs/scripts/openibd-post-start-configure-interfaces/post-start-hook.sh -O /etc/infiniband/post-start-hook.sh
chmod +x /etc/infiniband/post-start-hook.sh