Skip to content
Snippets Groups Projects
Commit b9d1c14c authored by Guido Sterbini's avatar Guido Sterbini
Browse files

Working example with eos

parent 036fc33b
No related branches found
No related tags found
No related merge requests found
Showing
with 60 additions and 19 deletions
......@@ -19,6 +19,10 @@ RUN apt-get -qq update \
# https://cern.service-now.com/service-portal?id=kb_article&n=KB0006614
###############################################################################
COPY etc/eos /etc/eos
COPY krb5.conf /etc/krb5.conf
COPY create_eos_folders.sh /root/create_eos_folders.sh
RUN echo "deb [arch=$(dpkg --print-architecture)] \
http://storage-ci.web.cern.ch/storage-ci/debian/xrootd/ \
$(lsb_release -cs) release" \
......@@ -36,25 +40,26 @@ RUN echo "deb [arch=$(dpkg --print-architecture)] \
&& apt-get -qq update \
&& apt-get -yqq install eos-client eos-fusex \
&& apt-get -yqq clean \
&& mkdir /etc/eos \
&& chmod 0755 /root/create_eos_folders.sh \
&& /root/create_eos_folders.sh
# we can prepare the files and then ADD them directly
&& echo '{"name":"home-a","hostport":"eoshome-a.cern.ch",\
"remotemountdir":"/eos/user/a/","localmountdir":"/eos/user/a/"}' > \
/etc/eos/fuse.home-a.conf \
&& echo '{"name":"home-e","hostport":"eoshome-e.cern.ch", \
"remotemountdir":"/eos/user/e/","localmountdir":"/eos/user/e/"}' > \
/etc/eos/fuse.home-e.conf \
&& echo '{"name":"home-s","hostport":"eoshome-s.cern.ch", \
"remotemountdir":"/eos/user/s/","localmountdir":"/eos/user/s/"}' > \
/etc/eos/fuse.home-s.conf \
&& mkdir -p /eos/user/a \
&& mkdir -p /eos/user/e \
&& mkdir -p /eos/user/s \
&& echo '{"name":"project-l","hostport":"eosproject-l.cern.ch",\
"remotemountdir":"/eos/project/l/","localmountdir":"/eos/project/l/"}' > \
/etc/eos/fuse.project-l.conf \
&& mkdir -p /eos/project/l
ADD krb5.conf /etc/krb5.conf
#&& echo '{"name":"home-a","hostport":"eoshome-a.cern.ch",\
# "remotemountdir":"/eos/user/a/","localmountdir":"/eos/user/a/"}' > \
# /etc/eos/fuse.home-a.conf \
#&& echo '{"name":"home-e","hostport":"eoshome-e.cern.ch", \
# "remotemountdir":"/eos/user/e/","localmountdir":"/eos/user/e/"}' > \
# /etc/eos/fuse.home-e.conf \
#&& echo '{"name":"home-s","hostport":"eoshome-s.cern.ch", \
# "remotemountdir":"/eos/user/s/","localmountdir":"/eos/user/s/"}' > \
# /etc/eos/fuse.home-s.conf \
#&& mkdir -p /eos/user/a \
#&& mkdir -p /eos/user/e \
#& mkdir -p /eos/user/s \
#&& echo '{"name":"project-l","hostport":"eosproject-l.cern.ch",\
# "remotemountdir":"/eos/project/l/","localmountdir":"/eos/project/l/"}' > \
# /etc/eos/fuse.project-l.conf \
#&& mkdir -p /eos/project/l
# Installing AFS in the docker (not working)
# the main problem is related I think to docker
......@@ -76,7 +81,7 @@ RUN apt-get -qq update \
&& apt-get -yqq install x11-apps sudo wget git tmux vim meld openssh-server\
&& apt-get -yqq clean
# ADD start.sh /root/start.sh
# COPY start.sh /root/start.sh
# RUN chmod 0755 /root/start.sh \
# && /root/start.sh
......@@ -190,4 +195,5 @@ RUN conda activate $ENV_PREFIX && \
USER $USER
CMD ["/bin/bash" ]
#docker build . -t sterbini/test
#docker run -it -u 0 -v /afs:/afs -v $PWD:/home/abpuser/local_host_folder --rm --cap-add SYS_ADMIN --device /dev/fuse sterbini/test
import string
for ii in list(string.ascii_lowercase):
with open(f"tmp/fuse.home-{ii}.conf", "w") as text_file:
text_file.write('{'+f'"name":"home-{ii}",' + \
f'"hostport":"eoshome-{ii}.cern.ch",'+ \
f'"remotemountdir":"/eos/user/{ii}/",'+ \
f'"localmountdir":"/eos/user/{ii}/"' +'}')
with open(f"tmp/fuse.project-{ii}.conf", "w") as text_file:
text_file.write('{'+f'"name":"project-{ii}",' + \
f'"hostport":"eosproject-{ii}.cern.ch",'+ \
f'"remotemountdir":"/eos/project/{ii}/",'+ \
f'"localmountdir":"/eos/project/{ii}/"' +'}')
#!/bin/sh
for letter in a b c d e f g h i j k l m n o p q r s t u v w x y z
do
mkdir -p /eos/user/$letter
mkdir -p /eos/project/$letter
done
{"name":"home-a","hostport":"eoshome-a.cern.ch","remotemountdir":"/eos/user/a/","localmountdir":"/eos/user/a/"}
\ No newline at end of file
{"name":"home-b","hostport":"eoshome-b.cern.ch","remotemountdir":"/eos/user/b/","localmountdir":"/eos/user/b/"}
\ No newline at end of file
{"name":"home-c","hostport":"eoshome-c.cern.ch","remotemountdir":"/eos/user/c/","localmountdir":"/eos/user/c/"}
\ No newline at end of file
{"name":"home-d","hostport":"eoshome-d.cern.ch","remotemountdir":"/eos/user/d/","localmountdir":"/eos/user/d/"}
\ No newline at end of file
{"name":"home-e","hostport":"eoshome-e.cern.ch","remotemountdir":"/eos/user/e/","localmountdir":"/eos/user/e/"}
\ No newline at end of file
{"name":"home-f","hostport":"eoshome-f.cern.ch","remotemountdir":"/eos/user/f/","localmountdir":"/eos/user/f/"}
\ No newline at end of file
{"name":"home-g","hostport":"eoshome-g.cern.ch","remotemountdir":"/eos/user/g/","localmountdir":"/eos/user/g/"}
\ No newline at end of file
{"name":"home-h","hostport":"eoshome-h.cern.ch","remotemountdir":"/eos/user/h/","localmountdir":"/eos/user/h/"}
\ No newline at end of file
{"name":"home-i","hostport":"eoshome-i.cern.ch","remotemountdir":"/eos/user/i/","localmountdir":"/eos/user/i/"}
\ No newline at end of file
{"name":"home-j","hostport":"eoshome-j.cern.ch","remotemountdir":"/eos/user/j/","localmountdir":"/eos/user/j/"}
\ No newline at end of file
{"name":"home-k","hostport":"eoshome-k.cern.ch","remotemountdir":"/eos/user/k/","localmountdir":"/eos/user/k/"}
\ No newline at end of file
{"name":"home-l","hostport":"eoshome-l.cern.ch","remotemountdir":"/eos/user/l/","localmountdir":"/eos/user/l/"}
\ No newline at end of file
{"name":"home-m","hostport":"eoshome-m.cern.ch","remotemountdir":"/eos/user/m/","localmountdir":"/eos/user/m/"}
\ No newline at end of file
{"name":"home-n","hostport":"eoshome-n.cern.ch","remotemountdir":"/eos/user/n/","localmountdir":"/eos/user/n/"}
\ No newline at end of file
{"name":"home-o","hostport":"eoshome-o.cern.ch","remotemountdir":"/eos/user/o/","localmountdir":"/eos/user/o/"}
\ No newline at end of file
{"name":"home-p","hostport":"eoshome-p.cern.ch","remotemountdir":"/eos/user/p/","localmountdir":"/eos/user/p/"}
\ No newline at end of file
{"name":"home-q","hostport":"eoshome-q.cern.ch","remotemountdir":"/eos/user/q/","localmountdir":"/eos/user/q/"}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment