Commit 41c5a2fb authored by Fabio Luchetti's avatar Fabio Luchetti
Browse files

Set ofs.tpc to /opt/eos/xrootd/bin/xrdcp; Merge multiple 'RUN' commands to...

Set ofs.tpc to /opt/eos/xrootd/bin/xrdcp; Merge multiple 'RUN' commands to slim more images size; Replace 'ADD' with 'COPY' as per best practices
parent aa05cb0f
Pipeline #1510554 skipped with stage
#
# Simple EOS Docker file
#
# Version 0.2
# Version 0.3
FROM centos:7
MAINTAINER Elvin Sindrilaru, esindril@cern.ch, CERN 2017
LABEL maintainer="Elvin Sindrilaru, esindril@cern.ch, CERN 2017"
# Add extra repositories
ADD eos-docker/el-7/*.repo /etc/yum.repos.d/
COPY eos-docker/el-7/*.repo /etc/yum.repos.d/
# Add helper scripts
ADD eos-docker/image_scripts/*.sh /
COPY eos-docker/image_scripts/*.sh /
# Add configuration files for EOS instance
ADD eos-docker/eos.sysconfig /etc/sysconfig/eos
ADD eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
ADD eos-docker/fuse.conf /etc/eos/fuse.mount-1.conf
ADD eos-docker/fuse.conf /etc/eos/fuse.mount-2.conf
ADD eos-docker/fstfmd.dict /var/eos/md/
COPY eos-docker/eos.sysconfig /etc/sysconfig/eos
COPY eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
COPY eos-docker/fuse.conf /etc/eos/fuse.mount-1.conf
COPY eos-docker/fuse.conf /etc/eos/fuse.mount-2.conf
COPY eos-docker/fstfmd.dict /var/eos/md/
# Add configuration files for forwarding proxy server
ADD eos-docker/xrootd.conf /etc/tmpfiles.d/
ADD eos-docker/xrootd-fwd-proxy.cfg /etc/xrootd/
COPY eos-docker/xrootd.conf /etc/tmpfiles.d/
COPY eos-docker/xrootd-fwd-proxy.cfg /etc/xrootd/
RUN mkdir /var/tmp/eosxd-cache/ /var/tmp/eosxd-journal/
RUN useradd eos-user
......@@ -44,12 +44,11 @@ ENV EOSREPODIR="/repo/eos"
ADD cc7_artifacts ${EOSREPODIR}
# Special packages, must be installed un-cached.
RUN createrepo ${EOSREPODIR}; \
echo -e "[eos-artifacts]\nname=EOS artifacts\nbaseurl=file://${EOSREPODIR}\ngpgcheck=0\nenabled=1\npriority=1" >> /etc/yum.repos.d/eos.repo; \
yum -y --nogpg install quarkdb grid-hammer davix; \
yum -y --nogpg install \
eos-server eos-testkeytab eos-archive eos-client \
eos-debuginfo eos-fuse eos-fusex eos-test eos-ns-inspect \
RUN createrepo ${EOSREPODIR} \
&& echo -e "[eos-artifacts]\nname=EOS artifacts\nbaseurl=file://${EOSREPODIR}\ngpgcheck=0\nenabled=1\npriority=1" >> /etc/yum.repos.d/eos.repo \
&& yum -y --nogpg install \
quarkdb grid-hammer davix \
eos-server eos-testkeytab eos-archive eos-client eos-debuginfo eos-fuse eos-fusex eos-test eos-ns-inspect \
&& yum clean all
# *************
......@@ -60,20 +59,17 @@ RUN createrepo ${EOSREPODIR}; \
# as dependency the xrdcp program is in /opt/eos/xrootd/bin/xrdcp and the
# xrootd-client package is no longer installed and therefore starting the FSTs
# fails. This only happens on CC7.
RUN yum install -y --nogpg install xrootd-client
# RUN yum install -y --nogpg install xrootd-client
# Generate a new forwardable keytab 'eos-test+' to replace the not-forwardable
# one (installed by the eos-testkeytab package).
# This is useful to deploy EOS on Kubernetes clusters running on CERN's Cloud
# Infrastructure; you can remove these lines if you don't need one.
RUN yes | xrdsssadmin -k eos-test del /etc/eos.keytab; \
yes | xrdsssadmin -u daemon -g daemon -k eos-test+ -n 1234567890123456789 add /etc/eos.keytab
# Setup keytab permissions
RUN chown daemon:daemon /etc/eos.keytab; \
chmod 400 /etc/eos.keytab
RUN yes | xrdsssadmin -k eos-test del /etc/eos.keytab \
&& yes | xrdsssadmin -u daemon -g daemon -k eos-test+ -n 1234567890123456789 add /etc/eos.keytab \
&& chown daemon:daemon /etc/eos.keytab \
&& chmod 400 /etc/eos.keytab \
# Change owner of /var/spool/xrootd directory to daemon
RUN chown daemon:daemon /var/spool/xrootd
&& chown daemon:daemon /var/spool/xrootd
ENTRYPOINT ["/bin/bash"]
......@@ -20,7 +20,9 @@ ADD eos-docker/fstfmd.dict /var/eos/md/
RUN mkdir /var/tmp/eosxd-cache/ /var/tmp/eosxd-journal/
RUN useradd eos-user
#ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get install -y software-properties-common
RUN apt-get install -y --no-install-recommends apt-utils
RUN apt-get install -y build-essential git gdebi-core \
......@@ -51,4 +53,6 @@ RUN apt-get install -y eos-client eos-fuse eos-fusex eos-test eos-testkeytab
RUN chown daemon:daemon /etc/eos.keytab; \
chmod 400 /etc/eos.keytab
ENV DEBIAN_FRONTEND default
ENTRYPOINT ["/bin/bash"]
......@@ -16,7 +16,8 @@ all.manager localhost 2131
xrd.port 1095
ofs.persist off
ofs.osslib libEosFstOss.so
ofs.tpc pgm /usr/bin/xrdcp
#ofs.tpc pgm /usr/bin/xrdcp
ofs.tpc pgm /opt/eos/xrootd/bin/xrdcp
###########################################################
# this URL can be overwritten by EOS_BROKER_URL defined /etc/sysconfig/xrd
fstofs.broker root://eos-mq.eoscluster.cern.ch:1097//eos/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment