Commit a6629604 by John Jarvis

adding lists of hosts for nginx backends

parent 9403d5be
......@@ -4,6 +4,18 @@ pkgs:
nginx:
state: installed
nginx_xserver_gunicorn_hosts:
- 127.0.0.1
nginx_xqueue_gunicorn_hosts:
- 127.0.0.1
nginx_ora_gunicorn_hosts:
- 127.0.0.1
nginx_lms_gunicorn_hosts:
- 127.0.0.1
nginx_lms_preview_gunicorn_hosts:
- 127.0.0.1
nginx_cms_gunicorn_hosts:
- 127.0.0.1
nginx_cfg:
# - link - turn on
......
upstream cms-backend {
# For a TCP configuration:
server {{ edxapp_cms_gunicorn_host }}:{{ edxapp_cms_gunicorn_port }} fail_timeout=0;
{% for host in nginx_cms_gunicorn_hosts %}
server {{ host }}:{{ edxapp_cms_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
upstream lms-preview-backend {
# For a TCP configuration:
server {{ edxapp_lms_preview_gunicorn_host }}:{{ edxapp_lms_preview_gunicorn_port }} fail_timeout=0;
{% for host in nginx_lms_preview_gunicorn_hosts %}
server {{ host }}:{{ edxapp_lms_preview_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
upstream lms-backend {
# For a TCP configuration:
server {{ edxapp_lms_gunicorn_host }}:{{ edxapp_lms_gunicorn_port }} fail_timeout=0;
{% for host in nginx_lms_gunicorn_hosts %}
server {{ host }}:{{ edxapp_lms_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
upstream app_server {
# For a TCP configuration:
server {{ ora_gunicorn_host }}:{{ ora_gunicorn_port }} fail_timeout=0;
{% for host in nginx_ora_gunicorn_hosts %}
server {{ host }}:{{ ora_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
upstream xqueue_app_server {
# For a TCP configuration:
server {{ xqueue_gunicorn_host }}:{{ xqueue_gunicorn_port }} fail_timeout=0;
{% for host in nginx_xqueue_gunicorn_hosts %}
server {{ host }}:{{ xqueue_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
......@@ -9,8 +9,9 @@
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
upstream xserver_app_server {
# For a TCP configuration:
server {{ xserver_gunicorn_host }}:{{ xserver_gunicorn_port }} fail_timeout=0;
{% for host in nginx_xserver_gunicorn_hosts %}
server {{ host }}:{{ xserver_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment