Skip to content
Snippets Groups Projects
Commit d5ecdbda authored by Martin Vala's avatar Martin Vala
Browse files

Cleanup of alice useless stuf

parent 0826e836
Branches
No related tags found
1 merge request!8Resolve "Add nss-pam-ldapd authconfig to docker eos-prod"
Pipeline #
[mvala-eos-docker-utils]
name=Copr repo for eos-docker-utils owned by mvala
baseurl=https://copr-be.cloud.fedoraproject.org/results/mvala/eos-docker-utils/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/mvala/eos-docker-utils/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
\ No newline at end of file
#
# BASE EOS Docker file (installation only)
#
# BUILD : docker build -t eos/eos-alice -f projects/alice/Dockerfile.alice .
#
# RUN : docker run --privileged -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 1094:1094 eos/eos-alice
#
# Version 0.1
FROM mvala/eos-base:4.1.31.0
MAINTAINER Martin Vala, mvala@cern.ch, CERN 2017
RUN curl http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repo -o /etc/yum.repos.d/lcg-CA.repo
RUN yum install -y --nogpg xrootd-alicetokenacc net-tools eos-apmon lcg-CA
# Some utils
RUN yum install -y --nogpg mc nmap
RUN rm -rf /etc/grid-security/certificates/nginx-bundle.pem >& /dev/null; \
cat /etc/grid-security/certificates/*.pem > /etc/grid-security/certificates/nginx-bundle.pem
# Clean yum cache
RUN yum clean all
CMD ["/usr/sbin/init"]
#
# BASE EOS Docker file (installation only)
#
# BUILD : docker build -t eos/eos-base -f projects/alice/Dockerfile.base .
#
# Version 0.1
FROM centos:7
MAINTAINER Elvin Sindrilaru, esindril@cern.ch, CERN 2017
MAINTAINER Martin Vala, mvala@cern.ch, CERN 2017
ENV EOS_VERSION 4.1.31
# from https://hub.docker.com/_/centos/
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
RUN yum install -y epel-release
# Add required repositories
ADD eos-tag.repo /etc/yum.repos.d/eos.repo
ADD eos-docker-utils.repo /etc/yum.repos.d/eos-docker-utils.repo
# Instal XRootD
RUN yum -y --nogpg update; \
yum -y --nogpg install \
initscripts krb5-workstation \
xrootd \
xrootd-client \
xrootd-client-libs \
xrootd-libs \
xrootd-server-devel \
xrootd-server-libs \
eos-server-$EOS_VERSION quarkdb eos-nginx \
eos-docker-utils pssh; \
systemctl enable eos; \
yum clean all
RUN systemctl stop eos ;\
systemctl disable eos
CMD ["/usr/sbin/init"]
# ALICE EOS SE
# Installation
## Install docker and start service
> Note that MGM and all FSTs has to have docker installed and it should be running
```
yum install -y docker
systemctl start docker
systemctl enable docker
```
# MGM and FST setup
* [EOS MGM](doc/eos-mgm.md)
* [EOS FST](doc/eos-fst.md)
# Final check of EOS storage
```
[root@eosm01-iep-grid ~]# eos-mgm
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b space set default on
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b node ls
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b fs ls
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b space ls
```
And try to copy testing file to our ALICE EOS storage
```
echo "123" > test.eos.alice
[mvala@vala ~]$ aliensh
[ aliensh 1.0.140x (C) ARDA/Alice: Andreas.Joachim.Peters@cern.ch/Derek.Feichtinger@cern.ch]
aliensh:[alice] [1] /alice/cern.ch/user/m/mvala/ >cp file:test.eos.alice test.eos.alice@ALICE::Kosice::EOS
=> Creating replica 1/1 ...
[xrootd] Total 0.00 MB |====================| 100.00 % [inf MB/s]
aliensh:[alice] [2] /alice/cern.ch/user/m/mvala/ >rm test.eos.alice
Aug 1 09:54:07 info Updating file quotas of user mvala
Aug 1 09:54:07 info /alice/cern.ch/user/m/mvala/test.eos.alice was moved to booking table
aliensh:[alice] [3] /alice/cern.ch/user/m/mvala/ >
```
# Updating EOS docker images
> Note: This command will stop storage and clean current eos docker image and install latest one and start EOS storage. This update is done on MGM and all FSTs
```
[root@eosm01-iep-grid ~]# eos-docker update
```
# Final check of EOS storage example
```
[root@eosm01-iep-grid ~]# eos-mgm
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b space set default on
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b node ls
170801 09:28:34 1114 secgsi_InitProxy: cannot access private key file: /root/.globus/userkey.pem
┌──────────┬────────────────────────────────┬────────────────┬──────────┬────────────┬──────┬──────────┬────────┬────────┬────────────────┬─────┐
│type │ hostport│ geotag│ status│ status│ txgw│ gw-queued│ gw-ntx│ gw-rate│ heartbeatdelta│ nofs│
└──────────┴────────────────────────────────┴────────────────┴──────────┴────────────┴──────┴──────────┴────────┴────────┴────────────────┴─────┘
nodesview eosf01-iep-grid.saske.sk:1095 test online off 0 10 120 1 36
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b fs ls
170801 09:28:38 1123 secgsi_InitProxy: cannot access private key file: /root/.globus/userkey.pem
┌────────────────────────┬────┬──────┬────────────────────────────────┬────────────────┬────────────────┬────────────┬──────────────┬────────────┬────────┬────────────────┐
│host │port│ id│ path│ schedgroup│ geotag│ boot│ configstatus│ drain│ active│ health│
└────────────────────────┴────┴──────┴────────────────────────────────┴────────────────┴────────────────┴────────────┴──────────────┴────────────┴────────┴────────────────┘
eosf01-iep-grid.saske.sk 1095 1 /var/eos/fs/0 default.0 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 2 /var/eos/fs/1 default.1 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 3 /var/eos/fs/10 default.2 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 4 /var/eos/fs/11 default.3 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 5 /var/eos/fs/12 default.4 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 6 /var/eos/fs/13 default.5 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 7 /var/eos/fs/14 default.6 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 8 /var/eos/fs/15 default.7 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 9 /var/eos/fs/16 default.8 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 10 /var/eos/fs/17 default.9 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 11 /var/eos/fs/18 default.10 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 12 /var/eos/fs/19 default.11 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 13 /var/eos/fs/2 default.12 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 14 /var/eos/fs/20 default.13 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 15 /var/eos/fs/21 default.14 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 16 /var/eos/fs/22 default.15 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 17 /var/eos/fs/23 default.16 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 18 /var/eos/fs/24 default.17 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 19 /var/eos/fs/25 default.18 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 20 /var/eos/fs/26 default.19 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 21 /var/eos/fs/27 default.20 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 22 /var/eos/fs/28 default.21 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 23 /var/eos/fs/29 default.22 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 24 /var/eos/fs/3 default.23 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 25 /var/eos/fs/30 default.24 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 26 /var/eos/fs/31 default.25 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 27 /var/eos/fs/32 default.26 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 28 /var/eos/fs/33 default.27 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 29 /var/eos/fs/34 default.28 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 30 /var/eos/fs/35 default.29 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 31 /var/eos/fs/4 default.30 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 32 /var/eos/fs/5 default.31 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 33 /var/eos/fs/6 default.32 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 34 /var/eos/fs/7 default.33 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 35 /var/eos/fs/8 default.34 test booted rw nodrain N/A
eosf01-iep-grid.saske.sk 1095 36 /var/eos/fs/9 default.35 test booted rw nodrain N/A
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b space ls
170801 09:29:06 1171 secgsi_InitProxy: cannot access private key file: /root/.globus/userkey.pem
┌──────────┬────────────────┬────────────┬────────────┬──────┬─────────┬───────────────┬──────────────┬─────────────┬─────────────┬──────┬──────────┬───────────┬───────────┬──────┬────────┬───────────┬──────┬────────┬───────────┐
│type │ name│ groupsize│ groupmod│ N(fs)│ N(fs-rw)│ sum(usedbytes)│ sum(capacity)│ capacity(rw)│ nom.capacity│ quota│ balancing│ threshold│ converter│ ntx│ active│ wfe│ ntx│ active│ intergroup│
└──────────┴────────────────┴────────────┴────────────┴──────┴─────────┴───────────────┴──────────────┴─────────────┴─────────────┴──────┴──────────┴───────────┴───────────┴──────┴────────┴───────────┴──────┴────────┴───────────┘
spaceview default 0 24 36 36 1.26 G 215.94 T 215.94 T 0 off off 20 off 2 0 0 0 off
```
# Setup and and FSTs server(s) on MGM
> Note: All FSTs are controlled from MGM pysical machine (root@eosm01-iep-grid) and not from MGM container
## FST prerequisites
1. Mount all data disks to /var/eos/fs/XXX where XXX is 0,1,...,N disks/mounting points
2. Open ports 1095/tcp
```
firewall-cmd --add-port=1095/tcp
firewall-cmd --add-port=1095/tcp --permanent
```
## FST installation
Add FST hostnames to /root/eos/eos-docker-fst-hosts.cf
```
[root@eosm01-iep-grid ~]# echo "eosf01-iep-grid.saske.sk" >> /root/eos/eos-docker-fst-hosts.cf
```
> Note : We assume that you have without password ssh to fsts
To setup and start fst run following command
```
[root@eosm01-iep-grid ~]# eos-docker-ssh start
```
When process finishes, one can look via eos-mgm container that new node showed up
```
[root@eosm01-iep-grid ~]# eos-mgm
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b node ls
170728 12:12:21 1744 secgsi_InitProxy: cannot access private key file: /root/.globus/userkey.pem
┌──────────┬────────────────────────────────┬────────────────┬──────────┬────────────┬──────┬──────────┬────────┬────────┬────────────────┬─────┐
│type │ hostport│ geotag│ status│ status│ txgw│ gw-queued│ gw-ntx│ gw-rate│ heartbeatdelta│ nofs│
└──────────┴────────────────────────────────┴────────────────┴──────────┴────────────┴──────┴──────────┴────────┴────────┴────────────────┴─────┘
nodesview eosf01-iep-grid.saske.sk:1095 sav online on off 0 10 120 2 36
[root@eosm01-iep-grid (eos-docker mgm) /]# exit
[root@eosm01-iep-grid ~]#
```
## Adding or synchronizing disks disks to file server
Run from mgm machine (not from docker container)
```
[root@eosm01-iep-grid ~]# eos-docker-ssh disk-sync
```
\ No newline at end of file
# Setup MGM
## Install eos-docker utils
Centos 7
```
curl https://copr.fedorainfracloud.org/coprs/mvala/eos-docker-utils/repo/epel-7/mvala-eos-docker-utils-epel-7.repo -o /etc/yum.repos.d/mvala-eos-docker-utils-epel-7.repo
yum install eos-docker-utils
```
## Firewall setting
```
firewall-cmd --add-port=1094/tcp
firewall-cmd --add-port=1094/tcp --permanent
firewall-cmd --add-port=1097/tcp
firewall-cmd --add-port=1097/tcp --permanent
```
## Generate EOS docker config file
Generate template EOS docker config file
```
[root@eosm01-iep-grid ~]# eos-docker
```
Edit config eos-docker-config.cf and run init
For simple EOS storage
```
[root@eosm01-iep-grid ~]# eos-docker init default
```
For ALICE EOS storage
```
[root@eosm01-iep-grid ~]# eos-docker init alice
```
Now there should be ```/root/eos``` directory which contains all config files ```/root/eos/etc``` and all ```/var/eos``` and ```/var/log``` directory in ```/root/eos/var```.
## Setup certificate (For ALICE only)
```
[root@eosm01-iep-grid ~]# eos-docker mgm cert-update
```
## Starting EOS MGM docker image
```
[root@eosm01-iep-grid ~]# eos-docker mgm start
```
## Stoping EOS MGM docker image
```
[root@eosm01-iep-grid ~]# eos-docker mgm stop
```
## Entering EOS MGM docker image
```
[root@eosm01-iep-grid ~]# eos-mgm
```
```eos-mgm``` is just alias to ```docker exec -it eos-mgm /bin/bash```
Check if eos default space is defined (run it in container)
```
[root@eosm01-iep-grid (eos-docker mgm) /]# eos -b space ls
```
Now exit eos mgm container
```
[root@eosm01-iep-grid (eos-docker mgm) /]# exit
[root@eosm01-iep-grid ~]#
```
> Note '(eos-docker mgm)' is missing
#!/bin/bash
# $ cd <eos-docker root dir>
# $ projects/alice/scripts/build.sh 4.1.31.0
DOCKER_CMD="sudo docker"
DOCKER_CLEAN_OPT=""
[ "$1" == "clean" ] && { shift; DOCKER_CLEAN_OPT="--no-cache=true"; }
DOCKER_IMAGE_VERSION="latest"
[ -n "$1" ] && DOCKER_IMAGE_VERSION=$1
if [ "$DOCKER_IMAGE_VERSION" != "latest" ];then
$DOCKER_CMD build $DOCKER_CLEAN_OPT -t mvala/eos-base -f projects/alice/Dockerfile.base .
$DOCKER_CMD tag mvala/eos-base docker.io/mvala/eos-base:$DOCKER_IMAGE_VERSION
$DOCKER_CMD push docker.io/mvala/eos-base:$DOCKER_IMAGE_VERSION
fi
$DOCKER_CMD build $DOCKER_CLEAN_OPT -t mvala/eos-alice -f projects/alice/Dockerfile.alice .
$DOCKER_CMD tag mvala/eos-alice docker.io/mvala/eos-alice:$DOCKER_IMAGE_VERSION
$DOCKER_CMD push docker.io/mvala/eos-alice:$DOCKER_IMAGE_VERSION
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment