-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts for running tests based on docker containers
- Loading branch information
Showing
13 changed files
with
429 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ config.status | |
config.sub | ||
configure | ||
depcomp | ||
docker/data | ||
docker/xrootd.tar.gz | ||
install-sh | ||
lib/ | ||
libtool | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM almalinux:8 | ||
|
||
# Install tools necessary for RPM development | ||
RUN dnf install -y rpm-build rpmdevtools dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled powertools | ||
|
||
# Create directory tree for building RPMs | ||
RUN rpmdev-setuptree | ||
|
||
WORKDIR /root | ||
|
||
# XRootD source tarball must be created in the | ||
# current directory in order to build this image | ||
COPY xrootd.tar.gz rpmbuild/SOURCES | ||
|
||
# Extract spec file to build RPMs | ||
RUN tar xzf rpmbuild/SOURCES/xrootd.tar.gz --strip-components=1 xrootd/xrootd.spec | ||
|
||
# Install build dependencies with dnf | ||
RUN dnf builddep -y -D 'dist .el8' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Build RPMS for XRootD | ||
RUN rpmbuild -bb -D 'dist .el8' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Second stage, build test image | ||
FROM almalinux:8 | ||
|
||
COPY --from=0 /root/rpmbuild/RPMS/* /tmp/ | ||
|
||
# Install RPMS for XRootD and cleanup unneeded files | ||
RUN rm /tmp/*-{devel,doc}* \ | ||
&& dnf install -y dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled powertools \ | ||
&& dnf install -y /tmp/*.rpm \ | ||
&& dnf autoremove -y \ | ||
&& rm -rf /tmp/* | ||
|
||
# Copy configuration files | ||
COPY config/*.cfg /etc/xrootd/ | ||
COPY scripts/setup.sh /bin/setup.sh | ||
|
||
CMD [ "/sbin/init" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM almalinux:9 | ||
|
||
# Install tools necessary for RPM development | ||
RUN dnf install -y rpm-build rpmdevtools dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled crb | ||
|
||
# Create directory tree for building RPMs | ||
RUN rpmdev-setuptree | ||
|
||
WORKDIR /root | ||
|
||
# XRootD source tarball must be created in the | ||
# current directory in order to build this image | ||
COPY xrootd.tar.gz rpmbuild/SOURCES | ||
|
||
# Extract spec file to build RPMs | ||
RUN tar xzf rpmbuild/SOURCES/xrootd.tar.gz --strip-components=1 xrootd/xrootd.spec | ||
|
||
# Install build dependencies with dnf | ||
RUN dnf builddep -y -D 'dist .el9' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Build RPMS for XRootD | ||
RUN rpmbuild -bb -D 'dist .el9' --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Second stage, build test image | ||
FROM almalinux:9 | ||
|
||
COPY --from=0 /root/rpmbuild/RPMS/* /tmp/ | ||
|
||
# Install RPMS for XRootD and cleanup unneeded files | ||
RUN rm /tmp/*-{devel,doc}* \ | ||
&& dnf install -y dnf-plugins-core epel-release \ | ||
&& dnf config-manager --set-enabled crb \ | ||
&& dnf install -y /tmp/*.rpm \ | ||
&& dnf autoremove -y \ | ||
&& rm -rf /tmp/* | ||
|
||
# Copy configuration files | ||
COPY config/*.cfg /etc/xrootd/ | ||
COPY scripts/setup.sh /bin/setup.sh | ||
|
||
CMD [ "/sbin/init" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM cern/cc7-base | ||
|
||
# Install tools necessary for RPM development | ||
RUN yum install -y rpm-build rpmdevtools yum-utils | ||
|
||
# Create directory tree for building RPMs | ||
RUN rpmdev-setuptree | ||
|
||
WORKDIR /root | ||
|
||
# XRootD source tarball must be created in the | ||
# current directory in order to build this image | ||
COPY xrootd.tar.gz rpmbuild/SOURCES | ||
|
||
# Extract spec file to build RPMs | ||
RUN tar xzf rpmbuild/SOURCES/xrootd.tar.gz --strip-components=1 xrootd/xrootd.spec | ||
|
||
# Install build dependencies with yum | ||
RUN yum-builddep -y --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Build RPMS for XRootD | ||
RUN rpmbuild -bb --define '_with_isal 1' --define '_with_python3 1' \ | ||
--define '_with_scitokens 1' --define '_with_tests 1' --define '_with_xrdclhttp 1' \ | ||
--define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' xrootd.spec | ||
|
||
# Second stage, build test image | ||
FROM cern/cc7-base | ||
|
||
COPY --from=0 /root/rpmbuild/RPMS/* /tmp/ | ||
|
||
# Install RPMS for XRootD and cleanup unneeded files | ||
RUN rm /tmp/*-{devel,doc}* \ | ||
&& yum install -y wget /tmp/*.rpm \ | ||
&& yum autoremove -y \ | ||
&& rm -rf /tmp/* | ||
|
||
# Copy configuration files | ||
COPY config/*.cfg /etc/xrootd/ | ||
COPY scripts/setup.sh /bin/setup.sh | ||
|
||
CMD [ "/sbin/init" ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
all.export /data | ||
cms.delay startup 10 | ||
cms.space linger 0 recalc 15 min 2% 1g 5% 2g | ||
|
||
xrootd.diglib * /etc/xrootd/dbgauth | ||
|
||
ofs.ckslib zcrc32 /usr/lib64/libXrdCksCalczcrc32.so | ||
xrootd.chksum zcrc32 | ||
|
||
all.adminpath /var/spool/xrootd | ||
all.pidpath /run/xrootd | ||
|
||
xrd.port 1094 if exec xrootd | ||
xrd.port 2094 if exec cmsd | ||
|
||
if metaman+ | ||
all.role meta manager | ||
all.manager meta metaman 2094 | ||
|
||
else if man1+ | ||
all.role manager | ||
all.manager meta metaman 2094 | ||
all.manager man1 2094 | ||
|
||
else if man2+ | ||
all.role manager | ||
all.manager meta metaman 2094 | ||
all.manager man2 2094 | ||
|
||
else if srv1+ | ||
all.role server | ||
all.manager man1 2094 | ||
ofs.tpc ttl 60 60 xfr 9 pgm /usr/bin/xrdcp --server | ||
ofs.chkpnt enable | ||
|
||
else if srv2+ | ||
all.role server | ||
all.manager man1 2094 | ||
ofs.tpc ttl 60 60 xfr 9 pgm /usr/bin/xrdcp --server | ||
ofs.chkpnt enable | ||
|
||
else if srv3+ | ||
all.role server | ||
all.manager man2 2094 | ||
ofs.tpc ttl 60 60 xfr 9 pgm /usr/bin/xrdcp --server | ||
ofs.chkpnt enable | ||
|
||
else if srv4+ | ||
all.role server | ||
all.manager man2 2094 | ||
ofs.tpc ttl 60 60 xfr 9 pgm /usr/bin/xrdcp --server | ||
ofs.chkpnt enable | ||
fi | ||
|
||
if defined ?~TEST_SIGNING | ||
xrootd.seclib /usr/lib64/libXrdSec-4.so | ||
sec.protocol unix | ||
sec.level compatible force | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
all.export /data | ||
all.adminpath /var/spool/xrootd | ||
all.pidpath /var/run/xrootd | ||
xrd.port 1099 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
|
||
# set the TEST_SIGNING | ||
export TEST_SIGNING=1 | ||
|
||
if [[ ${HOSTNAME} = 'metaman' ]] ; then | ||
# download the a test file for upload tests | ||
mkdir -p /data | ||
cp /downloads/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat /data/testFile.dat | ||
chown -R xrootd:xrootd /data | ||
fi | ||
|
||
# the data nodes | ||
datanodes=('srv1' 'srv2' 'srv3' 'srv4') | ||
|
||
# create 'bigdir' in each of the data nodes | ||
if [[ ${datanodes[*]} =~ ${HOSTNAME} ]] ; then | ||
mkdir -p /data/bigdir | ||
cd /data/bigdir | ||
for i in `seq 10000`; do touch `uuidgen`.dat; done | ||
cd - >/dev/null | ||
fi | ||
|
||
# download the test files for 'srv1' | ||
if [[ ${HOSTNAME} = 'srv1' ]] ; then | ||
cp /downloads/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat /data | ||
cp /downloads/b3d40b3f-1d15-4ad3-8cb5-a7516acb2bab.dat /data | ||
cp /downloads/b74d025e-06d6-43e8-91e1-a862feb03c84.dat /data | ||
cp /downloads/cb4aacf1-6f28-42f2-b68a-90a73460f424.dat /data | ||
cp /downloads/cef4d954-936f-4945-ae49-60ec715b986e.dat /data | ||
mkdir /data/metalink | ||
cp /downloads/input*.meta* /data/metalink/ | ||
cp /downloads/ml*.meta* /data/metalink/ | ||
fi | ||
|
||
# download the test files for 'srv2' and add another instance on 1099 | ||
if [[ ${HOSTNAME} = 'srv2' ]] ; then | ||
cp /downloads/1db882c8-8cd6-4df1-941f-ce669bad3458.dat /data | ||
cp /downloads/3c9a9dd8-bc75-422c-b12c-f00604486cc1.dat /data | ||
cp /downloads/7235b5d1-cede-4700-a8f9-596506b4cc38.dat /data | ||
cp /downloads/7e480547-fe1a-4eaf-a210-0f3927751a43.dat /data | ||
cp /downloads/89120cec-5244-444c-9313-703e4bee72de.dat /data | ||
fi | ||
|
||
# download the test files for 'srv3' | ||
if [[ ${HOSTNAME} = 'srv3' ]] ; then | ||
cp /downloads/1db882c8-8cd6-4df1-941f-ce669bad3458.dat /data | ||
cp /downloads/3c9a9dd8-bc75-422c-b12c-f00604486cc1.dat /data | ||
cp /downloads/89120cec-5244-444c-9313-703e4bee72de.dat /data | ||
cp /downloads/b74d025e-06d6-43e8-91e1-a862feb03c84.dat /data | ||
cp /downloads/cef4d954-936f-4945-ae49-60ec715b986e.dat /data | ||
fi | ||
|
||
# download the test files for 'srv4' | ||
if [[ ${HOSTNAME} = 'srv4' ]] ; then | ||
cp /downloads/1db882c8-8cd6-4df1-941f-ce669bad3458.dat /data | ||
cp /downloads/7e480547-fe1a-4eaf-a210-0f3927751a43.dat /data | ||
cp /downloads/89120cec-5244-444c-9313-703e4bee72de.dat /data | ||
cp /downloads/b74d025e-06d6-43e8-91e1-a862feb03c84.dat /data | ||
cp /downloads/cef4d954-936f-4945-ae49-60ec715b986e.dat /data | ||
cp /downloads/data.zip /data | ||
cp /downloads/large.zip /data | ||
fi | ||
|
||
# make sure the test files and directories are owned by 'xrootd' user | ||
if [[ ${datanodes[*]} =~ ${HOSTNAME} ]] ; then | ||
chown -R xrootd:xrootd /data | ||
fi |
Oops, something went wrong.