Skip to content

Commit b5a00cc

Browse files
committed
added cvmfs provision playbook and removed g++
1 parent cb21b29 commit b5a00cc

File tree

4 files changed

+131
-12
lines changed

4 files changed

+131
-12
lines changed

galaxy/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ MAINTAINER Björn A. Grüning, [email protected]
1111
# * README: only Docker next to Docker is supported
1212
# * NodeJS is getting globally installed via the playbook, this is not needed anymore isn't it?
1313
# * the playbooks are not cleaning anything up
14-
# * autofs is big and should be installed during startup, only in case --priv is enables ?
1514
#
1615
ARG GALAXY_RELEASE
1716
ARG GALAXY_REPO
@@ -28,8 +27,8 @@ ENV GALAXY_RELEASE=${GALAXY_RELEASE:-release_24.1} \
2827
ENV GALAXY_CONFIG_FILE=$GALAXY_CONFIG_DIR/galaxy.yml \
2928
GALAXY_CONFIG_JOB_CONFIG_FILE=$GALAXY_CONFIG_DIR/job_conf.xml \
3029
GALAXY_CONFIG_JOB_METRICS_CONFIG_FILE=$GALAXY_CONFIG_DIR/job_metrics_conf.xml \
31-
GALAXY_CONFIG_TOOL_CONFIG_FILE=/etc/galaxy/tool_conf.xml \
32-
GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH=/etc/galaxy/tool_data_table_conf.xml \
30+
GALAXY_CONFIG_TOOL_CONFIG_FILE=$GALAXY_CONFIG_DIR/tool_conf.xml \
31+
GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH=$GALAXY_CONFIG_DIR/tool_data_table_conf.xml \
3332
GALAXY_CONFIG_WATCH_TOOL_DATA_DIR=True \
3433
GALAXY_CONFIG_TOOL_DEPENDENCY_DIR=$EXPORT_DIR/tool_deps \
3534
GALAXY_CONFIG_TOOL_PATH=$EXPORT_DIR/galaxy-central/tools \
@@ -163,8 +162,10 @@ ADD sample_tool_list.yaml $GALAXY_HOME/ephemeris/sample_tool_list.yaml
163162
# Activate Interactive Tools during runtime
164163
ADD ./tools_conf_interactive.xml.sample $GALAXY_INTERACTIVE_TOOLS_CONFIG_FILE
165164

166-
RUN chown $GALAXY_USER:$GALAXY_USER $GALAXY_CONFIG_DIR/reports.yml $GALAXY_HOME/ephemeris/sample_tool_list.yaml $GALAXY_INTERACTIVE_TOOLS_CONFIG_FILE
167-
RUN chmod 0644 $GALAXY_CONFIG_DIR/reports.yml $GALAXY_HOME/ephemeris/sample_tool_list.yaml $GALAXY_INTERACTIVE_TOOLS_CONFIG_FILE
165+
RUN curl -o $GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH \
166+
-L https://raw.githubusercontent.com/galaxyproject/usegalaxy-playbook/8adb1f82c94fe95b09df2a2816440ce2420b7d39/env/main/files/galaxy/config/tool_data_table_conf.xml \
167+
&& chown $GALAXY_USER:$GALAXY_USER $GALAXY_CONFIG_DIR/reports.yml $GALAXY_HOME/ephemeris/sample_tool_list.yaml $GALAXY_INTERACTIVE_TOOLS_CONFIG_FILE $GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH \
168+
&& chmod 0644 $GALAXY_CONFIG_DIR/reports.yml $GALAXY_HOME/ephemeris/sample_tool_list.yaml $GALAXY_INTERACTIVE_TOOLS_CONFIG_FILE $GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH
168169

169170
# Make python3 standard
170171
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
@@ -216,12 +217,14 @@ RUN ansible-playbook /ansible/proftpd_provision.yml \
216217
--extra-vars proftpd_sql_password=$GALAXY_USER \
217218
--extra-vars galaxy_ftp_upload_dir=$EXPORT_DIR/ftp
218219

220+
# Install cvmfs
221+
RUN ansible-playbook /ansible/cvmfs_provision.yml
222+
219223
RUN mkdir -p /shed_tools \
220224
&& chown $GALAXY_USER:$GALAXY_USER /shed_tools \
221225
&& ln -s /tool_deps/ $EXPORT_DIR/tool_deps \
222226
# Configure Galaxy to use the Tool Shed
223227
&& chown $GALAXY_USER:$GALAXY_USER $EXPORT_DIR/tool_deps \
224-
&& apt update -qq && apt install --no-install-recommends -y g++ make \
225228
&& ansible-playbook /ansible/provision.yml \
226229
--extra-vars galaxy_venv_dir=$GALAXY_VIRTUAL_ENV \
227230
--extra-vars galaxy_log_dir=$GALAXY_LOGS_DIR \
@@ -247,15 +250,15 @@ RUN mkdir -p /shed_tools \
247250
--extra-vars tus_upload_store_path=$GALAXY_CONFIG_TUS_UPLOAD_STORE \
248251
--extra-vars gx_it_proxy_sessions_path=$GALAXY_CONFIG_INTERACTIVETOOLS_MAP \
249252
--extra-vars use_pbkdf2=True \
250-
--tags=galaxyextras,cvmfs --skip-tags=tusd,flower,redis,slurm,condor,proftpd -c local \
253+
--tags=galaxyextras --skip-tags=tusd,flower,redis,slurm,condor,proftpd,cvmfs -c local \
251254
&& . $GALAXY_VIRTUAL_ENV/bin/activate \
252255
&& pip install WeasyPrint \
253256
&& deactivate \
254257
# TODO: no clue why this is needed here again
255258
&& cd $GALAXY_ROOT_DIR && ./scripts/common_startup.sh \
256259
&& cd config && find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + \
257260
&& find . -name '.cache' -type d -prune -exec rm -rf '{}' + \
258-
&& apt purge software-properties-common dirmngr gpg gpg-agent g++ make gcc -y && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache/ \
261+
&& apt purge software-properties-common dirmngr gpg gpg-agent -y && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache/ \
259262
# cleanup dance
260263
&& find $GALAXY_ROOT_DIR/ -name '*.pyc' -delete | true \
261264
&& find /usr/lib/ -name '*.pyc' -delete | true \

galaxy/ansible/cvmfs_provision.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Setup of the CernVM-File system (CVMFS) and configure so that the reference
2+
# data hosted by Galaxy on usegalaxy.org is available to the remote target.
3+
- hosts: localhost
4+
connection: local
5+
remote_user: root
6+
vars_files:
7+
- vars/main.yml
8+
tasks:
9+
- name: Install CernVM apt key
10+
apt_key:
11+
url: https://cvmrepo.web.cern.ch/cvmrepo/apt/cernvm.gpg
12+
13+
# Install & setup CermVM-FS
14+
- name: Configure CernVM apt repository
15+
apt_repository:
16+
filename: "cernvm.list"
17+
mode: 422
18+
repo: deb [allow-insecure=true] https://cvmrepo.web.cern.ch/cvmrepo/apt/ {{ ansible_distribution_release }}-prod main
19+
20+
- name: Install CernVM-FS client (apt)
21+
apt:
22+
name: ['cvmfs', 'cvmfs-config']
23+
state: present
24+
update_cache: yes
25+
26+
- name: Make CernVM-FS key directories
27+
file:
28+
state: directory
29+
path: "{{ item }}"
30+
owner: "root"
31+
group: "root"
32+
mode: "0755"
33+
loop: "{{ cvmfs_keys | map(attribute='path') | map('dirname') | unique }}"
34+
35+
- name: Install CernVM-FS keys
36+
copy:
37+
content: "{{ item.key }}"
38+
dest: "{{ item.path }}"
39+
owner: "root"
40+
group: "root"
41+
mode: "0444"
42+
with_items: "{{ cvmfs_keys }}"
43+
44+
- name: Perform AutoFS and FUSE configuration for CernVM-FS
45+
command: cvmfs_config setup
46+
47+
- name: Configure CernVM-FS config repository
48+
block:
49+
50+
- name: Create config repo config
51+
copy:
52+
content: |
53+
CVMFS_SERVER_URL="{{ cvmfs_config_repo.urls | join(';') }}"
54+
CVMFS_PUBLIC_KEY="{{ cvmfs_config_repo.key.path }}"
55+
dest: "/etc/cvmfs/config.d/{{ cvmfs_config_repo.repository.repository }}.conf"
56+
owner: "root"
57+
group: "root"
58+
mode: "0444"
59+
60+
- name: Set config repo defaults
61+
copy:
62+
content: |
63+
CVMFS_CONFIG_REPOSITORY="{{ cvmfs_config_repo.repository.repository }}"
64+
CVMFS_DEFAULT_DOMAIN="{{ cvmfs_config_repo.domain }}"
65+
CVMFS_USE_GEOAPI="{{ cvmfs_config_repo.use_geoapi | default('yes') }}"
66+
dest: "/etc/cvmfs/default.d/80-galaxyproject-cvmfs.conf"
67+
owner: "root"
68+
group: "root"
69+
mode: "0444"
70+
71+
- name: Configure CernVM-FS global client settings
72+
copy:
73+
content: |
74+
CVMFS_HTTP_PROXY="{{ cvmfs_http_proxies | default(['DIRECT']) | join(';') }}"
75+
CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit | default('4000') }}"
76+
CVMFS_CACHE_BASE="{{ cvmfs_cache_base | default('/var/lib/cvmfs') }}"
77+
CVMFS_USE_GEOAPI="{{ cvmfs_use_geoapi | default('yes') }}"
78+
dest: "/etc/cvmfs/default.local"
79+
owner: "root"
80+
group: "root"
81+
mode: "0644"

galaxy/ansible/vars/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
cvmfs_config_repo:
2+
domain: galaxyproject.org
3+
key:
4+
path: /etc/cvmfs/keys/galaxyproject.org/cvmfs-config.galaxyproject.org.pub
5+
key: |
6+
-----BEGIN PUBLIC KEY-----
7+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuJZTWTY3/dBfspFKifv8
8+
TWuuT2Zzoo1cAskKpKu5gsUAyDFbZfYBEy91qbLPC3TuUm2zdPNsjCQbbq1Liufk
9+
uNPZJ8Ubn5PR6kndwrdD13NVHZpXVml1+ooTSF5CL3x/KUkYiyRz94sAr9trVoSx
10+
THW2buV7ADUYivX7ofCvBu5T6YngbPZNIxDB4mh7cEal/UDtxV683A/5RL4wIYvt
11+
S5SVemmu6Yb8GkGwLGmMVLYXutuaHdMFyKzWm+qFlG5JRz4okUWERvtJ2QAJPOzL
12+
mAG1ceyBFowj/r3iJTa+Jcif2uAmZxg+cHkZG5KzATykF82UH1ojUzREMMDcPJi2
13+
dQIDAQAB
14+
-----END PUBLIC KEY-----
15+
urls:
16+
- http://cvmfs1-psu0.galaxyproject.org/cvmfs/@fqrn@
17+
- http://cvmfs1-iu0.galaxyproject.org/cvmfs/@fqrn@
18+
- http://cvmfs1-tacc0.galaxyproject.org/cvmfs/@fqrn@
19+
- http://cvmfs1-ufr0.galaxyproject.eu/cvmfs/@fqrn@
20+
- http://cvmfs1-mel0.gvl.org.au/cvmfs/@fqrn@
21+
repository:
22+
repository: cvmfs-config.galaxyproject.org
23+
stratum0: cvmfs0-psu0.galaxyproject.org
24+
owner: "root"
25+
server_options: []
26+
client_options: []
27+
28+
cvmfs_keys:
29+
- path: /etc/cvmfs/keys/galaxyproject.org/cvmfs-config.galaxyproject.org.pub
30+
key: |
31+
-----BEGIN PUBLIC KEY-----
32+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuJZTWTY3/dBfspFKifv8
33+
TWuuT2Zzoo1cAskKpKu5gsUAyDFbZfYBEy91qbLPC3TuUm2zdPNsjCQbbq1Liufk
34+
uNPZJ8Ubn5PR6kndwrdD13NVHZpXVml1+ooTSF5CL3x/KUkYiyRz94sAr9trVoSx
35+
THW2buV7ADUYivX7ofCvBu5T6YngbPZNIxDB4mh7cEal/UDtxV683A/5RL4wIYvt
36+
S5SVemmu6Yb8GkGwLGmMVLYXutuaHdMFyKzWm+qFlG5JRz4okUWERvtJ2QAJPOzL
37+
mAG1ceyBFowj/r3iJTa+Jcif2uAmZxg+cHkZG5KzATykF82UH1ojUzREMMDcPJi2
38+
dQIDAQAB
39+
-----END PUBLIC KEY-----

galaxy/startup.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,6 @@ fi
488488

489489
if $PRIVILEGED; then
490490
# in privileged mode autofs and CVMFS is available
491-
# install autofs
492-
echo "Installing autofs to enable automatic CVMFS mounts"
493-
apt-get install autofs --no-install-recommends -y
494-
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
495491
export GALAXY_CONFIG_TOOL_DATA_TABLE_CONFIG_PATH="/etc/galaxy/tool_data_table_conf.xml,/cvmfs/data.galaxyproject.org/byhand/location/tool_data_table_conf.xml,/cvmfs/data.galaxyproject.org/managed/location/tool_data_table_conf.xml"
496492

497493
echo "Enable Galaxy Interactive Tools."

0 commit comments

Comments
 (0)