Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front-end proxy (IDR-0.4.2) #41

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/group_vars/proxy-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nginx_proxy_websockets_enable: True
nginx_proxy_upstream_servers:
- name: omeroreadonly
balance: ip_hash
servers: "{{ omero_omeroreadonly_hosts }}"
servers: "{{ omero_omeroreadonly_hosts | sort }}"
- name: omeroreadwrite
servers: "{{ omero_omeroreadwrite_hosts }}"

Expand Down
24 changes: 24 additions & 0 deletions ansible/idr-omero.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,27 @@
# Vars are in group_vars/omero-hosts.yml

environment: "{{ idr_ANSIBLE_ENVIRONMENT_VARIABLES | default({}) }}"


# TODO: Replace with a template using
# https://github.com/openmicroscopy/openmicroscopy/pull/5387
- hosts: "{{ idr_environment | default('idr') }}-omeroreadwrite-hosts"

tasks:
- name: Set Nginx proxy timeout
become: yes
lineinfile:
insertafter: 'server\s*{'
path: /etc/nginx/conf.d/omero-web.conf
line: proxy_read_timeout {{ idr_omero_web_timeout }};
regexp: proxy_read_timeout\s+.*
state: present
notify:
- restart nginx

handlers:
- name: restart nginx
become: yes
service:
name: nginx
state: restarted