From 1583acec223c220808e18fe1fdbde6c5566bba68 Mon Sep 17 00:00:00 2001 From: Justin Hiemstra Date: Fri, 1 Dec 2023 19:36:43 +0000 Subject: [PATCH 1/2] Add cache supervisord process --- images/Dockerfile | 5 ++-- images/supervisord/pelican_cache_serve.conf | 28 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 images/supervisord/pelican_cache_serve.conf diff --git a/images/Dockerfile b/images/Dockerfile index 1f08bb1d5..34cdfcc6f 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -47,9 +47,10 @@ RUN useradd -o -u 10940 -g 10940 -s /bin/sh xrootd # Install dependencies RUN yum -y update \ - && yum -y install xrootd xrootd-client xrdcl-http xrootd-server \ + && yum -y install xrootd xrootd-client xrdcl-http xrootd-server xrootd-scitokens xrootd-voms \ + xrootd-devel xrootd-client-devel xrootd-server-devel \ + curl-devel git cmake3 gcc-c++ openssl-devel java-17-openjdk-headless \ && yum clean all \ - && yum install -y curl java-17-openjdk-headless \ && rm -rf /var/cache/yum/ WORKDIR /pelican diff --git a/images/supervisord/pelican_cache_serve.conf b/images/supervisord/pelican_cache_serve.conf new file mode 100644 index 000000000..8084aae49 --- /dev/null +++ b/images/supervisord/pelican_cache_serve.conf @@ -0,0 +1,28 @@ + +# +# Copyright (C) 2023, Pelican Project, Morgridge Institute for Research +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You may +# obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +[program:pelican_origin_serve] +command=/pelican/osdf-client cache serve %(ENV_OSDF_CACHE_ARGS)s +autostart=false +autorestart=true +redirect_stderr=true +# We can run the cache with all args configured via our pelican.yaml +# or via individual environment variables, so this environment variable +# need not be populated. However, if we don't give it at least an empty +# var, supervisord won't expand it and there will be an error. Set the +# default to empty. +environment=OSDF_CACHE_ARGS="" From 693e7f520d8e7d69e959a75ae0c5e1c988a23c19 Mon Sep 17 00:00:00 2001 From: Justin Hiemstra Date: Fri, 1 Dec 2023 20:28:45 +0000 Subject: [PATCH 2/2] Fix process name --- images/supervisord/pelican_cache_serve.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/supervisord/pelican_cache_serve.conf b/images/supervisord/pelican_cache_serve.conf index 8084aae49..b74cbcc93 100644 --- a/images/supervisord/pelican_cache_serve.conf +++ b/images/supervisord/pelican_cache_serve.conf @@ -15,7 +15,7 @@ # limitations under the License. # -[program:pelican_origin_serve] +[program:pelican_cache_serve] command=/pelican/osdf-client cache serve %(ENV_OSDF_CACHE_ARGS)s autostart=false autorestart=true