Skip to content

Commit

Permalink
Make workspaces architecture agnostic (#21)
Browse files Browse the repository at this point in the history
* Fixed syntax error in link-git.sh

* Prepare workspaces for multiple architectures

---------

Co-authored-by: Marco Mambelli <[email protected]>
  • Loading branch information
BrunoCoimbra and mambelli authored Apr 1, 2024
1 parent e7b6c04 commit f228a4c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
9 changes: 5 additions & 4 deletions workspaces/factory-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ RUN ln -s /root/scripts/* /usr/local/bin

# Dowload HTCondor tarballs
# HTCondor 10.6.0 to test a more recent version on Alma9
# HTCondor 9.0.18 to test alsp hybrid configurations on EL7
# HTCondor 9.0.18 to test alsp hybrid configurations on EL7 (x86_64 only)
RUN pushd /var/lib/gwms-factory/condor ;\
wget https://research.cs.wisc.edu/htcondor/tarball/10/10.x/10.6.0/release/condor-10.6.0-x86_64_AlmaLinux9-stripped.tar.gz ;\
tar -xf condor-10.6.0-x86_64_AlmaLinux9-stripped.tar.gz ;\
rm -f condor-10.6.0-x86_64_AlmaLinux9-stripped.tar.gz ;\
wget https://research.cs.wisc.edu/htcondor/tarball/10/10.x/10.6.0/release/condor-10.6.0-$(arch)_AlmaLinux9-stripped.tar.gz ;\
tar -xf condor-10.6.0-$(arch)_AlmaLinux9-stripped.tar.gz ;\
rm -f condor-10.6.0-$(arch)_AlmaLinux9-stripped.tar.gz ;\
wget https://research.cs.wisc.edu/htcondor/tarball/9.0/9.0.18/release/condor-9.0.18-x86_64_CentOS7-stripped.tar.gz ;\
tar -xf condor-9.0.18-x86_64_CentOS7-stripped.tar.gz ;\
rm -f condor-9.0.18-x86_64_CentOS7-stripped.tar.gz ;\
popd

# Deploy GlideinWMS Factory and HTCondor configuration
COPY factory-workspace/config/glideinWMS.xml /etc/gwms-factory/glideinWMS.xml
RUN sed -i "s/\[ARCH\]/$(arch)/g" /etc/gwms-factory/glideinWMS.xml
RUN chown gfactory:gfactory /etc/gwms-factory/glideinWMS.xml
COPY shared/config/99-debug.conf /etc/condor/config.d/99-debug.conf
COPY shared/config/99-cafile.conf /etc/condor/config.d/99-cafile.conf
Expand Down
11 changes: 7 additions & 4 deletions workspaces/factory-workspace/config/glideinWMS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<attrs>
<attr name="GLIDEIN_Site" const="True" glidein_publish="True" job_publish="True" parameter="True" publish="True" type="string" value="ce-workspace.glideinwms.org"/>
<attr name="CONDOR_VERSION" const="False" glidein_publish="False" job_publish="False" parameter="True" publish="True" type="string" value="default"/>
<attr name="CONDOR_ARCH" const="False" glidein_publish="False" job_publish="False" parameter="True" publish="True" type="string" value="x86_64"/>
<attr name="CONDOR_ARCH" const="False" glidein_publish="False" job_publish="False" parameter="True" publish="True" type="string" value="[ARCH]"/>
<attr name="CONDOR_OS" const="False" glidein_publish="False" job_publish="False" parameter="True" publish="True" type="string" value="rhel9"/>
</attrs>
<files>
Expand Down Expand Up @@ -119,11 +119,14 @@
</entry>
</entries>
<condor_tarballs>
<condor_tarball arch="default" os="default" version="default" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-x86_64_AlmaLinux9-stripped"/>
<condor_tarball arch="x86_64" os="rhel9" version="default" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-x86_64_AlmaLinux9-stripped"/>
<condor_tarball arch="x86_64" os="rhel9" version="10.6.0" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-x86_64_AlmaLinux9-stripped"/>
<condor_tarball arch="default" os="default" version="default" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-[ARCH]_AlmaLinux9-stripped"/>
<condor_tarball arch="[ARCH]" os="rhel9" version="default" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-[ARCH]_AlmaLinux9-stripped"/>
<condor_tarball arch="[ARCH]" os="rhel9" version="10.6.0" base_dir="/var/lib/gwms-factory/condor/condor-10.6.0-1-[ARCH]_AlmaLinux9-stripped"/>
<!-- Uncomment the following lines to use enable HTCondor 9.0.18 for x86_64 RHEL7. WARNING: Incompatible with aarch64 -->
<!--
<condor_tarball arch="x86_64" os="rhel7" version="default" base_dir="/var/lib/gwms-factory/condor/condor-9.0.18-1-x86_64_CentOS7-stripped"/>
<condor_tarball arch="x86_64" os="rhel7" version="9.0.18" base_dir="/var/lib/gwms-factory/condor/condor-9.0.18-1-x86_64_CentOS7-stripped"/>
-->
</condor_tarballs>
<files>
</files>
Expand Down
4 changes: 2 additions & 2 deletions workspaces/gwms-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Selecting AlmaLinux 9 as the base OS
FROM almalinux:9
MAINTAINER Marco Mambelli "[email protected]"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL name="Base workspace with EL9, OSG 3.6 and base packages required by GlideinWMS and HEPCloud"

# Installing some base packages, the CRB repo, needed by swig, and the EPEL (epel-release) and OSG repos
Expand All @@ -23,7 +23,7 @@ RUN dnf install -y wget sed git yum-utils ;\
/bin/sed -i '/^enabled=1/a priority=99' /etc/yum.repos.d/epel.repo ;\
dnf install -y https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el9-release-latest.rpm ;\
sed -i 's/\$basearch/x86_64/g' /etc/yum.repos.d/osg*
# TODO: remove the sed command above when OSG supports arm64
# TODO: remove the sed command above when OSG supports aarch64

# Installing some system management RPMs/sw needed for containers (these are not needed for VMs)
RUN dnf install -y cronie supervisor initscripts;\
Expand Down
6 changes: 3 additions & 3 deletions workspaces/shared/scripts/link-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ if [[ -L /usr/lib/python${PYVER}/site-packages/glideinwms ]]; then
fi

# mv to *_rpm instead of rm -rf
[[ -n "$VERBOSE" ]] echo "Linking GlideinWMS library to repository in $GWMS_SRC_DIR" || true
[[ -n "$VERBOSE" ]] && echo "Linking GlideinWMS library to repository in $GWMS_SRC_DIR" || true
mv /usr/lib/python${PYVER}/site-packages/glideinwms /usr/lib/python${PYVER}/site-packages/glideinwms_rpm
ln -s "$GWMS_SRC_DIR" /usr/lib/python${PYVER}/site-packages/glideinwms
if [[ -n "$IS_FACTORY" ]]; then
[[ -n "$VERBOSE" ]] echo "Linking Factory components to Git" || true
[[ -n "$VERBOSE" ]] && echo "Linking Factory components to Git" || true
mv /var/lib/gwms-factory/creation /var/lib/gwms-factory/creation_rpm
mv /var/lib/gwms-factory/web-base /var/lib/gwms-factory/web-base_rpm
ln -s "$GWMS_SRC_DIR"/creation /var/lib/gwms-factory/creation
ln -s "$GWMS_SRC_DIR"/creation/web_base /var/lib/gwms-factory/web-base
fi
if [[ -n "$IS_FRONTEND" ]]; then
[[ -n "$VERBOSE" ]] echo "Linking Frontend components to Git" || true
[[ -n "$VERBOSE" ]] && echo "Linking Frontend components to Git" || true
mv /var/lib/gwms-frontend/creation /var/lib/gwms-frontend/creation_rpm
mv /var/lib/gwms-frontend/web-base /var/lib/gwms-frontend/web-base_rpm
ln -s "$GWMS_SRC_DIR"/creation /var/lib/gwms-frontend/creation
Expand Down

0 comments on commit f228a4c

Please sign in to comment.