From 86b6ba9220eccfb612b60b2fbdd1feedb76682bb Mon Sep 17 00:00:00 2001 From: Aditi Gaur <116667879+aditigaur4@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:50:41 -0700 Subject: [PATCH] Add slurm installation for rhel 9 (#289) Also include slurm-contribs package for installation. --- slurm/install/package.py | 2 +- slurm/install/rhel.sh | 23 ++++++++++--------- slurm/install/slurmel8.repo | 2 +- .../install/{slurmel7.repo => slurmel9.repo} | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) rename slurm/install/{slurmel7.repo => slurmel9.repo} (65%) diff --git a/slurm/install/package.py b/slurm/install/package.py index 0cf97ff8..84fa00e1 100644 --- a/slurm/install/package.py +++ b/slurm/install/package.py @@ -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") diff --git a/slurm/install/rhel.sh b/slurm/install/rhel.sh index d9615a36..f9e6a8b2 100755 --- a/slurm/install/rhel.sh +++ b/slurm/install/rhel.sh @@ -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" @@ -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 diff --git a/slurm/install/slurmel8.repo b/slurm/install/slurmel8.repo index e83b1d42..6ecf0eaa 100644 --- a/slurm/install/slurmel8.repo +++ b/slurm/install/slurmel8.repo @@ -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 diff --git a/slurm/install/slurmel7.repo b/slurm/install/slurmel9.repo similarity index 65% rename from slurm/install/slurmel7.repo rename to slurm/install/slurmel9.repo index e76e2ccc..da008d11 100644 --- a/slurm/install/slurmel7.repo +++ b/slurm/install/slurmel9.repo @@ -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