Created
December 14, 2022 04:01
-
-
Save natefoo/4ed55868461ea795aa14cdbaba589f72 to your computer and use it in GitHub Desktop.
Playbook for installing Galaxy w/ galaxyproject.miniconda for deps and the Galaxy venv python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: galaxyservers | |
become: true | |
become_user: root | |
vars_files: | |
- group_vars/secret.yml | |
pre_tasks: | |
- name: Install Dependencies | |
apt: | |
#name: ['acl', 'bzip2', 'git', 'make', 'python3-psycopg2', 'tar', 'virtualenv'] | |
name: ['acl', 'bzip2', 'git', 'make', 'python3-psycopg2', 'tar', 'python3-venv', 'python3-setuptools'] | |
cache_valid_time: 3600 | |
- name: Conda package cache tempdir | |
tempfile: | |
state: directory | |
suffix: conda_pkg_cache | |
register: __conda_pkg_cache_tmpdir | |
post_tasks: | |
- name: Remove conda package cache tempdir | |
file: | |
path: "{{ __conda_pkg_cache_tmpdir.path }}" | |
state: absent | |
roles: | |
- galaxyproject.postgresql | |
- role: galaxyproject.postgresql_objects | |
become: true | |
become_user: postgres | |
# precreate user and paths so we can install conda | |
- role: galaxyproject.galaxy | |
galaxy_create_user: true | |
galaxy_manage_paths: true | |
galaxy_manage_clone: false | |
galaxy_manage_download: false | |
galaxy_manage_existing: false | |
galaxy_manage_static_setup: false | |
galaxy_manage_mutable_setup: false | |
galaxy_manage_database: false | |
galaxy_fetch_dependencies: false | |
galaxy_build_client: false | |
galaxy_manage_errordocs: false | |
galaxy_backup_configfiles: false | |
galaxy_manage_gravity: false | |
galaxy_manage_systemd: false | |
galaxy_manage_systemd_reports: false | |
galaxy_manage_cleanup: false | |
galaxy_systemd_mode: gravity | |
# install conda as the galaxy user | |
- role: galaxyproject.miniconda | |
become: true | |
become_user: "{{ galaxy_user.name }}" | |
# install python from the galaxy conda as root | |
- role: galaxyproject.miniconda | |
miniconda_conda_environments: | |
"{{ galaxy_root }}/python": | |
copy: true | |
packages: | |
- python=3.9 | |
environment: | |
# don't install into conda pkgs/ dir as root | |
CONDA_PKGS_DIRS: "{{ __conda_pkg_cache_tmpdir.path }}" | |
# install galaxy | |
- galaxyproject.galaxy | |
- galaxyproject.nginx | |
- galaxyproject.gxadmin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment