Commit ba0f8c1e authored by Olga Vladimirovna Datskova's avatar Olga Vladimirovna Datskova
Browse files

Minor convenience

parent 601cc396
Pipeline #2360499 passed with stage
in 8 seconds
......@@ -11,13 +11,13 @@ lint_haskell:
name: hadolint/hadolint
script:
- /bin/hadolint Dockerfile.base
- /bin/hadolint xrootd/Dockerfile
- /bin/hadolint Dockerfile.xrootd
allow_failure: true
######################
## Build Containers
.job_template: &job_build
.job_template: &job_template
stage: build
image:
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder
......@@ -26,18 +26,19 @@ lint_haskell:
name: build/$CI_COMMIT_REF_NAME
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile.base --destination ${CI_REGISTRY_IMAGE}/voboximg:${IMAGE_TAG}
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile.base --destination ${CI_REGISTRY_IMAGE}/jalien-base/jalien-base:${IMAGE_TAG}
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile.xrootd --destination ${CI_REGISTRY_IMAGE}/jalien-base/xrootd-se:${IMAGE_TAG}
.build_latest:
<<: *job_build
build_latest:
<<: *job_template
before_script:
- export IMAGE_TAG="latest"
only:
variables:
- $CI_COMMIT_REF_NAME == "master"
.build_tag:
<<: *job_build
build_tag:
<<: *job_template
before_script:
- export IMAGE_TAG=${CI_COMMIT_TAG}
only:
......
FROM alisw/slc7-builder
ENV TTOKENAUTHZ_AUTHORIZATIONFILE='/jalien-dev/TkAuthz.Authorization'
RUN useradd xrootd
COPY xrootd /etc/xrootd
RUN yum -y install curl.x86_64 bind-utils.x86_64 redhat-lsb.x86_64 bzip2.x86_64
#RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm --import http://linuxsoft.cern.ch/wlcg/RPM-GPG-KEY-wlcg echo -e "\n\n\nrpm done"
RUN yum -y install http://linuxsoft.cern.ch/wlcg/centos7/x86_64/wlcg-repo-1.0.0-1.el7.noarch.rpm iproute date net-tools
RUN yum -y install alicexrdplugins xrootd xrootd-server xrootd-client xrootd-client-devel xrootd-python
RUN yum -y install python3 cmake3 python3-devel
RUN pip3 install wheel setuptools
RUN pip3 install alienpy
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN mkdir /shared-volume
# chown xrootd:xrootd /shared-volume && \
# echo "root:root" | chpasswd && echo "xrootd:xrootd" | chpasswd
gitlab_base_image=gitlab-registry.cern.ch/jalien/jalien-setup/jalien-base
gitlab_xrootd_image=gitlab-registry.cern.ch/jalien/jalien-setup/xrootd-se
base-image:
docker build -t jalien-base -f base/Dockerfile base
xrootd-image:
docker build -t xrootd-se -f xrootd/Dockerfile xrootd
push-base: base-image xrootd-image
docker tag jalien-base ${gitlab_base_image}
docker push ${gitlab_base_image}
push-xrootd: xrootd-image
docker tag xrootd-se ${gitlab_xrootd_image}
docker push ${gitlab_xrootd_image}
pull-all:
docker pull ${gitlab_base_image}
docker pull ${gitlab_xrootd_image}
retag:
docker tag ${gitlab_base_image} jalien-base
docker tag ${gitlab_xrootd_image} xrootd-se
push-all: push-base push-xrootd
all: base-image xrootd-image
# JAliEn in Box
# JAliEn in a Box
Hello there!
......@@ -11,9 +11,28 @@ The containers in the replica deployment are:
- HTCondor Central Manager: `schedd`
- HTcondor Worker : `worker`
## Intructions of use:
How to setup a local VO
========================
##### Dependecies
Get JCentral Docker image
-------------------------
- Pull the image:
`gitlab-registry.cern.ch/adangwal/jalien/jalien-modified:latest`
- Or build the image manually:
`docker build -t gitlab-registry.cern.ch/adangwal/jalien/jalien-modified .`
Run setup
---------
```bash
./test-setup.py create-jcentral (setup of docker container)
./test-setup.py start-jcentral
# jcentral should be running from here
```
## Instructions of use:
##### Dependencies
For host system
- docker
- docker-compose
......@@ -126,4 +145,56 @@ Do note CE is a running process and will keep creating files in the background i
There are many things one can tweak within the replica specifically in the config files, present in `$SHARED_VOLUME/config`.
One can also use the autoreloading feature of the deployment. After any changes made, either `touch $SHARED_VOLUME/alien-cs.jar` or replace jar with a new `alien-cs.jar` to restart JCentral and CE within their containers.
One can also use the autoreloading feature of the deployment. After any changes made, either `touch $SHARED_VOLUME/alien-cs.jar` or replace jar with a new `alien-cs.jar` to restart JCentral and CE within their containers.
# Quick start for xrootd container:
#### Prerequisites:
The jalien-replica.py script must be run successfully (with JCentral-replica running in the background) before manually starting the xrootd container via the below mentioned commands.
First make sure to be in the xrootd directory of the repository
- Run `docker build -t <image-name> .`
- Run `docker run -p 1094:1094 -v <path>/<to>/<shared volume>/<with jcentral replica>:/jalien-dev -it <image-name> /bin/bash`.
Note currently this uses default directory `/tmp` and storage is not persistent.
To run without usage of envelope verification change:
`CMD xrootd -c /etc/xrootd/xrootd-standalone.cfg` to `CMD xrootd` in `Dockerfile` before building image.
#### Test commands:
With alien.py setup (via sourcing env_setup.sh from your shared volume with JCentral-replica) run the following:
```
[root@51aaba2b3155 /]# alien.py cp <file name> alien://
jobID: 1/1 >>> Start
jobID: 1/1 >>> ERRNO/CODE/XRDSTAT 0/0/0 >>> STATUS OK >>> SPEED 8.17 KiB/s MESSAGE: [SUCCESS]
```
File can also be seen via the interative shell:
```
[root@51aaba2b3155 /]# alien.py
Welcome to the ALICE GRID
support mail: adrian.sevcenco@cern.ch
AliEn[jalien]:/localhost/localdomain/user/j/jalien/ >ls
env_setup.sh
```
# TODO
## Technical Improvements
- [ ] Host to replica networking, hostnames and DNS
- [ ] Dedicated shared CVMFS mountpoint without autofs
- [ ] Improve the file catalog schema (simplify the L tables)
- [ ] Improve job submission / CE stability
- [ ] Improve development workflow (start JobAgent from local jar)
## New Features
- [ ] VO administration, user management
- [ ] Add LDAP admin web frontend
- [ ] Register more SEs to test TPC and replica failovers
- [ ] Register more sites
- [ ] JobOptimizer and splitting
- [ ] CVMFS agnostic setup
- [ ] Monitoring infrastructure - MonALISA
# Technical Improvements
- [ ] Host to replica networking, hostnames and DNS
- [ ] Dedicated shared CVMFS mountpoint without autofs
- [ ] Improve the file catalog schema (simplify the L tables)
- [ ] Improve job submission / CE stability
- [ ] Improve development workflow (start JobAgent from local jar)
# New Features
- [ ] VO administration, user management
- [ ] Add LDAP admin web frontend
- [ ] Register more SEs to test TPC and replica failovers
- [ ] Register more sites
- [ ] JobOptimizer and splitting
- [ ] CVMFS agnostic setup
- [ ] Monitoring infrastructure - MonALISA
version: "3.3"
version: "3.9"
services:
JCentral-dev:
image: jalien-base
command: /jalien-setup/bash-setup/entrypoint.sh
hostname: JCentral-dev
jcentral:
build:
context: .
dockerfile: Dockerfile.base
image: gitlab-registry.cern.ch/jalien/jalien-setup/jalien-base:latest
command: [ "/jalien-setup/bash-setup/entrypoint.sh" ]
hostname: jcentral
ports:
- 8098:8098 # Java binary serialization
- 8097:8097 # JSON WebSocket
......@@ -13,50 +17,56 @@ services:
- $SHARED_VOLUME:/jalien-dev
- $JALIEN_SETUP_DIR:/jalien-setup:ro
environment:
SE_HOST: JCentral-dev-SE
SE_HOST: se
JCentral-dev-SE:
image: xrootd-se
entrypoint: bash -c
command: xrootd -c /etc/xrootd/xrootd-standalone.cfg
hostname: JCentral-dev-SE
se:
build:
context: .
dockerfile: Dockerfile.xrootd
image: gitlab-registry.cern.ch/jalien/jalien-setup/xrootd-se:latest
entrypoint: [ "bash" , "-c" ]
command: [ "xrootd", "-c", "/etc/xrootd/xrootd-standalone.cfg" ]
hostname: se
ports:
- 1094:1094 # XRootD
volumes:
- $SHARED_VOLUME:/jalien-dev
- jsite-storage:/shared-volume
schedd:
image: "htcondor/cm:8.9.6-el7"
ce:
build:
context: .
dockerfile: Dockerfile.base
image: gitlab-registry.cern.ch/jalien/jalien-setup/jalien-base:latest
command: bash /ce-setup/ce-entrypoint.sh
hostname: "localhost.localdomain"
environment:
CONDOR_HOST: "schedd"
USE_POOL_PASSWORD: "yes"
LD_LIBRARY_PATH: "/tmp"
volumes:
- /cvmfs/alice.cern.ch:/cvmfs/alice.cern.ch
- $SHARED_VOLUME:/jalien-dev
- $JALIEN_SETUP_DIR/ce-setup:/ce-setup:ro
- $JALIEN_SETUP_DIR/ce-setup/htcondor-conf/pool_password:/root/secrets/pool_password
worker:
image: "htcondor/execute:8.9.6-el7"
command: bash /ce-setup/cvmfs-checker.sh
schedd:
image: "htcondor/cm:8.9.6-el7"
environment:
CONDOR_HOST: "schedd"
USE_POOL_PASSWORD: "yes"
volumes:
- /cvmfs/alice.cern.ch:/cvmfs/alice.cern.ch
- $JALIEN_SETUP_DIR/ce-setup:/ce-setup:ro
- $SHARED_VOLUME:/jalien-dev
- $JALIEN_SETUP_DIR/ce-setup/htcondor-conf/pool_password:/root/secrets/pool_password
JCentral-dev-CE:
image: "jalien-base"
command: bash /ce-setup/ce-entrypoint.sh
hostname: "localhost.localdomain"
worker:
image: "htcondor/execute:8.9.6-el7"
command: [ "bash" , "/ce-setup/cvmfs-checker.sh" ]
environment:
CONDOR_HOST: "schedd"
USE_POOL_PASSWORD: "yes"
LD_LIBRARY_PATH: "/tmp"
volumes:
- /cvmfs/alice.cern.ch:/cvmfs/alice.cern.ch
- $SHARED_VOLUME:/jalien-dev
- $JALIEN_SETUP_DIR/ce-setup:/ce-setup:ro
- $SHARED_VOLUME:/jalien-dev
- $JALIEN_SETUP_DIR/ce-setup/htcondor-conf/pool_password:/root/secrets/pool_password
volumes:
......
How to setup a local VO
========================
Get JCentral Docker image
-------------------------
- Pull the image:
`gitlab-registry.cern.ch/adangwal/jalien/jalien-modified:latest`
- Or build the image manually:
`docker build -t gitlab-registry.cern.ch/adangwal/jalien/jalien-modified .`
Run setup
---------
```bash
./test-setup.py create-jcentral (setup of docker container)
./test-setup.py start-jcentral
# jcentral should be running from here
```
FROM alisw/slc7-builder
COPY installer.sh /
RUN /bin/bash installer.sh
ADD xrootd-conf /etc/xrootd
USER xrootd
ENV TTOKENAUTHZ_AUTHORIZATIONFILE='/jalien-dev/TkAuthz.Authorization'
### Quick start for xrootd container:
#### Prerequisites:
The jalien-replica.py script must be run successfully (with JCentral-replica running in the background) before manually starting the xrootd container via the below mentioned commands.
First make sure to be in the xrootd directory of the repository
- Run `docker build -t <image-name> .`
- Run `docker run -p 1094:1094 -v <path>/<to>/<shared volume>/<with jcentral replica>:/jalien-dev -it <image-name> /bin/bash`.
Note currently this uses default directory `/tmp` and storage is not persistent.
To run without usage of envelope verification change:
`CMD xrootd -c /etc/xrootd/xrootd-standalone.cfg` to `CMD xrootd` in `Dockerfile` before building image.
#### Test commands:
With alien.py setup (via sourcing env_setup.sh from your shared volume with JCentral-replica) run the following:
```
[root@51aaba2b3155 /]# alien.py cp <file name> alien://
jobID: 1/1 >>> Start
jobID: 1/1 >>> ERRNO/CODE/XRDSTAT 0/0/0 >>> STATUS OK >>> SPEED 8.17 KiB/s MESSAGE: [SUCCESS]
```
File can also be seen via the interative shell:
```
[root@51aaba2b3155 /]# alien.py
Welcome to the ALICE GRID
support mail: adrian.sevcenco@cern.ch
AliEn[jalien]:/localhost/localdomain/user/j/jalien/ >ls
env_setup.sh
```
\ No newline at end of file
#!/bin/bash
yum -y install curl.x86_64 bind-utils.x86_64 redhat-lsb.x86_64 bzip2.x86_64 https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm --import http://linuxsoft.cern.ch/wlcg/RPM-GPG-KEY-wlcg
echo -e "\n\n\nrpm done"
yum -y install http://linuxsoft.cern.ch/wlcg/centos7/x86_64/wlcg-repo-1.0.0-1.el7.noarch.rpm iproute date net-tools
echo -e "\n\n\nfurther dependencies done"
yum -y install alicexrdplugins xrootd xrootd-server xrootd-client xrootd-client-devel xrootd-python
echo -e "\n\n\n alice + xrootd done"
yum -y install python3 cmake3 python3-devel
pip3 install wheel setuptools
echo -e "\n\n\n\npython done"
pip3 install alienpy
ln -s /usr/bin/cmake3 /usr/bin/cmake
mkdir /shared-volume
chown xrootd:xrootd /shared-volume
echo "root:root" | chpasswd
echo "xrootd:xrootd" | chpasswd
echo "finally done"
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