Commit 94cac6eb by Carson Gee

Merge pull request #277 from carsongee/app_server_listen_configurable

Allow configuration of IP Address of app servers to listen on
parents b98fbf5e 8883c170
......@@ -172,6 +172,11 @@ edxapp_lms_app_port: 8000
edxapp_lms_xml_app_port: 8030
edxapp_lms_preview_app_port: 8020
edxapp_cms_app_address: 127.0.0.1
edxapp_lms_app_address: 127.0.0.1
edxapp_lms_xml_app_address: 127.0.0.1
edxapp_lms_preview_app_address: 127.0.0.1
# These vars are for creating the application json config
# files. There are two for each service that uses the
# 'edx-platform' code. Defining them will create the upstart
......
......@@ -17,6 +17,7 @@ env WORKERS={{ ansible_processor|length * worker_core_mult.cms }}
env WORKERS={{ worker_core_mult.cms }}
{% endif %}
env PORT={{edxapp_cms_app_port}}
env ADDRESS={{edxapp_cms_app_address}}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=cms.envs.aws
env SERVICE_VARIANT="cms"
......@@ -24,4 +25,4 @@ env SERVICE_VARIANT="cms"
chdir {{edx_platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn_django -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} --settings=cms.envs.aws
exec {{venv_dir}}/bin/gunicorn_django -b $ADDRESS:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} --settings=cms.envs.aws
......@@ -18,6 +18,7 @@ env WORKERS={{ ansible_processor|length * worker_core_mult.lms_preview }}
env WORKERS={{ worker_core_mult.lms_preview }}
{% endif %}
env PORT={{edxapp_lms_preview_app_port}}
env ADDRESS={{edxapp_lms_preview_app_address}}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-preview"
......@@ -25,7 +26,7 @@ env SERVICE_VARIANT="lms-preview"
chdir {{edx_platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b $ADDRESS:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
post-start script
while true
......
......@@ -17,6 +17,7 @@ env WORKERS={{ ansible_processor|length * worker_core_mult.lms_xml }}
env WORKERS={{ worker_core_mult.lms_xml }}
{% endif %}
env PORT={{edxapp_lms_xml_app_port}}
env ADDRESS={{edxapp_lms_xml_app_address}}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-xml"
......@@ -24,7 +25,7 @@ env SERVICE_VARIANT="lms-xml"
chdir {{edx_platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b $ADDRESS:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
post-start script
while true
......
......@@ -15,6 +15,7 @@ env WORKERS={{ ansible_processor|length * worker_core_mult.lms }}
env WORKERS={{ worker_core_mult.lms }}
{% endif %}
env PORT={{edxapp_lms_app_port}}
env ADDRESS={{edxapp_lms_app_address}}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }}
env SERVICE_VARIANT="lms"
......@@ -22,7 +23,7 @@ env SERVICE_VARIANT="lms"
chdir {{edx_platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b $ADDRESS:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} lms.wsgi
post-start script
while true
......
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