forked from ome/prod-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraining-server.yml
156 lines (138 loc) · 4.56 KB
/
training-server.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Install OMERO.server and OMERO.web with a public user on localhost
- hosts: outreach.openmicroscopy.org
pre_tasks:
- name: Install Make Movie script Prerequisite | MEncoder - Repo
become: yes
yum:
name: http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
state: present
- name: Install Make Movie script Prerequisite | MEncoder - Package
become: yes
yum:
name: mencoder
state: present
- name: OMERO.figure server-side prerequisites, script prerequisites + web server for decoupled OMERO.web
become: yes
yum:
name: "{{ item }}"
state: present
with_items:
# For OMERO.figure
- python-reportlab
- python-markdown
# For the 'make movie' script
- mencoder
- scipy
roles:
- role: openmicroscopy.postgresql
postgresql_databases:
- name: omero
postgresql_users:
- user: omero
password: omero
databases: [omero]
postgresql_version: "9.6"
- role: openmicroscopy.omero-server
omero_server_release: 5.4.1
- role: openmicroscopy.omero-web
omero_web_release: 5.4.1
# omero_web_config_set:
post_tasks:
- name: Omero.web plugins | plugin install via pip & pypi
become: yes
pip:
name:
- "omero-figure==3.1.2"
- "omero-fpbioimage==0.2.0"
- "omero-webtagging-autotag==3.0.2"
- "omero-webtagging-tagsearch==3.0.3"
- "omero-iviewer==0.4.1"
editable: False
state: present
# variable comes from role openmicroscopy.omero-web
virtualenv: "{{ omero_web_basedir }}/venv"
virtualenv_site_packages: yes
notify:
- restart omero-web
- name: Create a figure scripts directory
become: yes
file:
path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts
state: directory
mode: 0755
recurse: yes
owner: "omero-server"
group: "omero-server"
- name: Download the Figure_To_Pdf.py script
become: yes
get_url:
url: https://raw.githubusercontent.com/ome/omero-figure/v3.1.2/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py
mode: 0755
owner: "omero-server"
group: "omero-server"
- name: Create a cambridge_scripts directory
become: yes
file:
path: /opt/omero/server/OMERO.server/lib/scripts/omero/cambridge_scripts
state: directory
mode: 0755
recurse: yes
owner: "omero-server"
group: "omero-server"
- name: Download the Scipy_Gaussian_Filter.py script
become: yes
get_url:
url: https://raw.githubusercontent.com/jburel/omero-example-scripts/cambridge-training/cambridge-training-2017-12/Scipy_Gaussian_Filter.py
dest: /opt/omero/server/OMERO.server/lib/scripts/omero/cambridge_scripts/Scipy_Gaussian_Filter.py
mode: 0755
owner: "omero-server"
group: "omero-server"
force: yes
- name: Add DropBox folder for trainer-1
become: yes
file:
path: /OMERO/DropBox/trainer-1
state: directory
mode: 0755
recurse: yes
owner: "omero-server"
group: "omero-server"
- name: Add DropBox folders for user-1 to user-40
become: true
file:
path: /OMERO/DropBox/{{ item }}
state: directory
mode: 0775
owner: "omero-server"
group: "omero-server"
with_sequence: start=1 end=40 format=user-%d
# Config for OMERO.web plugins, loaded into OMERO.web by the
# omero.web systemd restart.
- name: Config for OMERO.web plugins
become: yes
template:
src: omero-web-config-for-webapps.j2
dest: "{{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero"
owner: "root"
group: "root"
mode: "u=rw,go=r"
notify:
- restart omero-web
- name: Set default viewer in OMERO.web
become: yes
template:
src: omero-web-config-default-viewer.j2
dest: "{{ omero_web_basedir }}/config/omero-web-config-default-viewer.omero"
owner: "root"
group: "root"
mode: "u=rw,go=r"
notify:
- restart omero-web
vars:
omero_web_public_password: public
omero_server_config_set:
omero.db.poolsize: 50
omero.jvmcfg.percent.blitz: 50
omero.jvmcfg.percent.indexer: 20
omero.jvmcfg.percent.pixeldata: 20