Skip to content

Commit 423bb5e

Browse files
committed
Merge branch 'main' of github.com:CESNET/usegalaxy into main
2 parents 6d9552b + f46657b commit 423bb5e

File tree

27 files changed

+1020
-742
lines changed

27 files changed

+1020
-742
lines changed

.gitignore

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,11 @@
33
*.retry
44
.venv
55
*.log
6-
7-
### Values and Secrets ###
8-
.vault-password.*
9-
hosts
10-
ansible.log
11-
12-
# Python bytecode
6+
.DS_Store
137
*.pyc
148

15-
# Macs
16-
.DS_Store
9+
# vault secrets
10+
.vault-password.*
1711

18-
# ideally no local roles changes are present
12+
# installed roles
1913
roles

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ rabbitmq_users_password:
6060
mqadmin: a-really-long-password-here
6161
pulsar: a-really-long-DIFFERENT-password-here
6262
vault_rabbitmq_password_galaxy: good-password-here
63-
oidc_client_id: string-with-client-id
64-
oidc_client_secret: string-with-client-secret
63+
einfracz_client_id: string-with-client-id
64+
einfracz_client_secret: string-with-client-secret
65+
6566
# Galaxy admin API key for tool installation
6667
api_key: dont-be-lazy-a-really-long-password-here
6768
# see https://github.com/galaxyproject/galaxy/blob/dev/doc/source/admin/special_topics/vault.md
@@ -91,6 +92,31 @@ and external repository that contains the lists of tools for every instance: htt
9192

9293
Following are troubleshooting notes gathered through the learning process.
9394

95+
96+
### client build OOM
97+
98+
- stop app before building
99+
- do not build maps (`make client-production` only)
100+
- set reasonable heap (e.g. `NODE_OPTIONS: --max_old_space_size=4096`)
101+
- disable webpack parallel minimizer
102+
103+
```diff
104+
diff --git a/client/webpack.config.js b/client/webpack.config.js
105+
index 8202237857..99f86ec25d 100644
106+
--- a/client/webpack.config.js
107+
+++ b/client/webpack.config.js
108+
@@ -43,7 +43,7 @@ module.exports = (env = {}, argv = {}) => {
109+
if (targetEnv == "production") {
110+
minimizations = {
111+
minimize: true,
112+
- minimizer: [new TerserPlugin(), new CssMinimizerPlugin()],
113+
+ minimizer: [new TerserPlugin({parallel: false,}), new CssMinimizerPlugin()],
114+
};
115+
} else {
116+
minimizations = {
117+
```
118+
119+
94120
### glibc
95121

96122
On ubuntu < 22.04 and Debian < 12 the GLIBC version is incompatible with the ```galaxyproject.tusd``` GLIBC, therefore playbook ends in error.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/env bash
2+
3+
set -e
4+
5+
FROM=$1
6+
TO=$2
7+
LIST=/tmp/dirs_to_move.$$
8+
9+
cd "${FROM}"
10+
find shed_tools/ -mindepth 7 -maxdepth 7 -type d \( -name '.hg' -o -name 'test-data' \) > ${LIST}
11+
12+
cat ${LIST} | while read DIR; do
13+
if [ -n "$DIR" ]; then
14+
SRC="$FROM/$DIR";
15+
TARGET="$TO/$DIR";
16+
echo "moving $SRC -> $TARGET";
17+
rsync -av --mkpath "$SRC/" "$TARGET" && rm -rf "$SRC" && ln -s "$TARGET" "$SRC" || echo "rsync must failed, directory is missing!";
18+
else
19+
echo "line is empty!"
20+
fi
21+
done

files/galaxy-umsa.grid.cesnet.cz/all_tools.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ items:
4343
- matchms
4444
- mfassignr
4545
- qcxms
46+
- ipapy2
4647
- pre_processing
4748
- post_processing
4849
- proteomics
-20.4 KB
Binary file not shown.
Lines changed: 156 additions & 0 deletions
Loading

galaxy.yml

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
name:
99
- python3-pip
1010
- python-is-python3
11-
update_cache: yes
11+
# this is not needed often and can fail the run since the machines have many repos
12+
# update_cache: yes
1213
when: ansible_os_family == 'Debian'
1314

1415
- hosts: production
@@ -176,11 +177,22 @@
176177
- git:
177178
repo: 'https://github.com/usegalaxy-eu/libraries-training-repo'
178179
dest: /libraries/
180+
179181
- name: stop galaxy to free mem for client build
180182
become: true
181183
become_user: root
182184
ansible.builtin.command: galaxyctl stop
183185
when: "inventory_hostname in ['galaxy-qa1.galaxy.cloud.e-infra.cz', 'galaxy-qa2.galaxy.cloud.e-infra.cz']"
186+
187+
# this needs to be in the correct spot, not here, either via fork or enabling this configuration upstream
188+
189+
# - name: client building optimization for small machines
190+
# replace:
191+
# path: "{{ galaxy_root }}/server/client/webpack.config.js"
192+
# regexp: 'TerserPlugin\(\)'
193+
# replace: 'TerserPlugin({parallel: false,})'
194+
# when: "inventory_hostname in ['galaxy-qa1.galaxy.cloud.e-infra.cz', 'galaxy-qa2.galaxy.cloud.e-infra.cz']"
195+
184196
roles:
185197
- galaxyproject.tusd
186198
- usegalaxy_eu.apptainer
@@ -214,6 +226,13 @@
214226
state: restarted
215227
name: nginx
216228

229+
# not detected automatically due to a bug: https://github.com/galaxyproject/galaxy/issues/20483
230+
- name: Install conditional dependencies
231+
pip:
232+
name: fs.onedatarestfs==21.2.5.2
233+
virtualenv: "{{ galaxy_venv_dir }}"
234+
when: "inventory_hostname in ['galaxy-qa1.galaxy.cloud.e-infra.cz','usegalaxy.cz']"
235+
217236
- name: Creates entry in crontab "chmod on _files for ngnix access"
218237
ansible.builtin.cron:
219238
name: "chmod on _files for ngnix access"
@@ -246,11 +265,22 @@
246265
when: "inventory_hostname in ['galaxy-qa1.galaxy.cloud.e-infra.cz', 'usegalaxy.cz', 'galaxy-umsa.grid.cesnet.cz']"
247266
no_log: true
248267

268+
# set up cron to propagate einfra users to einfra galaxy group
269+
- name: Ensure the user_group cron script directory exists
270+
ansible.builtin.file:
271+
path: "{{ galaxy_root }}/cron/user_group"
272+
state: directory
273+
owner: postgres
274+
group: postgres
275+
mode: '0755'
276+
when: "'usegalaxy.cz' in inventory_hostname"
277+
tags: cron
249278
- name: Copy user - group association script
250279
ansible.builtin.copy:
251280
src: "{{ playbook_dir }}/extra_scripts/add_group_users.py"
252-
dest: "/var/lib/postgresql/add_group_users.py"
281+
dest: "{{ galaxy_root }}/cron/user_group/add_group_users.py"
253282
owner: postgres
283+
group: postgres
254284
when: "'usegalaxy.cz' in inventory_hostname"
255285
tags: cron
256286
- name: Setup user - group association rutine
@@ -259,10 +289,40 @@
259289
user: postgres
260290
minute: "0"
261291
hour: "*" # every hour
262-
job: "python3 /var/lib/postgresql/add_group_users.py {{ inventory_hostname }} $(cat /home/{{ galaxy_user_name }}/.galaxy_api_key)"
292+
job: "python3 {{ galaxy_root }}/cron/user_group/add_group_users.py {{ inventory_hostname }} $(cat /home/{{ galaxy_user_name }}/.galaxy_api_key)"
263293
when: "'usegalaxy.cz' in inventory_hostname"
264294
tags: cron
265295

296+
# set up cron to shadow some shed_tools contents to minimize space consumption
297+
- name: Ensure the shadow cron script directory exists
298+
ansible.builtin.file:
299+
path: "{{ galaxy_root }}/cron/shadow"
300+
state: directory
301+
owner: "{{ galaxy_user_name }}"
302+
group: "{{ galaxy_user_group_name }}"
303+
mode: '0755'
304+
when: "shed_tools_shadowing"
305+
tags: cron
306+
- name: Copy shed_tools shadowing script
307+
ansible.builtin.copy:
308+
src: "{{ playbook_dir }}/extra_scripts/shed_tools_shadow_script.sh"
309+
dest: "{{ galaxy_root }}/cron/shadow/shed_tools_shadow_script.sh"
310+
owner: "{{ galaxy_user_name }}"
311+
group: "{{ galaxy_user_group_name }}"
312+
mode: '0755'
313+
when: "shed_tools_shadowing"
314+
tags: cron
315+
- name: Setup shed_tools shadowing rutine
316+
ansible.builtin.cron:
317+
name: "Shadow shed-tools directories"
318+
user: "{{ galaxy_user_name }}"
319+
minute: "0"
320+
hour: "2" # 2 am daily
321+
job: "{{ galaxy_root }}/cron/shadow/shed_tools_shadow_script.sh {{ galaxy_root }}/var {{ galaxy_mutable_data_dir }} 2>&1 | logger -t shed_tools_shadowing"
322+
when: "shed_tools_shadowing"
323+
tags: cron
324+
325+
# set up cron to automate tool installation from https://github.com/CESNET/galaxy_tools repository
266326
- name: Ensure the tools cron script directory exists
267327
ansible.builtin.file:
268328
path: "{{ galaxy_root }}/cron/tools"
@@ -291,6 +351,7 @@
291351
tags: cron
292352
when: "inventory_hostname in ['galaxy-qa1.galaxy.cloud.e-infra.cz', 'usegalaxy.cz', 'galaxy-umsa.grid.cesnet.cz']"
293353

354+
294355
- name: RE Galaxy instance patch in lib/galaxy/webapps/galaxy/api/job_files.py
295356
replace:
296357
path: "{{ galaxy_root }}/server/lib/galaxy/webapps/galaxy/api/job_files.py"
@@ -311,6 +372,7 @@
311372
user: "{{ galaxy_user_name }}"
312373
state: present
313374
key: "{{ lookup('file','files/{{ inventory_hostname }}/pulsar.pub') }}"
375+
314376
- name: Restart galaxy
315377
become: true
316378
become_user: root

0 commit comments

Comments
 (0)