Commit dd147732 by Feanil Patel

Set default sites based on a new variable.

parent 122c05f8
......@@ -16,3 +16,5 @@
- ora
- xqueue
- xserver
nginx_default_sites:
- lms
......@@ -14,6 +14,8 @@
- ora
- xqueue
- xserver
nginx_default_sites:
- lms
- edxlocal
- mongo
- edxapp
......
......@@ -20,6 +20,8 @@
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
......@@ -38,6 +40,8 @@
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True
......
......@@ -12,6 +12,8 @@
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
edx_platform_version: 'release'
......@@ -29,6 +31,8 @@
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True
......
......@@ -22,6 +22,8 @@
- xqueue
- xserver
- ora
nginx_default_sites:
- lms
- edxlocal
- mongo
- edxapp
......
......@@ -42,6 +42,9 @@
- ora
- xqueue
- xserver
nginx_default_sites:
- lms
- cms
# gh_users hash must be passed
# in as a -e variable
- gh_users
......
......@@ -30,6 +30,8 @@
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
migrate_db: '{{ RUN_EDXAPP_MIGRATION }}'
......@@ -49,6 +51,8 @@
- lms
- cms
- lms-preview
nginx_default_site:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
- splunkforwarder
......@@ -65,6 +69,8 @@
- lms
- cms
- lms-preview
nginx_default_site:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True
......
......@@ -7,6 +7,8 @@
roles:
- role: nginx
nginx_sites:
- lms
- cms
- lms
- cms
nginx_default_sites:
- lms
- edxapp
......@@ -20,6 +20,9 @@
- lms
- ora
- xqueue
nginx_default_sites:
- lms
- cms
- edxlocal
- mongo
- edxapp
......
{%- if "cms" in nginx_default_sites -%}
{%- set default_site = "default" -%}
{%- endif -%}
upstream cms-backend {
{% for host in nginx_cms_gunicorn_hosts %}
server {{ host }}:{{ edxapp_cms_gunicorn_port }} fail_timeout=0;
......@@ -9,14 +13,14 @@ server {
{% if NGINX_ENABLE_SSL %}
listen {{EDXAPP_CMS_NGINX_PORT}};
listen {{EDXAPP_CMS_NGINX_PORT}} {{default_site}};
listen {{EDXAPP_CMS_SSL_NGINX_PORT}} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
{% else %}
listen {{EDXAPP_CMS_NGINX_PORT}} default;
listen {{EDXAPP_CMS_NGINX_PORT}} {{default_site}};
{% endif %}
......
{%- if "cms" in nginx_default_sites -%}
{%- set default_site = "default" -%}
{%- endif -%}
upstream lms-backend {
{% for host in nginx_lms_gunicorn_hosts %}
server {{ host }}:{{ edxapp_lms_gunicorn_port }} fail_timeout=0;
......@@ -9,14 +13,14 @@ server {
{% if NGINX_ENABLE_SSL %}
listen {{EDXAPP_LMS_NGINX_PORT}} default;
listen {{EDXAPP_LMS_SSL_NGINX_PORT}} default ssl;
listen {{EDXAPP_LMS_NGINX_PORT}} {{default_site}};
listen {{EDXAPP_LMS_SSL_NGINX_PORT}} {{default_site}} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
{% else %}
listen {{EDXAPP_LMS_NGINX_PORT}} default;
listen {{EDXAPP_LMS_NGINX_PORT}} {{default_site}};
{% endif %}
access_log {{ nginx_log_dir }}/access.log;
......
......@@ -18,6 +18,9 @@
- lms
- ora
- xqueue
nginx_default_sites:
- lms
- cms
- edxlocal
- mongo
- edxapp
......
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