Skip to content
Snippets Groups Projects
Commit 1bb3f4b2 authored by Marco Malavolti's avatar Marco Malavolti
Browse files

Added 'bind mounts' used by ECCS

parent b08e489c
No related branches found
No related tags found
No related merge requests found
...@@ -43,11 +43,7 @@ RUN wget "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDR ...@@ -43,11 +43,7 @@ RUN wget "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDR
COPY --chown=eccs:eccs pyff-config/ pyff-config/ COPY --chown=eccs:eccs pyff-config/ pyff-config/
COPY --chown=eccs:eccs api.py clean7daysOldFiles.sh cleanAndRunEccs.sh eccs.ini eccs.py eccs_properties.py eccs-wsgi.py get-sps-metadata.sh retryFailedChecks.py runEccs.py utils.py . COPY --chown=eccs:eccs api.py clean7daysOldFiles.sh cleanAndRunEccs.sh eccs.ini eccs.py eccs_properties.py eccs-wsgi.py get-sps-metadata.sh retryFailedChecks.py runEccs.py utils.py .
COPY --chown=eccs:eccs html/ html/
COPY --chown=eccs:eccs input/ input/ COPY --chown=eccs:eccs input/ input/
COPY --chown=eccs:eccs logs/ logs/
COPY --chown=eccs:eccs output/ output/
COPY --chown=eccs:eccs selenium-logs/ selenium-logs/
COPY --chown=eccs:eccs web/ web/ COPY --chown=eccs:eccs web/ web/
USER root USER root
......
...@@ -73,12 +73,33 @@ We'll respect `Semantic Versioning`_. ...@@ -73,12 +73,33 @@ We'll respect `Semantic Versioning`_.
Use the ECCS Docker container Use the ECCS Docker container
----------------------------- -----------------------------
``docker compose -f docker-compose-<ECCS_VERSION>.yml`` * Create the `eccs` directory with the required directories by bind mounts with:
The ``ECCS_VERSION`` avaliable are: * ``mkdir -p eccs/output eccs/html eccs/logs eccs/selenium-logs``
* ``2.1.0`` * Instance ECCS with:
* ``cd eccs/``
* ``wget https://gitlab.software.geant.org/edugain/eccs/-/raw/eccs-docker/docker-compose-<ECCS_VERSION>.yml``
* ``docker compose -f docker-compose-<ECCS_VERSION>.yml up -d``
* The ``ECCS_VERSION`` avaliable are:
* ``2.1.0``
* (optional) Delete last results with:
* ``docker exec -it -w /home/eccs/ eccs rm -rf html/$(date +%Y-%m-%d) output/eccs_$(date +%Y-%m-%d).log logs/*_$(date +%Y-%m-%d).log``
* Run ECCS script:
* ``docker exec -it -w /home/eccs eccs ./cleanAndRunEccs.sh > logs/eccs-cron.log 2>&1``
* (if needed) Stops containers and removes containers, networks, volumes, and images created by ``up`` compose action:
* ``docker compose -f docker-compose-<ECCS_VERSION>.yml down``
Authors Authors
------- -------
......
...@@ -7,3 +7,16 @@ services: ...@@ -7,3 +7,16 @@ services:
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
volumes:
- type: bind
source: ./output
target: /home/eccs/output
- type: bind
source: ./html
target: /home/eccs/html
- type: bind
source: ./logs
target: /home/eccs/logs
- type: bind
source: ./selenium-logs
target: /home/eccs/selenium-logs
...@@ -12,3 +12,16 @@ services: ...@@ -12,3 +12,16 @@ services:
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
volumes:
- type: bind
source: ./output
target: /home/eccs/output
- type: bind
source: ./html
target: /home/eccs/html
- type: bind
source: ./logs
target: /home/eccs/logs
- type: bind
source: ./selenium-logs
target: /home/eccs/selenium-logs
0 3 * * * /usr/bin/touch /home/eccs/eccs.ini 0 3 * * * /usr/bin/touch /home/eccs/eccs.ini
0 4 * * * /bin/bash /home/eccs/cleanAndRunEccs.sh > /dev/stdout 0 4 * * * /bin/bash /home/eccs/cleanAndRunEccs.sh > /home/eccs/logs/eccs-cron.log 2>&1
0 10 * * * /bin/bash /home/eccs/clean7daysOldFiles.sh > /dev/stdout 0 10 * * * /bin/bash /home/eccs/clean7daysOldFiles.sh > /home/eccs/logs/clean7daysOldFiles.log 2>&1
0 3 * * * pyff --logfile=/dev/stdout --loglevel=DEBUG /home/eccs/pyff-config/sps-metadata.xml 0 3 * * * pyff --logfile=/dev/stdout --loglevel=DEBUG /home/eccs/pyff-config/sps-metadata.xml > /home/eccs/logs/pyff-sps-md.log
...@@ -47,3 +47,11 @@ echo "" ...@@ -47,3 +47,11 @@ echo ""
echo "Useful command to access the 'eccs' terminal:" echo "Useful command to access the 'eccs' terminal:"
echo "" echo ""
echo "docker exec -it -u root eccs bash" echo "docker exec -it -u root eccs bash"
echo ""
echo "Run ECCS manually for today:"
echo ""
echo "docker exec -it -w /home/eccs eccs ./cleanAndRunEccs.sh > logs/eccs-cron.log 2>&1"
echo ""
echo "Delete all results of today"
echo ""
echo "docker exec -it -w /home/eccs/ eccs rm -rf html/$(date +%Y-%m-%d) output/eccs_$(date +%Y-%m-%d).log logs/*_$(date +%Y-%m-%d).log"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment