Commit 55778595 by Feanil Patel

Update for flattened vars.

parent 1fbc5a38
...@@ -10,80 +10,101 @@ ...@@ -10,80 +10,101 @@
# These are custom variables that can be overridden # These are custom variables that can be overridden
# on the command line to change specific values in the hash # on the command line to change specific values in the hash
LMS_BASE: '' EDXAPP_LMS_BASE: ''
PREVIEW_LMS_BASE: '' EDXAPP_PREVIEW_LMS_BASE: ''
CMS_BASE: '' EDXAPP_CMS_BASE: ''
AWS_ACCESS_KEY_ID: '' EDXAPP_AWS_ACCESS_KEY_ID: ''
AWS_SECRET_ACCESS_KEY: '' EDXAPP_AWS_SECRET_ACCESS_KEY: ''
XQUEUE_BASIC_AUTH: [ 'edx', 'edx' ] EDXAPP_XQUEUE_BASIC_AUTH: [ 'edx', 'edx' ]
XQUEUE_DJANGO_AUTH: EDXAPP_XQUEUE_DJANGO_AUTH:
username: 'lms' username: 'lms'
password: 'password' password: 'password'
MONGO_HOST: ['localhost'] EDXAPP_MONGO_HOST: ['localhost']
MONGO_PASSWORD: 'password' EDXAPP_MONGO_PASSWORD: 'password'
MONGO_PORT: 27017 EDXAPP_MONGO_PORT: 27017
MONGO_USER: 'mongo' EDXAPP_MONGO_USER: 'mongo'
MYSQL_DB_NAME: 'edxapp' EDXAPP_MYSQL_DB_NAME: 'edxapp'
MYSQL_USER: 'root' EDXAPP_MYSQL_USER: 'root'
MYSQL_PASSWORD: '' EDXAPP_MYSQL_PASSWORD: ''
MYSQL_HOST: 'localhost' EDXAPP_MYSQL_HOST: 'localhost'
MYSQL_PORT: '3306' EDXAPP_MYSQL_PORT: '3306'
EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend' EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
LOG_LEVEL: 'INFO' EDXAPP_LOG_LEVEL: 'INFO'
MEMCACHE: [ 'localhost:11211' ] EDXAPP_MEMCACHE: [ 'localhost:11211' ]
COMMENTS_SERVICE_URL: 'http://localhost:4567' EDXAPP_COMMENTS_SERVICE_URL: 'http://localhost:4567'
COMMENTS_SERVICE_KEY: 'password' EDXAPP_COMMENTS_SERVICE_KEY: 'password'
EDXAPP_SECRET_KEY: '' EDXAPP_EDXAPP_SECRET_KEY: ''
PEARSON_TEST_PASWORD: '' EDXAPP_PEARSON_TEST_PASWORD: ''
OEE_URL: 'http://localhost:18091/' EDXAPP_OEE_URL: 'http://localhost:18091/'
OEE_USER: 'lms' EDXAPP_OEE_USER: 'lms'
OEE_PASSWORD: 'password' EDXAPP_OEE_PASSWORD: 'password'
ANALYTICS_API_KEY: '' EDXAPP_ANALYTICS_API_KEY: ''
ZENDESK_USER: '' EDXAPP_ZENDESK_USER: ''
ZENDESK_API_KEY: '' EDXAPP_ZENDESK_API_KEY: ''
CELERY_USER: 'celery' EDXAPP_CELERY_USER: 'celery'
CELERY_PASSWORD: '' EDXAPP_CELERY_PASSWORD: ''
EDXAPP_MITX_FEATURES:
AUTH_USE_OPENID_PROVIDER: true
CERTIFICATES_ENABLED: true
ENABLE_DISCUSSION_SERVICE: true
ENABLE_INSTRUCTOR_ANALYTICS: true
ENABLE_PEARSON_HACK_TEST: false
SUBDOMAIN_BRANDING: false
SUBDOMAIN_COURSE_LISTINGS: false
PREVIEW_LMS_BASE: $EDXAPP_PREVIEW_LMS_BASE
EDXAPP_BOOK_URL: ''
EDXAPP_SITE_NAME: 'example.com'
EDXAPP_MEDIA_URL: ''
EDXAPP_ANALYTICS_SERVER_URL: ''
EDXAPP_FEEDBACK_SUBMISSION_EMAIL: ''
EDXAPP_CELERY_BROKER_HOSTNAME: ''
EDXAPP_LOGGING_ENV: 'sandbox'
EDXAPP_SYSLOG_SERVER: ''
EDXAPP_RABBIT_HOSTNAME: 'rabbit.{{ENV_NAME}}.vpc.edx.org'
#Use YAML references (& and *) and hash merge <<: to factor out shared settings #Use YAML references (& and *) and hash merge <<: to factor out shared settings
#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ #see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
edxapp_generic_auth_config: &edxapp_generic_auth edxapp_generic_auth_config: &edxapp_generic_auth
'AWS_ACCESS_KEY_ID': "{{AWS_ACCESS_KEY_ID}}" 'AWS_ACCESS_KEY_ID': $EDXAPP_AWS_ACCESS_KEY_ID
'AWS_SECRET_ACCESS_KEY': "{{AWS_SECRET_ACCESS_KEY}}" 'AWS_SECRET_ACCESS_KEY': $EDXAPP_AWS_SECRET_ACCESS_KEY
'SECRET_KEY': '{{EDXAPP_SECRET_KEY}}' 'SECRET_KEY': $EDXAPP_EDXAPP_SECRET_KEY
'XQUEUE_INTERFACE': 'XQUEUE_INTERFACE':
'basic_auth': $XQUEUE_BASIC_AUTH 'basic_auth': $EDXAPP_XQUEUE_BASIC_AUTH
'django_auth': $XQUEUE_DJANGO_AUTH 'django_auth': $EDXAPP_XQUEUE_DJANGO_AUTH
'url': "{{XQUEUE_URL}}" 'url': $EDXAPP_XQUEUE_URL
'CONTENTSTORE': 'CONTENTSTORE':
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore' 'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore'
'OPTIONS': 'OPTIONS':
'db': '{{MONGO_DB_NAME}}' 'db': $EDXAPP_MONGO_DB_NAME
'host': $MONGO_HOSTS 'host': $EDXAPP_MONGO_HOSTS
'password': '{{MONGO_PASSWORD}}' 'password': $EDXAPP_MONGO_PASSWORD
'port': '{{MONGO_PORT}}' 'port': $EDXAPP_MONGO_PORT
'user': '{{MONGO_USER}}' 'user': $EDXAPP_MONGO_USER
'MODULESTORE': 'MODULESTORE':
'default': 'default':
'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore' 'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore'
'OPTIONS': &generic_modulestore_default_options 'OPTIONS': &generic_modulestore_default_options
'collection': 'modulestore' 'collection': 'modulestore'
'db': 'edxapp' 'db': $EDXAPP_MONGO_DB_NAME
'default_class': 'xmodule.hidden_module.HiddenDescriptor' 'default_class': 'xmodule.hidden_module.HiddenDescriptor'
'fs_root': '/opt/wwc/data' 'fs_root': '/opt/wwc/data'
'host': $MONGO_HOSTS 'host': $EDXAPP_MONGO_HOSTS
'password': '{{MONGO_PASSWORD}}' 'password': $EDXAPP_MONGO_PASSWORD
'port': '{{MONGO_PORT}}' 'port': $EDXAPP_MONGO_PORT
'render_template': 'mitxmako.shortcuts.render_to_string' 'render_template': 'mitxmako.shortcuts.render_to_string'
'user': '{{MONGO_USER}}' 'user': $EDXAPP_MONGO_USER
# Needed for the CMS to be able to run update_templates # Needed for the CMS to be able to run update_templates
'direct': 'direct':
'ENGINE': 'xmodule.modulestore.mongo.MongoModuleStore' 'ENGINE': 'xmodule.modulestore.mongo.MongoModuleStore'
...@@ -91,57 +112,48 @@ edxapp_generic_auth_config: &edxapp_generic_auth ...@@ -91,57 +112,48 @@ edxapp_generic_auth_config: &edxapp_generic_auth
'DATABASES': 'DATABASES':
'default': 'default':
'ENGINE': 'django.db.backends.mysql' 'ENGINE': 'django.db.backends.mysql'
'NAME': '{{MYSQL_DB_NAME}}' 'NAME': $EDXAPP_MYSQL_DB_NAME
'USER': '{{MYSQL_USER}}' 'USER': $EDXAPP_MYSQL_USER
'PASSWORD': '{{MYSQL_PASSWORD}}' 'PASSWORD': $EDXAPP_MYSQL_PASSWORD
'HOST': '{{MYSQL_HOST}}' 'HOST': $EDXAPP_MYSQL_HOST
'PORT': '3306' 'PORT': $EDXAPP_MYSQL_PORT
'PEARSON_TEST_PASSWORD': '{{PEARSON_TEST_PASSWORD}}' 'PEARSON_TEST_PASSWORD': $EDXAPP_PEARSON_TEST_PASSWORD
'OPEN_ENDED_GRADING_INTERFACE': 'OPEN_ENDED_GRADING_INTERFACE':
'url': '{{OEE_URL}}' 'url': $EDXAPP_OEE_URL
'password': '{{OEE_PASSWORD}}' 'password': $EDXAPP_OEE_PASSWORD
'peer_grading': 'peer_grading' 'peer_grading': 'peer_grading'
'staff_grading': 'staff_grading' 'staff_grading': 'staff_grading'
'grading_controller': 'grading_controller' 'grading_controller': 'grading_controller'
'username': '{{OEE_USER}}' 'username': $EDXAPP_OEE_USER
'ANALYTICS_API_KEY': '{{ANALYTICS_API_KEY}}' 'ANALYTICS_API_KEY': $EDXAPP_ANALYTICS_API_KEY
'ZENDESK_USER': '{{ZENDESK_USER}}' 'ZENDESK_USER': $EDXAPP_ZENDESK_USER
'ZENDESK_API_KEY': '{{ZENDESK_API_KEY}}' 'ZENDESK_API_KEY': $EDXAPP_ZENDESK_API_KEY
'CELERY_BROKER_USER': '{{CELERY_USER}}' 'CELERY_BROKER_USER': $EDXAPP_CELERY_USER
'CELERY_BROKER_PASSWORD': '{{CELERY_PASSWORD}}' 'CELERY_BROKER_PASSWORD': $EDXAPP_CELERY_PASSWORD
'BOOK_URL': ''
generic_env_config: &edxapp_generic_env generic_env_config: &edxapp_generic_env
'LMS_BASE': "{{LMS_BASE}}" 'LMS_BASE': $EDXAPP_LMS_BASE
'CMS_BASE': "{{CMS_BASE}}" 'CMS_BASE': $EDXAPP_CMS_BASE
'BOOK_URL': '{{BOOK_URL}}' 'BOOK_URL': $EDXAPP_BOOK_URL
'CERT_QUEUE': 'certificates' 'CERT_QUEUE': 'certificates'
'LOCAL_LOGLEVEL': '{{LOG_LEVEL}}' 'LOCAL_LOGLEVEL': $EDXAPP_LOG_LEVEL
# default email backed set to local SMTP # default email backed set to local SMTP
'EMAIL_BACKEND': '{{EMAIL_BACKEND}}' 'EMAIL_BACKEND': $EDXAPP_EMAIL_BACKEND
'MITX_FEATURES': 'MITX_FEATURES': $EDXAPP_MITX_FEATURES
'AUTH_USE_OPENID_PROVIDER': true
'CERTIFICATES_ENABLED': true
'ENABLE_DISCUSSION_SERVICE': true
'ENABLE_INSTRUCTOR_ANALYTICS': true
'ENABLE_PEARSON_HACK_TEST': false
'SUBDOMAIN_BRANDING': false
'SUBDOMAIN_COURSE_LISTINGS': false
'PREVIEW_LMS_BASE': "{{PREVIEW_LMS_BASE}}"
'WIKI_ENABLED': true 'WIKI_ENABLED': true
'SYSLOG_SERVER': 'syslog.a.m.i4x.org' 'SYSLOG_SERVER': $EDXAPP_SYSLOG_SERVER
'SITE_NAME': 'example.com' 'SITE_NAME': $EDXAPP_SITE_NAME
'LOG_DIR': '/mnt/logs/edx' 'LOG_DIR': '/mnt/logs/edx'
'MEDIA_URL': '' 'MEDIA_URL': $EDXAPP_MEDIA_URL
'ANALYTICS_SERVER_URL': '' 'ANALYTICS_SERVER_URL': $EDXAPP_ANALYTICS_SERVER_URL
'FEEDBACK_SUBMISSION_EMAIL': '' 'FEEDBACK_SUBMISSION_EMAIL': $EDXAPP_FEEDBACK_SUBMISSION_EMAIL
'TIME_ZONE': 'America/New_York' 'TIME_ZONE': 'America/New_York'
'CACHES': 'CACHES':
'default': &default_generic_cache 'default': &default_generic_cache
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache' 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'
'KEY_FUNCTION': 'util.memcache.safe_key' 'KEY_FUNCTION': 'util.memcache.safe_key'
'KEY_PREFIX': 'sandbox_default' 'KEY_PREFIX': 'sandbox_default'
'LOCATION': $MEMCACHE 'LOCATION': $EDXAPP_MEMCACHE
'general': 'general':
<<: *default_generic_cache <<: *default_generic_cache
'KEY_PREFIX': 'sandbox_general' 'KEY_PREFIX': 'sandbox_general'
...@@ -155,16 +167,17 @@ generic_env_config: &edxapp_generic_env ...@@ -155,16 +167,17 @@ generic_env_config: &edxapp_generic_env
<<: *default_generic_cache <<: *default_generic_cache
'KEY_PREFIX': 'integration_celery' 'KEY_PREFIX': 'integration_celery'
'CELERY_BROKER_TRANSPORT': 'amqp' 'CELERY_BROKER_TRANSPORT': 'amqp'
'CELERY_BROKER_HOSTNAME': '' 'CELERY_BROKER_HOSTNAME': $EDXAPP_RABBIT_HOSTNAME
'COMMENTS_SERVICE_URL': '{{COMMENTS_SERVICE_URL}}' 'COMMENTS_SERVICE_URL': $EDXAPP_COMMENTS_SERVICE_URL
'LOGGING_ENV': 'sandbox' 'LOGGING_ENV': $EDXAPP_LOGGING_ENV
'SESSION_COOKIE_DOMAIN': !!null 'SESSION_COOKIE_DOMAIN': !!null
'COMMENTS_SERVICE_KEY': '{{COMMENTS_SERVICE_KEY}}' 'COMMENTS_SERVICE_KEY': $EDXAPP_COMMENTS_SERVICE_KEY
'SEGMENT_IO_LMS': true 'SEGMENT_IO_LMS': true
'CODE_JAIL': 'CODE_JAIL':
'limits': 'limits':
'VMEM': 0 'VMEM': 0
'REALTIME': 3 'REALTIME': 3
lms_auth_config: lms_auth_config:
<<: *edxapp_generic_auth <<: *edxapp_generic_auth
'MODULESTORE': 'MODULESTORE':
......
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
- lms-xml - lms-xml
- lms-preview - lms-preview
- cms - cms
- syncdb - migrate
- name: restart edxapp - name: restart edxapp
service: name=edxapp state=restarted service: name=edxapp state=restarted
......
...@@ -16,14 +16,20 @@ rabbitmq_port: 5672 ...@@ -16,14 +16,20 @@ rabbitmq_port: 5672
rabbitmq_management_port: 15672 rabbitmq_management_port: 15672
rabbitmq_ip: "{{ ansible_default_ipv4.address }}" rabbitmq_ip: "{{ ansible_default_ipv4.address }}"
rabbitmq_auth_config: # Vars meant to be overridden.
erlang_cookie: "CHANGE ME" RABBIT_ERLANG_COOKIE: 'DEFAULT_COOKIE'
RABBIT_USERS:
admins: admins:
- name: 'admin' - name: 'admin'
password: 'the example admin password' password: 'the example admin password'
- name: 'edx' - name: 'edx'
password: 'edx' password: 'edx'
# Structure for auth config file.
rabbitmq_auth_config:
erlang_cookie: $RABBIT_ERLANG_COOKIE
admins: $RABBIT_USERS
# If the system is running out of an Amazon Web Services # If the system is running out of an Amazon Web Services
# cloudformation stack, this group name can used to pull out # cloudformation stack, this group name can used to pull out
# the name of the stack the rabbit server resides in. # the name of the stack the rabbit server resides in.
......
...@@ -14,30 +14,54 @@ xqueue_user: "xqueue" ...@@ -14,30 +14,54 @@ xqueue_user: "xqueue"
xqueue_user_home: "/opt/xqueue" xqueue_user_home: "/opt/xqueue"
xqueue_venv_dir: "{{ xqueue_user_home }}/virtualenvs/{{ xqueue_user }}" xqueue_venv_dir: "{{ xqueue_user_home }}/virtualenvs/{{ xqueue_user }}"
XQUEUE_QUEUES:
# push queue
'edX-DemoX': 'http://localhost:18050'
# pull queues
'test-pull': !!null
'certificates': !!null
'open-ended': !!null
XQUEUE_LOGGING_ENV: sandbox
XQUEUE_SYSLOG_SERVER: 'syslog.a.m.i4x.org'
XQUEUE_S3_BUCKET : 'sandbox-bucket'
XQUEUE_S3_PATH_PREFIX: 'sandbox-xqueue'
XQUEUE_LOCAL_LOGLEVEL: 'DEBUG'
XQUEUE_AWS_ACCESS_KEY_ID : ''
XQUEUE_AWS_SECRET_ACCESS_KEY : ''
XQUEUE_BASIC_AUTH: ['edx', 'edx']
XQUEUE_DJANGO_USER: 'lms'
XQUEUE_DJANGO_PASSWORD: 'password'
XQUEUE_RABBITMQ_USER: 'edx'
XQUEUE_RABBITMQ_PASS: 'edx'
XQUEUE_MYSQL_DB_NAME: 'xqueue'
XQUEUE_MYSQL_USER: 'root'
XQUEUE_MYSQL_PASSWORD: ''
XQUEUE_MYSQL_HOST: 'localhost'
XQUEUE_MYSQL_PORT: '3306'
xqueue_env_config: xqueue_env_config:
'XQUEUES': 'XQUEUES': $XQUEUE_QUEUES
# push queue
'edX-DemoX': 'http://localhost:18050'
# pull queues
'test-pull': !!null
'certificates': !!null
'open-ended': !!null
'XQUEUE_WORKERS_PER_QUEUE': 12 'XQUEUE_WORKERS_PER_QUEUE': 12
'LOGGING_ENV' : 'sandbox' 'LOGGING_ENV' : $XQUEUE_LOGGING_ENV
'LOG_DIR' : '/logs' 'SYSLOG_SERVER': $XQUEUE_SYSLOG_SERVER
'SYSLOG_SERVER' : 'syslog.a.m.i4x.org' 'LOG_DIR' : '/mnt/logs/xqueue'
'RABBIT_HOST' : 'localhost' 'RABBIT_HOST' : $XQUEUE_RABBIT_HOSTNAME
'S3_BUCKET_PREFIX' : 'sandbox-bucket' 'S3_BUCKET' : $XQUEUE_S3_BUCKET
'S3_PATH_PREFIX': $XQUEUE_S3_PATH_PREFIX
'LOCAL_LOGLEVEL': $XQUEUE_LOCAL_LOGLEVEL
xqueue_auth_config: xqueue_auth_config:
'AWS_ACCESS_KEY_ID' : '' 'AWS_ACCESS_KEY_ID': $XQUEUE_AWS_ACCESS_KEY_ID
'AWS_SECRET_ACCESS_KEY' : '' 'AWS_SECRET_ACCESS_KEY': $XQUEUE_AWS_SECRET_ACCESS_KEY
'REQUESTS_BASIC_AUTH': ['edx', 'edx'] 'REQUESTS_BASIC_AUTH': $XQUEUE_BASIC_AUTH
'USERS': {'lms': 'password'} 'USERS': { '{{XQUEUE_DJANGO_USER}}' : $XQUEUE_DJANGO_PASSWORD }
'RABBITMQ_USER': 'edx'
'RABBITMQ_PASS': 'edx'
'DATABASES': 'DATABASES':
'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'xqueue', 'USER': 'root', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306' } 'NAME': $XQUEUE_MYSQL_DB_NAME
'USER': $XQUEUE_MYSQL_USER
'PASSWORD': $XQUEUE_MYSQL_PASSWORD
'HOST': $XQUEUE_MYSQL_HOST
'PORT': $XQUEUE_MYSQL_PORT
xqueue_create_db: 'yes' xqueue_create_db: 'yes'
xqueue_source_repo: https://github.com/edx/xqueue.git xqueue_source_repo: https://github.com/edx/xqueue.git
......
# Variables for the xserver. # Variables for the xserver.
--- ---
RABBIT_ERLANG_COOKIE: 'DEFAULT_COOKIE'
RABBIT_USERS: RABBIT_RUN_URL: ''
- name: 'default' RABBIT_GRADER_ROOT: ''
password: 'default' RABBIT_LOGGING_ENV: 'sandbox'
RABBIT_SYSLOG_SERVER: ''
xserver_env_config: xserver_env_config:
erlang_cookie: "{{RABBIT_ERLANG_COOKIE}}" RUN_URL: $RABBIT_RUN_URL
admins: $RABBIT_USERS GRADER_ROOT: $RABBIT_GRADER_ROOT
LOGGING_ENV: $RABBIT_LOGGING_ENV
LOG_DIR: '/mnt/logs/xserver'
SYSLOG_SERVER: $RABBIT_SYSLOG_SERVER
SANDBOX_PYTHON: '/opt/edx_apparmor_sandbox/bin/python'
xserver_git_identity_path: "{{ secure_dir }}/files/git-identity" xserver_git_identity_path: "{{ secure_dir }}/files/git-identity"
xserver_code_dir: "{{ app_base_dir }}/xserver" xserver_code_dir: "{{ app_base_dir }}/xserver"
xserver_source_repo: "git://github.com/edx/xserver.git" xserver_source_repo: "git://github.com/edx/xserver.git"
......
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