121121yum install -y "${package_urls[@]}"
122122EOT
123123
124- # Koji won't have the xrootd-multiuser package, so that still gets installed from the OSG repos
125- RUN yum install -y --enablerepo=osg-testing xrootd-multiuser
126124# #######################
127125# End Dependency Build #
128126# #######################
@@ -133,51 +131,18 @@ RUN yum install -y --enablerepo=osg-testing xrootd-multiuser
133131FROM dependency-build AS xrootd-plugin-builder
134132# Install necessary build dependencies
135133RUN yum install -y --enablerepo=osg-testing curl-devel openssl-devel git cmake3 gcc-c++ sqlite-devel
136- ARG XROOTD_VERSION
137- ARG XROOTD_ARCH
138- ARG XROOTD_RELEASE
139- ARG KOJIHUB_BASE_URL
140-
141- ENV PACKAGES="xrootd-devel xrootd-server-devel xrootd-client-devel"
142- RUN <<EOT
143- set -ex
144- package_urls=()
145- for package in $PACKAGES; do
146- package_urls+=(${KOJIHUB_BASE_URL}/${XROOTD_ARCH}/${package}-${XROOTD_VERSION}-${XROOTD_RELEASE}.${XROOTD_ARCH}.rpm)
147- done
148-
149- yum install -y "${package_urls[@]}"
150- EOT
151-
152- # Install xrdcl-pelican plugin
153- RUN \
154- yum install -y --enablerepo=osg-testing xrdcl-pelican
155134
156135# The ADD command with a api.github.com URL in the next couple of sections
157136# are for cache-hashing of the external repository that we rely on to build
158137# the image
159- ENV XROOTD_S3_HTTP_VERSION="v0.1.8" \
160- JSON_VERSION="v3.11.3" \
138+ ENV JSON_VERSION="v3.11.3" \
161139 JSON_SCHEMA_VALIDATOR_VERSION="2.3.0" \
162140 LOTMAN_VERSION="v0.0.4"
163141
164- ADD https://api.github.com/repos/PelicanPlatform/xrootd-s3-http/git/refs/tags/${XROOTD_S3_HTTP_VERSION} /tmp/hash-xrootd-s3-http
165142ADD https://api.github.com/repos/nlohmann/json/git/refs/tags/${JSON_VERSION} /tmp/hash-json
166143ADD https://api.github.com/repos/pboettch/json-schema-validator/git/refs/tags/${JSON_SCHEMA_VALIDATOR_VERSION} /tmp/hash-json
167144ADD https://api.github.com/repos/PelicanPlatform/lotman/git/refs/tags/${LOTMAN_VERSION} /tmp/hash-json
168145
169- # Install the S3 and HTTP server plugins for XRootD. For now we do this from source
170- # until we can sort out the RPMs.
171- # Ping the http plugin at a specific commit
172- RUN \
173- git clone https://github.com/PelicanPlatform/xrootd-s3-http.git && \
174- cd xrootd-s3-http && \
175- git checkout ${XROOTD_S3_HTTP_VERSION} && \
176- git submodule update --init --recursive && \
177- mkdir build && cd build && \
178- cmake -DLIB_INSTALL_DIR=/usr/lib64 .. && \
179- make install
180-
181146# LotMan Installation
182147# First install dependencies
183148RUN git clone https://github.com/nlohmann/json.git && \
@@ -192,8 +157,7 @@ RUN git clone https://github.com/pboettch/json-schema-validator.git && \
192157 mkdir build && cd build && \
193158 cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/usr .. && \
194159 make -j`nproc` install
195- # Finally LotMan proper. For now we do this from source until we can sort out the RPMs.
196- # Ping LotMan at a specific commit
160+ # Finally LotMan proper. For now we do this from source until we can sort out the RPMs.
197161RUN \
198162 git clone https://github.com/PelicanPlatform/lotman.git && \
199163 cd lotman && \
@@ -212,10 +176,11 @@ RUN \
212176FROM dependency-build AS final-stage
213177
214178# Any other yum-installable dependencies that need to be present in the final container
215- # should go here. Installation in a previous section will result in the packages being
179+ # should go here. Installation in a previous section may result in the packages being
216180# installed only in the intermediate builder containers!
217- RUN yum install -y --enablerepo=osg-testing sssd-client
181+ RUN yum install -y --enablerepo=osg-testing sssd-client xrdcl-pelican xrootd-multiuser
218182RUN yum install -y --enablerepo=osg-contrib xrootd-lotman
183+ RUN yum install -y --enablerepo=epel-testing xrootd-s3-http
219184
220185WORKDIR /pelican
221186
@@ -276,15 +241,11 @@ ENV JAVA_HOME=/usr/lib/jvm/jre \
276241 QDL_HOME="/opt/qdl" \
277242 PATH="${ST_HOME}/bin:${QDL_HOME}/bin:${PATH}"
278243
279- # Copy xrdcl-pelican plugin config
280- COPY --from=xrootd-plugin-builder /etc/xrootd/client.plugins.d/pelican-plugin.conf /etc/xrootd/client.plugins.d/pelican-plugin.conf
281244# Remove http plugin to use pelican plugin
282245RUN rm -f /etc/xrootd/client.plugins.d/xrdcl-http-plugin.conf
283246
284- # Copy built s3 plugin library and xrdcl-pelican plugin library from build
285- COPY --from=xrootd-plugin-builder /usr/lib64/libXrdS3-5.so /usr/lib64/libXrdHTTPServer-5.so /usr/lib64/libXrdClPelican-5.so \
286- /usr/lib64/libLotMan.so /usr/lib64/
287-
247+ # Copy plugins built from the xrootd-plugin-builder stage
248+ COPY --from=xrootd-plugin-builder /usr/lib64/libLotMan.so /usr/lib64/
288249# Copy the nlohmann json headers
289250COPY --from=xrootd-plugin-builder /usr/include/nlohmann /usr/include/nlohmann
290251# Copy the JSON schema validator library
0 commit comments