From 37143f87e16f758404985bed10ad6f7a192e7f34 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Mon, 5 Aug 2024 14:27:12 +0100 Subject: [PATCH] Migrate PBS container to rocklinux 8 and openpbs 23.06 (#649) * Replace docker-compose with docker compose * Migrate PBS container to rockylinux 8 and openpbs 23.06 --- ci/pbs/Dockerfile | 31 +++++++++++-------------------- ci/pbs/build.sh | 11 ----------- ci/pbs/master-entrypoint.sh | 2 +- ci/pbs/slave-entrypoint.sh | 2 +- 4 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 ci/pbs/build.sh diff --git a/ci/pbs/Dockerfile b/ci/pbs/Dockerfile index a13d9002..b42556f0 100644 --- a/ci/pbs/Dockerfile +++ b/ci/pbs/Dockerfile @@ -1,20 +1,5 @@ -# inspired from https://github.com/PBSPro/pbspro/blob/v18.1.beta/docker/centos7/ -# multi-stage build -# build script will be triggered -FROM centos:7.5.1804 AS builder -# install dependencies for building -RUN yum install -y gcc make rpm-build libtool hwloc-devel libX11-devel \ - libXt-devel libedit-devel libical-devel ncurses-devel perl \ - postgresql-devel python-devel tcl-devel tk-devel swig expat-devel \ - openssl-devel libXext libXft git postgresql-contrib -# get known PBS Pro source code -RUN git clone --branch release_18_1_branch https://github.com/pbspro/pbspro.git /src/pbspro -COPY build.sh / -RUN bash /build.sh - -# base image -FROM centos:7.5.1804 -LABEL description="PBS Professional Open Source and conda" +FROM rockylinux:8 +LABEL description="openpbs and conda" #The pbs master node name, can be overridden if needed ENV PBS_MASTER pbs_master @@ -22,14 +7,20 @@ ENV PATH /opt/pbs/bin:/opt/anaconda/bin:$PATH ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 -COPY --from=builder /root/rpmbuild/RPMS/x86_64/pbspro-server-*.rpm . -# install pbspro and useful packages -RUN yum install -y pbspro-server-*.rpm curl bzip2 git gcc sudo openssh-server && yum clean all +# install openpbs and useful packages +RUN yum install -y unzip bzip2 git gcc sudo openssh-server && yum clean all +RUN curl -o openpbs.zip https://vcdn.altair.com/rl/OpenPBS/openpbs_23.06.06.rockylinux_8.8.zip && \ + unzip openpbs.zip && \ + mv openpbs_23.06.06.rockylinux_8.8/openpbs-*.rpm . && \ + rm -rf openpbs.zip openpbs_23.06.06.rockylinux_8.8 +RUN yum install -y openpbs-debuginfo-*.rpm openpbs-server-*.rpm && yum clean all + # install python RUN curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ bash miniconda.sh -f -b -p /opt/anaconda && \ /opt/anaconda/bin/conda clean -tipy && \ rm -f miniconda.sh + # environment.yml file is copied by CI script. If manually building, you should copy it too from parent directory COPY environment.yml . RUN conda env create --file environment.yml diff --git a/ci/pbs/build.sh b/ci/pbs/build.sh deleted file mode 100644 index 11b55713..00000000 --- a/ci/pbs/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -cd /src/pbspro -./autogen.sh -./configure -prefix=/opt/pbs -make dist -mkdir /root/rpmbuild /root/rpmbuild/SOURCES /root/rpmbuild/SPECS -cp pbspro-*.tar.gz /root/rpmbuild/SOURCES -cp pbspro.spec /root/rpmbuild/SPECS -cp pbspro-rpmlintrc /root/rpmbuild/SOURCES -cd /root/rpmbuild/SPECS -rpmbuild -ba pbspro.spec diff --git a/ci/pbs/master-entrypoint.sh b/ci/pbs/master-entrypoint.sh index 7a2669cb..be710878 100644 --- a/ci/pbs/master-entrypoint.sh +++ b/ci/pbs/master-entrypoint.sh @@ -7,7 +7,7 @@ hostname=$(hostname) sed -i "s/PBS_SERVER=.*/PBS_SERVER=$hostname/" $pbs_conf_file sed -i "s/\$clienthost .*/\$clienthost $hostname/" $mom_conf_file -# start PBS Pro +# start openpbs /etc/init.d/pbs start # create default non-root user diff --git a/ci/pbs/slave-entrypoint.sh b/ci/pbs/slave-entrypoint.sh index b7239046..70d6ee22 100644 --- a/ci/pbs/slave-entrypoint.sh +++ b/ci/pbs/slave-entrypoint.sh @@ -16,7 +16,7 @@ sed -i "s/PBS_START_MOM=.*/PBS_START_MOM=1/" $pbs_conf_file echo "\$usecp *:/home/ /home/" >> $mom_conf_file echo "\$usecp *:/dask-jobqueue/ /tmp/" >> $mom_conf_file -# start PBS Pro +# start openpbs /etc/init.d/pbs start # create default non-root user