Skip to content

Commit

Permalink
Add slurm installation for rhel 9 (#289)
Browse files Browse the repository at this point in the history
Also include slurm-contribs package for installation.
  • Loading branch information
aditigaur4 authored Oct 30, 2024
1 parent fff778d commit 86b6ba9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion slurm/install/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _add(name: str, path: Optional[str] = None, mode: Optional[int] = None) -> N
_add("installlib.py", "installlib.py")
_add("install.py", "install.py")
_add("slurmel8.repo", "slurmel8.repo")
_add("slurmel7.repo", "slurmel7.repo")
_add("slurmel9.repo", "slurmel9.repo")
_add("ubuntu.sh", "ubuntu.sh", 600)
_add("rhel.sh", "rhel.sh", 600)
_add("AzureCA.pem", "AzureCA.pem")
Expand Down
23 changes: 12 additions & 11 deletions slurm/install/rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ DISABLE_PMC=$3
OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d= -f2 | cut -d\" -f2 | cut -d. -f1)
OS_ID=$(cat /etc/os-release | grep ^ID= | cut -d= -f2 | cut -d\" -f2 | cut -d. -f1)

if [ "$OS_VERSION" -lt "8" ]; then
echo "RHEL versions < 8 no longer supported"
exit 1
elif [ "$OS_VERSION" -gt "8" ]; then
PACKAGE_DIR=slurm-pkgs-rhel9
else
PACKAGE_DIR=slurm-pkgs-rhel8
fi

if [ "$OS_VERSION" -gt "7" ]; then
if [ "${OS_ID,,}" == "rhel" ]; then
if [ "${OS_ID,,}" == "rhel" ]; then
dnf -y install -y perl-Switch
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
else
yum -y install epel-release
dnf -y --enablerepo=powertools install -y perl-Switch
fi
PACKAGE_DIR=slurm-pkgs-rhel8
else
echo "RHEL versions < 8 no longer supported"
exit 1
fi

yum -y install munge jq
slurm_packages="slurm slurm-slurmrestd slurm-libpmi slurm-devel slurm-pam_slurm slurm-perlapi slurm-torque slurm-openlava slurm-example-configs slurm-contribs"
sched_packages="slurm-slurmctld slurm-slurmdbd"
Expand All @@ -37,10 +38,10 @@ execute_packages="slurm-slurmd"

if [ "$DISABLE_PMC" == "False" ]; then

if [ "$OS_VERSION" -gt "7" ]; then
cp slurmel8.repo /etc/yum.repos.d/slurm.repo
if [ "$OS_VERSION" -gt "8" ]; then
cp slurmel9.repo /etc/yum.repos.d/slurm.repo
else
cp slurmel7.repo /etc/yum.repos.d/slurm.repo
cp slurmel8.repo /etc/yum.repos.d/slurm.repo
fi

## This package is pre-installed in all hpc images used by cyclecloud, but if customer wants to
Expand Down
2 changes: 1 addition & 1 deletion slurm/install/slurmel8.repo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[slurm]
name=Slurm Workload Manager
baseurl=https://packages.microsoft.com/yumrepos/slurm-el8-insiders
baseurl=https://packages.microsoft.com/yumrepos/slurm-el8
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[slurm]
name=Slurm Workload Manager
baseurl=https://packages.microsoft.com/yumrepos/slurm-el7-insiders
baseurl=https://packages.microsoft.com/yumrepos/slurm-el9
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
Expand Down

0 comments on commit 86b6ba9

Please sign in to comment.