Commit 40ec6855 by John Jarvis

Merge pull request #294 from edx/jarv/edxapp-port-config

making lms/preview/cms ports env vars
parents d71991c9 abdc05dc
......@@ -18,8 +18,8 @@
- datadog
- nginx
- role: 'edxapp'
lms_nginx_port: 80
cms_nginx_port: 80
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
edxapp_lms_env: 'lms.envs.load_test'
edx_platform_commit: 'sarina/install-datadog'
- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_worker
......
......@@ -10,8 +10,8 @@
- datadog
- nginx
- role: 'edxapp'
lms_nginx_port: 80
cms_nginx_port: 80
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
edxapp_lms_env: 'lms.envs.load_test'
edx_platform_commit: 'master'
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_group_worker
......
......@@ -12,7 +12,7 @@
# lms listening on port 80 - example.com
# lms-preview listening on port 80 - preview.example.com
#
# ansible-playbook -c local --limit "localhost:127.0.0.1" path/to/configuration/playbooks/edx_sandbox.yml -i "localhost," -e "cms_nginx_port=80 lms_preview_nginx_port=80 c_lms_base=example.com c_preview_lms_base=preview.example.com"
# ansible-playbook -c local --limit "localhost:127.0.0.1" path/to/configuration/playbooks/edx_sandbox.yml -i "localhost," -e "EDXAPP_CMS_NGINX_PORT=80 EDXAPP_LMS_PREVIEW_NGINX_PORT=80 EDXAPP_LMS_BASE=example.com EDXAPP_PREVIEW_LMS_BASE=preview.example.com"
#
- name: Configure instance(s)
hosts: localhost
......
......@@ -78,6 +78,10 @@ EDXAPP_SYSLOG_SERVER: ''
EDXAPP_RABBIT_HOSTNAME: 'rabbit.{{ENV_NAME}}.vpc.edx.org'
EDXAPP_XML_MAPPINGS: {}
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_LMS_PREVIEW_NGINX_PORT: 18020
EDXAPP_CMS_NGINX_PORT: 18010
#-------- Everything below this line is internal to the role ------------
......@@ -227,19 +231,15 @@ lms_preview_env_config:
# install dir for the edx-platform repo
edx_platform_code_dir: "{{ app_base_dir }}/edx-platform"
# Default nginx listen ports
# These should be overrided if you want
# to serve all content on port 80
lms_nginx_port: 80
lms_preview_nginx_port: 18020
cms_nginx_port: 18010
# gunicorn ports, these shouldn't need to be overridden
edxapp_cms_app_port: 8010
edxapp_lms_app_port: 8000
edxapp_lms_preview_app_port: 8020
edxapp_cms_app_address: 127.0.0.1
edxapp_lms_app_address: 127.0.0.1
edxapp_lms_preview_app_address: 127.0.0.1
......
server {
# CMS configuration file for nginx, templated by ansible
listen {{cms_nginx_port}};
listen {{EDXAPP_CMS_NGINX_PORT}};
server_name studio.*;
......
server {
# LMS-preview configuration file for nginx, templated by ansible
listen {{lms_preview_nginx_port}};
listen {{EDXAPP_LMS_PREVIEW_NGINX_PORT}};
server_name preview.*;
......
server {
# LMS configuration file for nginx, templated by ansible
listen {{lms_nginx_port}} default;
listen {{EDXAPP_LMS_NGINX_PORT}} default;
access_log {{log_base_dir}}/nginx/access.log;
error_log {{log_base_dir}}/nginx/error.log error;
......
......@@ -11,4 +11,4 @@
- common
- nginx
- edxlocal
- { role: 'edxapp', lms_nginx_port: 18030, lms_xml_nginx_port: 80 }
- { role: 'edxapp', EDXAPP_LMS_NGINX_PORT: 18030, EDXAPP_LMS_XML_NGINX_PORT: 80 }
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