Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions osg-htc/nrp-provisioner/03_condor_sec.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enable authenticated SSL
# using OSG certificates
AUTH_SSL_SERVER_CADIR = /etc/grid-security/certificates
AUTH_SSL_CLIENT_CADIR = /etc/grid-security/certificates
52 changes: 52 additions & 0 deletions osg-htc/nrp-provisioner/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM rockylinux/rockylinux:10

# dependency needed by OSG
RUN dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled crb && \
yum clean all

# OSG RPMs
# osg-ca-certs must be recent enough for the current Let's Encrypt chains (YE1, ISRG Root YE)
RUN yum -y install https://repo.opensciencegrid.org/osg/25-main/osg-25-main-el10-release-latest.rpm && \
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \
yum -y install python3-pip less which && \
yum -y install osg-ca-certs condor python3-condor && \
yum clean all


RUN pip3 install --no-cache-dir kubernetes==37.0.1


# Tell condor to use osg-ca-certs
ADD 03_condor_sec.config /etc/condor/config.d/03_condor_sec.config

# configure python packages
ADD src /opt/provisioner/src

# Copy /etc/skel explicitly: when built under amd64 emulation (e.g. on an arm64 Mac), EL10's useradd
# leaves the home empty, and without ~/.bash_profile 'su -l' never reads the ~/.bashrc the setup scripts write
RUN useradd provisioner && cp -a /etc/skel/. /home/provisioner/ && chown -R provisioner: /home/provisioner && chown -R provisioner /opt/provisioner

RUN su provisioner -c '/usr/bin/ln -s /opt/provisioner/src /home/provisioner/src'

ADD provisioner_main.py /home/provisioner/provisioner_main.py
ADD provisioner_info.py /home/provisioner/provisioner_info.py
RUN chown provisioner /home/provisioner/provisioner_main.py; chmod a+x /home/provisioner/provisioner_info.py; chown provisioner /home/provisioner/provisioner_info.py

ADD setup_k8s_creds.sh /opt/provisioner/setup_k8s_creds.sh
ADD setup_htcondor_creds.sh /opt/provisioner/setup_htcondor_creds.sh
ADD provisioner_startup.sh /opt/provisioner/provisioner_startup.sh

#
# Requires env variables
# CONDOR_HOST
# K8S_NAMESPACE
# CVMFS_MOUNTS

#
# Optional env variable
# HTCONDOR_QUERY_INSECURE
#

CMD ["/opt/provisioner/provisioner_startup.sh"]

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2021, Igor Sfiligoi
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 changes: 21 additions & 0 deletions osg-htc/nrp-provisioner/LICENSES/MIT-prp-osg-pool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Igor Sfiligoi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading