summaryrefslogtreecommitdiff
path: root/centos7/01_master_pkgs.sh
blob: 55b1dce802e58aa5353764c2222fb167c6dbb8c0 (plain)
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
#!/usr/bin/env bash

# This script installs OpenHPC on a bare CentOS machine.
# The base of this script is from the docs-ohpc package at
# /opt/ohpc/pub/doc/recipes/centos7/aarch64/warewulf/slurm/recipe.sh
# For more information, see the OpenHPC installation guide, Apendix A.

# Stage 01: Master Packages only
# Requires input.local and a set environment correctly beforehand.

set -ex

. ./input.local

if [[ ${node_is_master} -eq 0 ]]; then
  echo "This script only runs on the master node"
  exit 0
fi

# ------------------------------------------------------------
# Add baseline OpenHPC and provisioning services (Section 4.3)
# ------------------------------------------------------------

yum -y install ohpc-base
yum -y install ohpc-warewulf
yum -y install ohpc-slurm-server

# ------------------------------------------------------------
# Add InfiniBand support services on master node (Section 4.5)
# ------------------------------------------------------------
if [[ ${enable_ipoib} -eq 1 ]];then
  yum -y groupinstall "InfiniBand Support"
  yum -y install infinipath-psm
  systemctl start rdma
fi

# Optionally enable opensm subnet manager
if [[ ${enable_opensm} -eq 1 ]];then
     yum -y install opensm
     systemctl enable opensm
     systemctl start opensm
fi

# Make sure we enable the basic services
systemctl enable mariadb.service
systemctl enable httpd.service