Build in a snap a Galaxy environment for a training classroom of 20-30 participants to allow high interactivity and shared practical work.
This Ansible playbook has been developed and tested on Debian and Ubuntu systems.
In order to use this playbook, you need:
List of roles included in this playbook:
- common place where variables available to all roles are defined.
- ansible-galaxy-os to configure the base operating system useful for running Galaxy.
- ansible-postgresql to setup the PostgreSQL server
- ansible-galaxy to configure the Galaxy server.
- ansible-gx-extras to configure several production services as Nginx, Uwsgi and Supervisor.
- ansible-galaxy-tools for automated installation of tools from a Tool Shed into Galaxy.
A first set of variables, that regulate the playbook execution, are available in group_vars/all:
- g4t_manage_os_setup: (default yes) to execute or not the ansible-galaxy-os role
- g4t_manage_db_setup: (default yes) to execute or not the ansible-postgresql role
- g4t_manage_galaxy: (default yes) to execute or not the ansible-galaxy role
- g4t_manage_extras: (default yes) to execute or not the ansible-gx-extras role
- g4t_manage_tools: (default no) to execute or not the ansible-galaxy-tools role
- g4t_manage_datasets: (default no) to execute or not the ansible-gx-datasets role
All the variables that can be configured to execute this playbook are
collected into
roles/common/vars/main.yml .
Apply your modifications there.
Since this repository makes use of submodules, you can pass the --recursive option to git clone and initialize all submodules:
git clone --recursive https://github.com/gmauro/galaxy4training
Clone the repository as described above, install the roles and then run the playbook:
ansible-galaxy install -p roles -r requirements.yml
ansible-playbook -i inventory g4t.yml -e galaxy_config['brand']='G4T' -e galaxy_config['admin_users'][email protected]
Easily prepare a development setup using Docker in this way:
-
Clone the repository
git clone --recursive https://github.com/gmauro/galaxy4training
-
Edit the code on your machine
-
start a docker container
docker run -p 8080:80 -v /path/to/galaxy4training:/galaxy4training --rm -ti gmauro/ansible:2.6_ubuntu16.04 /bin/bash
-
Start Galaxy deployment on the docker container
cd galaxy4training && ansible-galaxy install -p roles -r requirements.yml && ansible-playbook g4t.yml
-
Check the result on your browser at localhost