Skip to content

Commit 16bc67b

Browse files
committed
few more reviewed changes
1 parent 797bdd0 commit 16bc67b

File tree

3 files changed

+152
-1
lines changed

3 files changed

+152
-1
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ci
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
deploy-test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: check out repository
11+
uses: actions/checkout@v2
12+
13+
- name: Get current date
14+
id: date
15+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
16+
17+
- name: Create SSH key
18+
run: |
19+
install -m 600 -D /dev/null ~/.ssh/id_rsa
20+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
21+
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
22+
- name: Copy files to test instance and preserve secrets and hosts
23+
run: |
24+
rsync -rav * [email protected]:~/usegalaxy-${{ steps.date.outputs.date }}
25+
ssh [email protected] 'cp ~/usegalaxy/group_vars/secret.yml ~/usegalaxy-${{ steps.date.outputs.date }}/group_vars'
26+
ssh [email protected] 'cp ~/usegalaxy/hosts ~/usegalaxy-${{ steps.date.outputs.date }}'
27+
ssh [email protected] 'cp ~/usegalaxy/.vault-password.txt ~/usegalaxy-${{ steps.date.outputs.date }}'
28+
- name: Run playbook
29+
run: |
30+
# don't use "--force" here, some changes in roles were done manually and will be overwritten, see README.md
31+
ssh [email protected] 'cd ~/usegalaxy-${{ steps.date.outputs.date }} && ansible-galaxy install -p roles -r requirements.yml'
32+
ssh [email protected] 'cd ~/usegalaxy-${{ steps.date.outputs.date }} && ansible-playbook galaxy.yml'

README

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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

Comments
 (0)