Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to 24.1 - Single-container setup #607

Merged
merged 24 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4902410
bump to 24.1
jyotipm29 Oct 30, 2024
c664506
small fixes
jyotipm29 Oct 31, 2024
26d0cca
added tusd role
jyotipm29 Nov 1, 2024
5dae32d
added flower role
jyotipm29 Nov 1, 2024
40e479e
added redis role
jyotipm29 Nov 2, 2024
bf03c59
remove default channel from conda
bgruening Nov 2, 2024
a2784aa
added slurm role and some refactorings
jyotipm29 Nov 2, 2024
86375d4
added condor role
jyotipm29 Nov 3, 2024
6305e34
added proftpd role
jyotipm29 Nov 3, 2024
cb21b29
install conda from conda-forge (miniforge)
jyotipm29 Nov 3, 2024
b5a00cc
added cvmfs provision playbook and removed g++
jyotipm29 Nov 4, 2024
b8bc58c
added rabbitmq role
jyotipm29 Nov 4, 2024
298ee36
moved all tasks (except nginx) from galaxyextras repo
jyotipm29 Nov 5, 2024
afeaf9b
add docker role and enabled role installation via ansible-galaxy
jyotipm29 Nov 5, 2024
62e0b76
added nginx, certbot, self_signed_certs role and removed galaxyextras…
jyotipm29 Nov 7, 2024
83c8499
fix some strange errors only happening for me
bgruening Nov 7, 2024
7ef12e0
added multi-stage build in Dockerfile
jyotipm29 Nov 9, 2024
11dc49f
update dockerfile
jyotipm29 Nov 9, 2024
3b9f9a0
migrate from galaxy-central to "galaxy"
bgruening Nov 9, 2024
d2dc319
Merge pull request #1 from bgruening/change_root_dir
jyotipm29 Nov 9, 2024
4739bb8
migrate remaining galaxy-central, added dive tests, some fixes and op…
jyotipm29 Nov 11, 2024
97c3de6
changed execution order in startup and added test for data persistence
jyotipm29 Nov 11, 2024
a2c7267
fix startup issues
bgruening Nov 12, 2024
93d57b3
update DinD
bgruening Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ With this method, you keep a backup in case you decide to downgrade, but require

```
$ sudo rsync -var /data/galaxy-data-old/tool_deps/* /data/galaxy-data/tool_deps/
$ sudo rsync -var /data/galaxy-data-old/shed_tools/* /data/galaxy-data/shed_tools/
$ sudo rsync -var /data/galaxy-data-old/galaxy-central/database/shed_tools/* /data/galaxy-data/galaxy-central/database/shed_tools/
```
10. Copy the welcome page and all its files.

Expand Down
323 changes: 167 additions & 156 deletions galaxy/Dockerfile

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions galaxy/ansible/galaxy_root.yml

This file was deleted.

2 changes: 0 additions & 2 deletions galaxy/ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ galaxy_condor: true
galaxy_pbs: false
galaxy_k8s_jobs: false
galaxy_supervisor: true
galaxy_root: true
galaxy_job_metrics: true
galaxy_scripts: true
galaxy_domain: "localhost" # This is used by letsencrypt and Interactive Tools, set it to the domain name under which galaxy can be reached
Expand Down Expand Up @@ -202,7 +201,6 @@ nginx_proxy_flower: true
nginx_proxy_interactive_tools: true

# Certbot Configuration.
certbot_dir: "{{ galaxy_venv_dir }}"
certbot_auto_renew_hour: "{{ 23 |random(seed=inventory_hostname) }}"
certbot_auto_renew_minute: "{{ 59 |random(seed=inventory_hostname) }}"
certbot_auth_method: --webroot
Expand Down
1 change: 1 addition & 0 deletions galaxy/ansible/pbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
environment:
PYTHOPATH: null
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become_user: "{{ galaxy_user_name }}"

- name: "Set PBS/torque server name"
lineinfile: dest=/etc/torque/server_name line={{ pbs_server_name }} state=present create=yes
12 changes: 4 additions & 8 deletions galaxy/ansible/provision.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
---
- import_playbook: galaxy_root.yml
when: galaxy_root | bool
tags: galaxy_root

- import_playbook: galaxy_job_metrics.yml
when: galaxy_job_metrics | bool
tags: galaxy_job_metrics

- import_playbook: gravity.yml
when: galaxy_gravity | bool
tags: galaxy_gravity
Expand Down Expand Up @@ -74,3 +66,7 @@
- import_playbook: galaxy_job_conf.yml
when: galaxy_job_conf | bool
tags: galaxy_job_conf

- import_playbook: galaxy_job_metrics.yml
when: galaxy_job_metrics | bool
tags: galaxy_job_metrics
17 changes: 16 additions & 1 deletion galaxy/ansible/slurm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,23 @@
StateSaveLocation: /tmp/slurm
ReturnToService: 1
roles:
- role: galaxyproject.repos
- role: galaxyproject.slurm
# - role: galaxyproject.repos
tasks:
# The ppa repository addition task from galaxyproject.repos role is not working
# after setting "APT::Install-Recommends" to false by default. Hence, added the task manually.
# FAILED! => {"changed": false, "msg": "Failed to update apt cache: E:The repository 'http://ppa.launchpad.net/natefoo/slurm-drmaa/ubuntu sid Release' does not have a Release file."}
- name: Import the GPG signing key for the PPA
apt_key:
url: "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8DE68488997C5C6BA19021136F2CC56412788738"
state: present

- name: Add PPA repository for Slurm-DRMAA
apt_repository:
repo: "deb https://ppa.launchpadcontent.net/natefoo/slurm-drmaa/ubuntu {{ ansible_distribution_release }} main"
state: present
update_cache: yes

- name: Install slurm-drmaa package
package:
name: slurm-drmaa1
Expand Down Expand Up @@ -49,3 +63,4 @@
environment:
PYTHOPATH: null
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
become_user: "{{ galaxy_user_name }}"
2 changes: 1 addition & 1 deletion galaxy/ansible/templates/export_user_files.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ if __name__ == "__main__":
change_path( os.path.join('/tool_deps') )
change_path( os.path.join(galaxy_root_dir, 'tool-data') )
change_path( os.path.join(galaxy_root_dir, 'database') )
change_path( '/shed_tools/' )
change_path( '/tus_upload_store/' )

jyotipm29 marked this conversation as resolved.
Show resolved Hide resolved
if os.path.exists('/export/common_htpasswd'):
shutil.copy('/export/common_htpasswd', '/etc/nginx/htpasswd')
Expand Down
19 changes: 19 additions & 0 deletions galaxy/common_cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

set -x

# This usually drastically reduced the container size
# at the cost of the startup time of your application
find / -name '*.pyc' -delete

find / -name '*.log' -delete
find / -name '.cache' -delete
find / -name '.npm' -delete
jyotipm29 marked this conversation as resolved.
Show resolved Hide resolved
rm -rf /var/lib/apt/lists/*
rm -rf /var/cache/*
rm -rf /tmp/*
rm -rf /var/tmp/*

# https://askubuntu.com/questions/266738/how-to-truncate-all-logfiles
truncate -s 0 /var/log/*log || true
truncate -s 0 /var/log/**/*log || true
4 changes: 2 additions & 2 deletions galaxy/reports.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ reports:
#database_connection: postgresql://galaxy:galaxy@localhost:5432/galaxy?client_encoding=utf8

# Where dataset files are stored.
#file_path: database/files
file_path: database/files

# Where temporary files are stored.
#new_file_path: database/tmp
new_file_path: database/files
jyotipm29 marked this conversation as resolved.
Show resolved Hide resolved

# Mako templates are compiled as needed and cached for reuse, this
# directory is used for the cache
Expand Down
26 changes: 17 additions & 9 deletions galaxy/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ if [[ ! -z $PROXY_PREFIX ]]
then
echo "Configuring with proxy prefix: $PROXY_PREFIX"
export GALAXY_CONFIG_GALAXY_URL_PREFIX="$PROXY_PREFIX"
export GALAXY_CONFIG_INTERACTIVETOOLS_BASE_PATH="$PROXY_PREFIX"

# TODO: Set this using GALAXY_CONFIG_INTERACTIVETOOLS_BASE_PATH after gravity config manager is updated to handle env vars properly
ansible localhost -m replace -a "path=${GALAXY_CONFIG_FILE} regexp='^ #interactivetools_base_path:.*' replace=' interactivetools_base_path: ${PROXY_PREFIX}'" &> /dev/null

python3 /usr/local/bin/update_yaml_value "${GRAVITY_CONFIG_FILE}" "gravity.reports.url_prefix" "$PROXY_PREFIX/reports" &> /dev/null
jyotipm29 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -177,19 +179,25 @@ fi
if [[ ! -z $LOAD_GALAXY_CONDITIONAL_DEPENDENCIES ]]
then
echo "Installing optional dependencies in galaxy virtual environment..."
: ${GALAXY_WHEELS_INDEX_URL:="https://wheels.galaxyproject.org/simple"}
: ${PYPI_INDEX_URL:="https://pypi.python.org/simple"}
GALAXY_CONDITIONAL_DEPENDENCIES=$(PYTHONPATH=lib python -c "import galaxy.dependencies; print('\n'.join(galaxy.dependencies.optional('$GALAXY_CONFIG_FILE')))")
[ -z "$GALAXY_CONDITIONAL_DEPENDENCIES" ] || echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | pip install -q -r /dev/stdin --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}"
sudo -E -u $GALAXY_USER bash -c '
. $GALAXY_VIRTUAL_ENV/bin/activate
: ${GALAXY_WHEELS_INDEX_URL:="https://wheels.galaxyproject.org/simple"}
: ${PYPI_INDEX_URL:="https://pypi.python.org/simple"}
GALAXY_CONDITIONAL_DEPENDENCIES=$(PYTHONPATH=lib python -c "import galaxy.dependencies; print(\"\\n\".join(galaxy.dependencies.optional(\"$GALAXY_CONFIG_FILE\")))")
[ -z "$GALAXY_CONDITIONAL_DEPENDENCIES" ] || echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | pip install -q -r /dev/stdin --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}"
'
fi

if [[ ! -z $LOAD_GALAXY_CONDITIONAL_DEPENDENCIES ]] && [[ ! -z $LOAD_PYTHON_DEV_DEPENDENCIES ]]
then
echo "Installing development requirements in galaxy virtual environment..."
: ${GALAXY_WHEELS_INDEX_URL:="https://wheels.galaxyproject.org/simple"}
: ${PYPI_INDEX_URL:="https://pypi.python.org/simple"}
dev_requirements='./lib/galaxy/dependencies/dev-requirements.txt'
[ -f $dev_requirements ] && pip install -q -r $dev_requirements --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}"
sudo -E -u $GALAXY_USER bash -c '
. $GALAXY_VIRTUAL_ENV/bin/activate
: ${GALAXY_WHEELS_INDEX_URL:="https://wheels.galaxyproject.org/simple"}
: ${PYPI_INDEX_URL:="https://pypi.python.org/simple"}
dev_requirements="./lib/galaxy/dependencies/dev-requirements.txt"
[ -f $dev_requirements ] && pip install -q -r $dev_requirements --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}"
'
fi

# Enable Test Tool Shed
Expand Down