Commit eaa45694 by Jason Bau

prepping lms-preview role for PR

parent 9e01fcdf
# gunicorn
description "gunicorn server"
author "Calen Pennington <cpennington@mitx.mit.edu>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 3 30
env PID=/var/tmp/lms.pid
#env NEW_RELIC_CONFIG_FILE=${app_base_dir}/newrelic.ini
#env NEWRELIC=${venv_dir}/bin/newrelic-admin
env WORKERS={{ ansible_processor_cores * 2 }}
env PORT=8020
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-preview"
chdir ${app_base_dir}/mitx
setuid www-data
exec ${venv_dir}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath=${app_base_dir}/mitx lms.wsgi
post-start script
while true
do
if $(curl -s -i localhost:$PORT/heartbeat | egrep -q '200 OK'); then
break;
else
sleep 1;
fi
done
end script
{{ lms_auth_config | to_nice_json }}
{{ lms_preview_auth_config | to_nice_json }}
{{ lms_env_config | to_nice_json }}
{{ lms_preview_env_config | to_nice_json }}
---
lms_auth_config:
#Use YAML references (& and *) and hash merge <<: to factor out shared settings
#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
lms_auth_config: &lms_auth
'ANALYTICS_API_KEY': 'hidden-prod'
'AWS_ACCESS_KEY_ID': 'hidden-prod'
'AWS_SECRET_ACCESS_KEY': 'hidden-prod'
......@@ -17,7 +19,7 @@ lms_auth_config:
'USER': 'hidden-prod'}
'MODULESTORE':
'default':
'OPTIONS':
'OPTIONS': &lms_modulestore_default_options
'collection': 'hidden-prod'
'db': 'hidden-prod'
'default_class': 'hidden-prod'
......@@ -39,7 +41,7 @@ lms_auth_config:
'username': 'hidden-prod'}
'url': 'hidden-prod'
lms_env_config:
lms_env_config: &lms_env
'SYSLOG_SERVER': 'hidden-prod'
'SITE_NAME': 'hidden-prod'
'LOG_DIR': 'hidden-prod'
......@@ -51,7 +53,7 @@ lms_env_config:
'ADMINS' :
- ['name', 'email']
'TIME_ZONE': 'America/New_York'
'CACHES':
'CACHES': &lms_caches
'default':
'KEY_PREFIX': 'hidden-prod'
'LOCATION': [ 'hidden-prod',
......@@ -144,4 +146,23 @@ cms_env_config:
'DISABLE_COURSE_CREATION': false
'SEGMENT_IO': false
lms_preview_auth_config:
<<: *lms_auth
'MODULESTORE':
'default':
'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore'
'OPTIONS': *lms_modulestore_default_options
lms_preview_env_config:
<<: *lms_env
'SITE_NAME': 'preview.class.stanford.edu'
'COMMENTS_SERVICE_KEY': false
'CACHES':
<<: *lms_caches
'general':
'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache'
'KEY_PREFIX': 'preview.edx.org'
'KEY_FUNCTION': 'util.memcache.safe_key'
'LOCATION': [ 'vpc-974dbeff-cache.oyg26r.0001.usw1.cache.amazonaws.com:12345',
'vpc-974dbeff-cache.oyg26r.0002.usw1.cache.amazonaws.com:12345' ]
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