|
| 1 | +# usegalaxy |
| 2 | + |
| 3 | +Simple galaxy installation steps. |
| 4 | + |
| 5 | +On fresh install of ubuntu: |
| 6 | +``` |
| 7 | +sudo apt-get update |
| 8 | +sudo apt-get upgrade -y |
| 9 | +sudo apt update |
| 10 | +sudo apt upgrade -y |
| 11 | +sudo apt install -y software-properties-common |
| 12 | +sudo apt-add-repository --yes --update ppa:ansible/ansible |
| 13 | +sudo apt install -y ansible |
| 14 | +``` |
| 15 | + |
| 16 | +Clone the repo and instal required galaxy roles. |
| 17 | +``` |
| 18 | +git clone https://github.com/CESNET/usegalaxy.git |
| 19 | +cd usegalaxy |
| 20 | +ansible-galaxy install -p roles -r requirements.yml |
| 21 | +``` |
| 22 | +Note that the roles are already present in this repo. |
| 23 | + |
| 24 | +After the instalation, you should configure your [inventory file](https://training.galaxyproject.org/training-material/topics/admin/tutorials/ansible/tutorial.html#inventory-file) ([hosts](https://github.com/CESNET/usegalaxy/blob/main/hosts)) and set up a vault: |
| 25 | +``` |
| 26 | +openssl rand -base64 24 > .vault-password.txt |
| 27 | +ansible-vault create group_vars/secret.yml |
| 28 | +``` |
| 29 | +The second command opens an editor wherein you should define variables eg.: |
| 30 | +``` |
| 31 | +vault_id_secret: "a-long-random-value" |
| 32 | +rabbitmq_users_password: |
| 33 | + mqadmin: "a-long-random-value" |
| 34 | + galaxy: "a-long-random-value" |
| 35 | + galaxy_gpu: "a-long-random-value" |
| 36 | +``` |
| 37 | +The value should be a long random value, which can be obtained by command `openssl rand -base64 24`, though you should avoid having a `/` or `\` in your password as galaxy will interpret this as a path. |
| 38 | + |
| 39 | +Make sure you have these ports enabled on your machine: |
| 40 | +``` |
| 41 | +80(HTTP) |
| 42 | +443(HTTPS) |
| 43 | +4369(TCP) |
| 44 | +5671(TCP) |
| 45 | +15672(TCP) |
| 46 | +25672(TCP) |
| 47 | +``` |
| 48 | + |
| 49 | +Once everything have been installed and configured, the ansible playbook can be run as follows: |
| 50 | +``` |
| 51 | +ansible-playbook galaxy.yml |
| 52 | +``` |
| 53 | + |
| 54 | +## Usegalaxy tools |
| 55 | + |
| 56 | +Install ephemeris for tool management: |
| 57 | +``` |
| 58 | +virtualenv -p python3 ~/ephemeris_venv |
| 59 | +. ~/ephemeris_venv/bin/activate |
| 60 | +pip install ephemeris |
| 61 | +``` |
| 62 | +To obtain the list of tools from the [usegalaxy.eu](https://usegalaxy.eu) use: |
| 63 | +``` |
| 64 | +get-tool-list -g "https://usegalaxy.eu" -o "eu_tool_list.yaml" |
| 65 | +``` |
| 66 | +and then to install them: |
| 67 | +``` |
| 68 | +shed-tools install -g https://your-galaxy -a <api-key> -t eu_tool_list.yaml |
| 69 | +``` |
| 70 | +The api key can be found in the User -> Preferences -> Manage API Key in Galaxy menu. |
| 71 | + |
| 72 | +... |
| 73 | + |
| 74 | +Later we should use this [role](https://github.com/galaxyproject/ansible-galaxy-tools) to automate this, but there are too many tools to be installed and it is very inpractical for testing purposes. |
| 75 | + |
| 76 | +## Debian 11 |
| 77 | + |
| 78 | +### TUS |
| 79 | + |
| 80 | +On ubuntu < 22.04 and Debian < 12 the GLIBC version is incompatible with the ```galaxyproject.tusd``` GLIBC, therfore playbook ends in error. |
| 81 | +- in `roles/galaxyproject.tusd/defaults/main.yml` you have to set the `tusd_version:` to 'v1.8.0' (tested, possibly higher) |
| 82 | + |
| 83 | +### Ansible |
| 84 | + |
| 85 | +On Debian 11 the default version of `ansible` is 2.10.08 which fails to extract binaries for TUSd. |
| 86 | +- workaround: |
| 87 | + - because of Puppet, we need to create dedicated sources.list file for ansible |
| 88 | + - `sudo vim /etc/apt/sources.list.d/ansible_ubuntu_focal_main.list` add this line : `deb http://ppa.launchpad.net/ansible/ansible/ubuntu focal main` |
| 89 | + - then `sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367` |
| 90 | + - followed by `sudo apt-get update` and `sudo apt-get install ansible -y` |
| 91 | +- Note that you might need to `sudo apt remove ansible` `sudo apt autoremove` before you try to install ansible. |
| 92 | + |
| 93 | +### Nginx Upload Module |
| 94 | + |
| 95 | +Our playbook makes use of `nginx-upload-module`, which is not included by default in any nginx-* distribution from `apt`. |
| 96 | +This is a simple recipe for installing nginx with the upload-module. |
| 97 | + |
| 98 | +``` |
| 99 | +sudo apt remove *nginx* -y && |
| 100 | +sudo apt autoremove -y && |
| 101 | + |
| 102 | +wget http://nginx.org/download/nginx-1.24.0.tar.gz && |
| 103 | +tar -xzf nginx-1.24.0.tar.gz && |
| 104 | +cd nginx-1.24.0/ && |
| 105 | +git clone https://github.com/hongzhidao/nginx-upload-module.git && |
| 106 | +sudo apt-get install -y libpcre3 libpcre3-dev libssl-dev zlib1g-dev && |
| 107 | +./configure --user=nginx --group=nginx --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin/nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module --add-module=nginx-upload-module && |
| 108 | +make && make install |
| 109 | +``` |
| 110 | + |
| 111 | +Note that you might need to `sudo systemctl unmask nginx.service` and remove the `galaxy` and `redirect-ssl` from `/etc/nginx/sites-available and `/etc/nginx/sites-enabled` before running the playbook again. |
| 112 | + |
| 113 | +### Other issues |
| 114 | + |
| 115 | + |
| 116 | +Use `sudo apt install python3-docker` before running the `usegalaxy.rabbitmqserver` role. |
| 117 | + |
| 118 | +For influxdb apt key error: https://www.influxdata.com/blog/linux-package-signing-key-rotation/ |
| 119 | + |
| 120 | +For proftpd add "LoadModule mod_tls.c" to roles/galaxyproject.proftpd/templates/tls.conf.j2 just before the TLSEngine |
0 commit comments