forked from usegalaxy-eu/infrastructure-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
galaxy-test.yml
142 lines (129 loc) · 5.28 KB
/
galaxy-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
- name: Test.UseGalaxy.eu
hosts: galaxy-test
become: true
become_user: root
vars:
# The full internal name.
hostname: test.internal.usegalaxy.eu
vars_files:
- group_vars/tiaas-test.yml # All of the training infrastructure
- group_vars/custom-sites.yml # Subdomains are listed here
- group_vars/gxconfig-test.yml # The base galaxy configuration
- group_vars/toolbox.yml # User controlled toolbox
- group_vars/cron-test.yml # Cron configuration for handlers restart
- secret_group_vars/aws.yml # AWS creds
- secret_group_vars/pulsar.yml # Pulsar + MQ Connections
- secret_group_vars/elixir_aai.yml # Elixir AAI private key
- secret_group_vars/db-test.yml # DB URL + some postgres stuff
- secret_group_vars/all.yml # All of the other assorted secrets...
handlers:
- name: Restart Galaxy
shell: |
echo 'Manual zergling restart required' && cd /opt/galaxy/ && source /opt/galaxy/.bashrc && sudo -u galaxy /usr/bin/galaxy-sync-to-nfs && systemctl restart galaxy-handler@* && systemctl restart galaxy-zergling@*
pre_tasks:
- name: Install Dependencies
package:
name: ['git', 'python-psycopg2', 'python-virtualenv', 'bc', 'python36']
become: yes
- name: Disable SELinux
selinux:
state: disabled
become: yes
post_tasks:
- name: Enable SELinux
selinux:
policy: targeted
state: enforcing
become: yes
roles:
# Normally we set hostname here, but we get an error so it is commented out:
# err=Could not get property: Failed to activate service 'org.freedesktop.hostname1': timed out
#- hostname
- usegalaxy-eu.dynmotd
## Dependencies
- geerlingguy.repo-epel # Install EPEL
# We want to exclude a couple of packages as we will fetch those
# dependencies from other repos: condor, node/npm
- hxr.exclude-repo
- linuxhq.yum_cron # keep all of our packages up to date
- hxr.admin-tools # Some extra admin tools (*top, vim, etc)
- influxdata.chrony # Keep our time in sync.
## Filesystems
- hxr.autofs # Setup the mount points which will be needed later
- galaxyproject.cvmfs # Galaxy datasets
## Monitoring
- hxr.monitor-cluster
- hxr.monitor-email
- hxr.monitor-uwsgi
- hxr.monitor-galaxy-journalctl
- dj-wasabi.telegraf
## remap user
- hxr.remap-user
# Setup Galaxy user
- role: galaxyproject.galaxy
vars:
galaxy_create_user: yes
galaxy_manage_clone: no
galaxy_manage_paths: yes
galaxy_manage_static_setup: no
galaxy_manage_mutable_setup: no
galaxy_manage_database: no
galaxy_fetch_dependencies: no
galaxy_build_client: no
# The bashrc needs to be created for several later features.
- role: usegalaxy-eu.bashrc
become_user: galaxy
## Setup docker
- geerlingguy.docker
# HTCondor Cluster setup
- htcondor
# Misc.
- role: hxr.galaxy-cron
become: yes
become_user: galaxy
- role: hxr.galaxy-nonreproducible-tools
become: yes
become_user: galaxy
- hxr.galaxy-misc
- usegalaxy-eu.dynmotd # nicer MOTD/welcome message
- usegalaxy-eu.rsync-to-nfs # sync codebase to NFS
- usegalaxy-eu.webhooks # Clone webhook repository
- usegalaxy-eu.tours # Clone tour repository
## SSL / Security
- ssh-host-sign # Sign the server host key to prevent TOFU for SSH
## GALAXY
- role: hxr.postgres-connection
become_user: galaxy
- usegalaxy-eu.gxadmin
# TODO move under monitoring + telegraf.
- usegalaxy-eu.galaxy-slurp
- usegalaxy-eu.google-verification
- galaxyproject.nginx
# The REAL galaxy role
- role: galaxyproject.galaxy
vars:
galaxy_create_user: yes
galaxy_manage_clone: yes
galaxy_manage_static_setup: yes
galaxy_manage_mutable_setup: yes
galaxy_manage_database: yes
galaxy_fetch_dependencies: yes
galaxy_build_client: yes
# Extras!
- hxr.install-to-venv # Some extra packages our site needs.
- usegalaxy-eu.galaxy-systemd # Manage the Galaxy processes with SystemD
- usegalaxy-eu.gie-node-proxy # Setup the NodeJS proxy (depends on NodeJS being already available)
- usegalaxy-eu.gie-deployer # Deploy the GIE configuration
- usegalaxy-eu.subdomain-themes # Custom subdomain themes
- usegalaxy-eu.limits # Prevent out of control processes
- usegalaxy-eu.galaxy-cleanup # Cleanup purged datasets/histories/etc >60 days old
# Various ugly fixes
- usegalaxy-eu.fix-unscheduled-jobs # Workaround for ???
- usegalaxy-eu.fix-oidc # Workaround for https://github.com/galaxyproject/galaxy/issues/8244
- usegalaxy-eu.fix-unscheduled-workflows # Workaround for https://github.com/galaxyproject/galaxy/issues/8209
- usegalaxy-eu.fix-failing-to-fail-jobs # Workaround for https://github.com/galaxyproject/galaxy/issues/8171, maybe can be removed in 19.09?
- usegalaxy-eu.fix-stuck-handlers # Restart handlers to prevent several classes of issues
- usegalaxy-eu.log-cleaner # do not retain logs, they are unnecessary/risky under GDPR
#- dev-sec.os-hardening
#- dev-sec.ssh-hardening