· 9 years ago · Mar 17, 2017, 04:46 PM
1Commands run:
2
3/edx/bin/update edx-platform ficus.master
4
5/edx/app/edx_ansible/edx_ansible/playbooks/roles/aws/tasks:
6
7---
8#
9# edX Configuration
10#
11# github: https://github.com/edx/configuration
12# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
13# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
14# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
15#
16#
17#
18# Tasks for role aws
19#
20# Overview:
21#
22#
23# Dependencies:
24#
25#
26# Example play:
27#
28#
29
30#
31# Start dealing with Jumbo frames issue in mixed MTU deployements in AWS
32#
33- name: Gather ec2 facts for use in other roles
34 action: ec2_facts
35 no_log: True
36 tags:
37 - deploy
38
39#- name: Set the MTU to 1500 temporarily
40# shell: /sbin/ifconfig eth0 mtu 1500 up
41# when: ansible_distribution in common_debian_variants
42
43#- name: Check for eth0.cfg
44# stat:
45# path: /etc/network/interfaces.d/eth0.cfg
46# register: eth0_cfg
47# when: ansible_distribution in common_debian_variants
48
49#- name: Set the MTU to 1500 inside eth0.cfg file
50# lineinfile:
51# dest: /etc/network/interfaces.d/eth0.cfg
52# regexp: "^post-up /sbin/ifconfig eth0 mtu 1500"
53# line: "post-up /sbin/ifconfig eth0 mtu 1500"
54# insertafter: "^iface"
55# when: ansible_distribution in common_debian_variants and eth0_cfg.stat.exists
56
57#
58# End dealing with Jumbo frames issue in mixed MTU deployements in AWS
59#
60
61- name: Install system packages
62 apt:
63 name: "{{ item }}"
64 state: present
65 update_cache: yes
66 with_items: "{{ aws_debian_pkgs }}"
67 when: ansible_distribution in common_debian_variants
68
69- name: Install aws python packages
70 pip:
71 name: "{{ item }}"
72 state: present
73 extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }}"
74 with_items: "{{ aws_pip_pkgs }}"
75
76- name: Create s3 log sync script
77 template:
78 dest: "{{ aws_s3_sync_script }}"
79 src: send-logs-to-s3.j2
80 mode: 0755
81 owner: root
82 group: root
83 when: COMMON_OBJECT_STORE_LOG_SYNC
84
85- name: Create symlink for s3 log sync script
86 file:
87 state: link
88 src: "{{ aws_s3_sync_script }}"
89 dest: "{{ COMMON_OBJECT_STORE_LOG_SYNC_SCRIPT }}"
90 when: COMMON_OBJECT_STORE_LOG_SYNC
91
92 # update the ssh motd on Ubuntu
93 # Remove some of the default motd display on ubuntu
94 # and add a custom motd. These do not require an
95 # ssh restart
96 # Only needed for EC2 instances.
97- name: Check if files exist so the next task doesn't fail
98 stat:
99 path: "{{ item }}"
100 register: motd_files_exist
101 with_items:
102 - "/etc/update-motd.d/10-help-text"
103 - "/usr/share/landscape/landscape-sysinfo.wrapper"
104 - "/etc/update-motd.d/51-cloudguest"
105 - "/etc/update-motd.d/91-release-upgrade"
106
107- name: Update the ssh motd on Ubuntu
108 file:
109 path: "{{ item.item }}"
110 mode: "0644"
111 when: vagrant_home_dir.stat.exists == False and ansible_distribution in common_debian_variants and item.stat.exists
112 with_items: "{{ motd_files_exist.results }}"
113
114
115Server-vars.yml:
116
117
118# variables common to the lms role, automatically loaded
119# when the role is included
120---
121
122EDXAPP_LMS_BASE: 'openedx-test.unserious.org'
123EDXAPP_PREVIEW_LMS_BASE: 'openedx-test.unserious.org'
124EDXAPP_CMS_BASE: 'openedx-test.unserious.org'
125EDXAPP_AWS_ACCESS_KEY_ID: ''
126EDXAPP_AWS_SECRET_ACCESS_KEY: ''
127EDXAPP_XQUEUE_BASIC_AUTH: [ 'edx', 'edx' ]
128EDXAPP_XQUEUE_DJANGO_AUTH:
129 username: 'lms'
130 password: 'password'
131EDXAPP_XQUEUE_URL: 'http://localhost:18040'
132
133EDXAPP_MONGO_HOSTS: ['localhost']
134EDXAPP_MONGO_PASSWORD: 'password'
135EDXAPP_MONGO_PORT: 27017
136EDXAPP_MONGO_USER: 'edxapp'
137EDXAPP_MONGO_DB_NAME: 'edxapp'
138
139EDXAPP_MYSQL_DB_NAME: 'edxapp'
140EDXAPP_MYSQL_USER: 'edxapp001'
141EDXAPP_MYSQL_USER_ADMIN: 'root'
142EDXAPP_MYSQL_USER_MIGRATE: 'migrate'
143EDXAPP_MYSQL_PASSWORD: 'password'
144EDXAPP_MYSQL_PASSWORD_READ_ONLY: 'password'
145EDXAPP_MYSQL_PASSWORD_ADMIN: 'password'
146EDXAPP_MYSQL_PASSWORD_MIGRATE: 'password'
147
148EDXAPP_MYSQL_HOST: 'localhost'
149EDXAPP_MYSQL_PORT: '3306'
150
151EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
152
153EDXAPP_LOG_LEVEL: 'INFO'
154
155EDXAPP_MEMCACHE: [ 'localhost:11211' ]
156EDXAPP_COMMENTS_SERVICE_URL: 'http://localhost:18080'
157EDXAPP_COMMENTS_SERVICE_KEY: 'password'
158
159EDXAPP_EDXAPP_SECRET_KEY: ''
160
161EDXAPP_OEE_URL: 'http://localhost:18060/'
162EDXAPP_OEE_USER: 'lms'
163EDXAPP_OEE_PASSWORD: 'password'
164
165EDXAPP_ANALYTICS_API_KEY: ''
166EDXAPP_ZENDESK_USER: ''
167EDXAPP_ZENDESK_API_KEY: ''
168EDXAPP_CELERY_USER: 'celery'
169EDXAPP_CELERY_PASSWORD: 'celery'
170
171EDXAPP_PLATFORM_NAME: 'edX'
172
173EDXAPP_CAS_SERVER_URL: ''
174EDXAPP_CAS_EXTRA_LOGIN_PARAMS: ''
175EDXAPP_CAS_ATTRIBUTE_CALLBACK: ''
176EDXAPP_CAS_ATTRIBUTE_PACKAGE: ''
177# Enable an end-point that creates a user and logs them in
178# Used for performance testing
179EDXAPP_ENABLE_AUTO_AUTH: false
180
181EDXAPP_FEATURES:
182 AUTH_USE_OPENID_PROVIDER: true
183 CERTIFICATES_ENABLED: true
184 ENABLE_DISCUSSION_SERVICE: true
185 ENABLE_INSTRUCTOR_ANALYTICS: true
186 SUBDOMAIN_BRANDING: false
187 SUBDOMAIN_COURSE_LISTINGS: false
188 PREVIEW_LMS_BASE: $EDXAPP_PREVIEW_LMS_BASE
189 ENABLE_S3_GRADE_DOWNLOADS: true
190 USE_CUSTOM_THEME: $edxapp_use_custom_theme
191 AUTOMATIC_AUTH_FOR_TESTING: $EDXAPP_ENABLE_AUTO_AUTH
192
193EDXAPP_BOOK_URL: ''
194# This needs to be set to localhost
195# if xqueue is run on the same server
196# as the lms (it's sent in the request)
197EDXAPP_SITE_NAME: 'localhost'
198EDXAPP_LMS_SITE_NAME: "{{ EDXAPP_SITE_NAME }}"
199EDXAPP_CMS_SITE_NAME: 'localhost'
200EDXAPP_MEDIA_URL: ''
201EDXAPP_ANALYTICS_SERVER_URL: ''
202EDXAPP_FEEDBACK_SUBMISSION_EMAIL: ''
203EDXAPP_CELERY_BROKER_HOSTNAME: ''
204EDXAPP_LOGGING_ENV: 'sandbox'
205
206EDXAPP_SYSLOG_SERVER: ''
207EDXAPP_RABBIT_HOSTNAME: 'localhost'
208EDXAPP_XML_MAPPINGS: {}
209
210EDXAPP_LMS_NGINX_PORT: 18000
211EDXAPP_LMS_SSL_NGINX_PORT: 48000
212
213EDXAPP_LMS_PREVIEW_NGINX_PORT: 18020
214EDXAPP_CMS_NGINX_PORT: 18010
215EDXAPP_CMS_SSL_NGINX_PORT: 48010
216
217EDXAPP_LANG: 'en_US.UTF-8'
218EDXAPP_LANGUAGE_CODE : 'en'
219EDXAPP_TIME_ZONE: 'America/New_York'
220
221EDXAPP_TECH_SUPPORT_EMAIL: 'technical@example.com'
222EDXAPP_CONTACT_EMAIL: 'info@example.com'
223EDXAPP_BUGS_EMAIL: 'bugs@example.com'
224EDXAPP_DEFAULT_FROM_EMAIL: 'registration@example.com'
225EDXAPP_DEFAULT_FEEDBACK_EMAIL: 'feedback@example.com'
226EDXAPP_DEFAULT_SERVER_EMAIL: 'devops@example.com'
227EDXAPP_BULK_EMAIL_DEFAULT_FROM_EMAIL: 'no-reply@example.com'
228
229EDXAPP_ENV_EXTRA: {}
230EDXAPP_AUTH_EXTRA: {}
231EDXAPP_MKTG_URL_LINK_MAP: {}
232EDXAPP_MKTG_URLS: {}
233# Set this sets the url for static files
234# Override this var to use a CDN
235# Example: xxxxx.cloudfront.net/static/
236EDXAPP_STATIC_URL_BASE: "/static/"
237
238# Settings for Grade downloads
239EDXAPP_GRADE_STORAGE_TYPE: 'localfs'
240EDXAPP_GRADE_BUCKET: 'edx-grades'
241EDXAPP_GRADE_ROOT_PATH: '/tmp/edx-s3/grades'
242# Credit card processor
243# These are the same defaults set in common.py
244EDXAPP_CC_PROCESSOR:
245 CyberSource:
246 SHARED_SECRET: ''
247 MERCHANT_ID: ''
248 SERIAL_NUMBER: ''
249 ORDERPAGE_VERSION: '7'
250 PURCHASE_ENDPOINT: ''
251
252# does not affect verified students
253EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY: ['usd', '$']
254
255# Configure rake tasks in edx-platform to skip Python/Ruby/Node installation
256EDXAPP_NO_PREREQ_INSTALL: 1
257
258# whether to setup the python codejail or not
259EDXAPP_PYTHON_SANDBOX: false
260# this next setting, if true, turns on actual sandbox enforcement. If not true,
261# it puts the sandbox in 'complain' mode, for reporting but not enforcement
262EDXAPP_SANDBOX_ENFORCE: true
263
264# Supply authorized keys used for remote management via the user
265# role.
266EDXAPP_AUTOMATOR_NAME: automator
267EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: []
268# These are the commands allowed by the automator role.
269# The --settings parameter must be set at the end so that
270# is caught by the glob.
271# Example: sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp lms migrate --settings=aws
272EDXAPP_AUTOMATOR_SUDO_CMDS:
273- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms migrate *"
274- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp cms migrate *"
275- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms syncdb *"
276- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp cms syncdb *"
277- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms seed_permissions_roles *"
278- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms set_staff *"
279- "ALL=({{ common_web_user }}) NOPASSWD:SETENV:{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms transfer_students *"
280
281EDXAPP_USE_GIT_IDENTITY: false
282# Paste the contents of the git identity
283# into this var
284EDXAPP_GIT_IDENTITY: !!null
285
286# Configuration for database migration
287EDXAPP_TEST_MIGRATE_DB_NAME: "{{ COMMON_ENVIRONMENT }}_{{ COMMON_DEPLOYMENT }}_test_{{ EDXAPP_MYSQL_DB_NAME }}"
288
289EDXAPP_UPDATE_STATIC_FILES_KEY: false
290# Set this to true if you want to install the private pip
291# requirements in the edx-platform repo.
292# This will use EDXAPP_GIT_IDENTITY, EDXAPP_USE_GIT_IDENTITY
293# must be set to true if EDXAPP_INSTALL_PRIVATE_REQUIREMENTS is
294# set to true
295
296EDXAPP_INSTALL_PRIVATE_REQUIREMENTS: false
297
298EDXAPP_GOOGLE_ANALYTICS_ACCOUNT: "UA-DUMMY"
299
300#-------- Everything below this line is internal to the role ------------
301
302#Use YAML references (& and *) and hash merge <<: to factor out shared settings
303#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
304
305edxapp_data_dir: "{{ COMMON_DATA_DIR }}/edxapp"
306edxapp_app_dir: "{{ COMMON_APP_DIR }}/edxapp"
307edxapp_log_dir: "{{ COMMON_LOG_DIR }}/edxapp"
308edxapp_venvs_dir: "{{ edxapp_app_dir }}/venvs"
309edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp"
310edxapp_venv_bin: "{{ edxapp_venv_dir }}/bin"
311edxapp_rbenv_dir: "{{ edxapp_app_dir }}"
312edxapp_rbenv_root: "{{ edxapp_rbenv_dir }}/.rbenv"
313edxapp_rbenv_shims: "{{ edxapp_rbenv_root }}/shims"
314edxapp_rbenv_bin: "{{ edxapp_rbenv_root }}/bin"
315edxapp_gem_root: "{{ edxapp_rbenv_dir }}/.gem"
316edxapp_gem_bin: "{{ edxapp_gem_root }}/bin"
317edxapp_user: edxapp
318edxapp_deploy_path: "{{ edxapp_venv_bin }}:{{ edxapp_code_dir }}/bin:{{ edxapp_rbenv_bin }}:{{ edxapp_rbenv_shims }}:{{ edxapp_gem_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
319edxapp_staticfile_dir: "{{ edxapp_data_dir }}/staticfiles"
320edxapp_course_data_dir: "{{ edxapp_data_dir }}/data"
321edxapp_upload_dir: "{{ edxapp_data_dir }}/uploads"
322edxapp_theme_dir: "{{ edxapp_data_dir }}/themes"
323edxapp_git_identity: "{{ edxapp_app_dir }}/edxapp-git-identity"
324edxapp_git_ssh: "/tmp/edxapp_git_ssh.sh"
325edxapp_workers:
326 - queue: low
327 service_variant: cms
328 concurrency: 3
329 - queue: default
330 service_variant: cms
331 concurrency: 4
332 - queue: high
333 service_variant: cms
334 concurrency: 1
335 - queue: low
336 service_variant: lms
337 concurrency: 1
338 - queue: default
339 service_variant: lms
340 concurrency: 3
341 - queue: high
342 service_variant: lms
343 concurrency: 4
344 - queue: high_mem
345 service_variant: lms
346 concurrency: 2
347
348# setup for python codejail
349edxapp_sandbox_venv_dir: '{{ edxapp_venvs_dir }}/edxapp-sandbox'
350edxapp_sandbox_user: 'sandbox' # I think something about the codejail requires hardcoding this to sandbox:sandbox
351
352# apparmor command
353edxapp_aa_command: "{% if EDXAPP_SANDBOX_ENFORCE %}aa-enforce{% else %}aa-complain{% endif %}"
354
355# Requirement files we explicitely
356# check for changes before attempting
357# to update the venv
358edxapp_chksum_req_files:
359 - "{{ pre_requirements_file }}"
360 - "{{ post_requirements_file }}"
361 - "{{ base_requirements_file }}"
362 - "{{ paver_requirements_file }}"
363 - "{{ sandbox_post_requirements }}"
364 - "{{ sandbox_base_requirements }}"
365
366# all edxapp requirements files
367edxapp_all_req_files:
368 - "{{ pre_requirements_file }}"
369 - "{{ post_requirements_file }}"
370 - "{{ base_requirements_file }}"
371 - "{{ paver_requirements_file }}"
372 - "{{ repo_requirements_file }}"
373 - "{{ github_requirements_file }}"
374 - "{{ sandbox_post_requirements }}"
375 - "{{ sandbox_local_requirements }}"
376 - "{{ sandbox_base_requirements }}"
377
378
379# TODO: old style variable syntax is necessary
380# for lists and dictionaries
381
382edxapp_environment:
383 LANG: $EDXAPP_LANG
384 NO_PREREQ_INSTALL: $EDXAPP_NO_PREREQ_INSTALL
385 SKIP_WS_MIGRATIONS: 1
386 RBENV_ROOT: $edxapp_rbenv_root
387 GEM_HOME: $edxapp_gem_root
388 GEM_PATH: $edxapp_gem_root
389 PATH: $edxapp_deploy_path
390
391
392edxapp_generic_auth_config: &edxapp_generic_auth
393 AWS_ACCESS_KEY_ID: $EDXAPP_AWS_ACCESS_KEY_ID
394 AWS_SECRET_ACCESS_KEY: $EDXAPP_AWS_SECRET_ACCESS_KEY
395 SECRET_KEY: $EDXAPP_EDXAPP_SECRET_KEY
396 XQUEUE_INTERFACE:
397 basic_auth: $EDXAPP_XQUEUE_BASIC_AUTH
398 django_auth: $EDXAPP_XQUEUE_DJANGO_AUTH
399 url: $EDXAPP_XQUEUE_URL
400 DOC_STORE_CONFIG: &edxapp_generic_default_docstore
401 db: $EDXAPP_MONGO_DB_NAME
402 host: $EDXAPP_MONGO_HOSTS
403 password: $EDXAPP_MONGO_PASSWORD
404 port: $EDXAPP_MONGO_PORT
405 user: $EDXAPP_MONGO_USER
406 collection: 'modulestore'
407 CONTENTSTORE:
408 ENGINE: 'xmodule.contentstore.mongo.MongoContentStore'
409 #
410 # connection strings are duplicated temporarily for
411 # backward compatibility
412 #
413 OPTIONS:
414 db: $EDXAPP_MONGO_DB_NAME
415 host: $EDXAPP_MONGO_HOSTS
416 password: $EDXAPP_MONGO_PASSWORD
417 port: $EDXAPP_MONGO_PORT
418 user: $EDXAPP_MONGO_USER
419 DOC_STORE_CONFIG: *edxapp_generic_default_docstore
420 MODULESTORE:
421 default: &edxapp_generic_default_modulestore
422 ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
423 OPTIONS: &generic_modulestore_default_options
424 collection: 'modulestore'
425 db: $EDXAPP_MONGO_DB_NAME
426 default_class: 'xmodule.hidden_module.HiddenDescriptor'
427 fs_root: $edxapp_course_data_dir
428 host: $EDXAPP_MONGO_HOSTS
429 password: $EDXAPP_MONGO_PASSWORD
430 port: $EDXAPP_MONGO_PORT
431 render_template: 'edxmako.shortcuts.render_to_string'
432 # Needed for the CMS to be able to run update_templates
433 user: $EDXAPP_MONGO_USER
434 DOC_STORE_CONFIG: *edxapp_generic_default_docstore
435 direct: &edxapp_generic_direct_modulestore
436 ENGINE: 'xmodule.modulestore.mongo.MongoModuleStore'
437 OPTIONS: *generic_modulestore_default_options
438 DOC_STORE_CONFIG: *edxapp_generic_default_docstore
439 DATABASES:
440 default:
441 ENGINE: 'django.db.backends.mysql'
442 NAME: $EDXAPP_MYSQL_DB_NAME
443 USER: $EDXAPP_MYSQL_USER
444 PASSWORD: $EDXAPP_MYSQL_PASSWORD
445 HOST: $EDXAPP_MYSQL_HOST
446 PORT: $EDXAPP_MYSQL_PORT
447 OPEN_ENDED_GRADING_INTERFACE:
448 url: $EDXAPP_OEE_URL
449 password: $EDXAPP_OEE_PASSWORD
450 peer_grading: 'peer_grading'
451 staff_grading: 'staff_grading'
452 grading_controller: 'grading_controller'
453 username: $EDXAPP_OEE_USER
454 ANALYTICS_API_KEY: $EDXAPP_ANALYTICS_API_KEY
455 ZENDESK_USER: $EDXAPP_ZENDESK_USER
456 ZENDESK_API_KEY: $EDXAPP_ZENDESK_API_KEY
457 CELERY_BROKER_USER: $EDXAPP_CELERY_USER
458 CELERY_BROKER_PASSWORD: $EDXAPP_CELERY_PASSWORD
459 GOOGLE_ANALYTICS_ACCOUNT: $EDXAPP_GOOGLE_ANALYTICS_ACCOUNT
460
461generic_env_config: &edxapp_generic_env
462 GRADES_DOWNLOAD:
463 STORAGE_TYPE: $EDXAPP_GRADE_STORAGE_TYPE
464 BUCKET: $EDXAPP_GRADE_BUCKET
465 ROOT_PATH: $EDXAPP_GRADE_ROOT_PATH
466 STATIC_URL_BASE: $EDXAPP_STATIC_URL_BASE
467 STATIC_ROOT_BASE: $edxapp_staticfile_dir
468 LMS_BASE: $EDXAPP_LMS_BASE
469 CMS_BASE: $EDXAPP_CMS_BASE
470 BOOK_URL: $EDXAPP_BOOK_URL
471 PLATFORM_NAME: $EDXAPP_PLATFORM_NAME
472 CERT_QUEUE: 'certificates'
473 LOCAL_LOGLEVEL: $EDXAPP_LOG_LEVEL
474 # default email backed set to local SMTP
475 EMAIL_BACKEND: $EDXAPP_EMAIL_BACKEND
476 FEATURES: $EDXAPP_FEATURES
477 WIKI_ENABLED: true
478 SYSLOG_SERVER: $EDXAPP_SYSLOG_SERVER
479 SITE_NAME: $EDXAPP_SITE_NAME
480 LOG_DIR: "{{ COMMON_DATA_DIR }}/logs/edx"
481 MEDIA_URL: $EDXAPP_MEDIA_URL
482 ANALYTICS_SERVER_URL: $EDXAPP_ANALYTICS_SERVER_URL
483 FEEDBACK_SUBMISSION_EMAIL: $EDXAPP_FEEDBACK_SUBMISSION_EMAIL
484 TIME_ZONE: $EDXAPP_TIME_ZONE
485 LANGUAGE_CODE : $EDXAPP_LANGUAGE_CODE
486 MKTG_URL_LINK_MAP: $EDXAPP_MKTG_URL_LINK_MAP
487 MKTG_URLS: $EDXAPP_MKTG_URLS
488 # repo root for courses
489 GITHUB_REPO_ROOT: $edxapp_course_data_dir
490 CACHES:
491 default: &default_generic_cache
492 BACKEND: 'django.core.cache.backends.memcached.MemcachedCache'
493 KEY_FUNCTION: 'util.memcache.safe_key'
494 KEY_PREFIX: 'sandbox_default'
495 LOCATION: $EDXAPP_MEMCACHE
496 general:
497 <<: *default_generic_cache
498 KEY_PREFIX: 'sandbox_general'
499 mongo_metadata_inheritance:
500 <<: *default_generic_cache
501 KEY_PREFIX: 'integration_mongo_metadata_inheritance'
502 staticfiles:
503 <<: *default_generic_cache
504 KEY_PREFIX: 'integration_static_files'
505 celery:
506 <<: *default_generic_cache
507 KEY_PREFIX: 'integration_celery'
508 CELERY_BROKER_TRANSPORT: 'amqp'
509 CELERY_BROKER_HOSTNAME: $EDXAPP_RABBIT_HOSTNAME
510 COMMENTS_SERVICE_URL: $EDXAPP_COMMENTS_SERVICE_URL
511 LOGGING_ENV: $EDXAPP_LOGGING_ENV
512 SESSION_COOKIE_DOMAIN: !!null
513 COMMENTS_SERVICE_KEY: $EDXAPP_COMMENTS_SERVICE_KEY
514 SEGMENT_IO_LMS: true
515 THEME_NAME: $edxapp_theme_name
516 TECH_SUPPORT_EMAIL: $EDXAPP_TECH_SUPPORT_EMAIL
517 CONTACT_EMAIL: $EDXAPP_CONTACT_EMAIL
518 BUGS_EMAIL: $EDXAPP_BUGS_EMAIL
519 CODE_JAIL:
520 limits:
521 VMEM: 0
522 REALTIME: 3
523 DEFAULT_FROM_EMAIL: $EDXAPP_DEFAULT_FROM_EMAIL
524 DEFAULT_FEEDBACK_EMAIL: $EDXAPP_DEFAULT_FEEDBACK_EMAIL
525 SERVER_EMAIL: $EDXAPP_DEFAULT_SERVER_EMAIL
526 BULK_EMAIL_DEFAULT_FROM_EMAIL: $EDXAPP_BULK_EMAIL_DEFAULT_FROM_EMAIL
527 CAS_SERVER_URL: $EDXAPP_CAS_SERVER_URL
528 CAS_EXTRA_LOGIN_PARAMS: $EDXAPP_CAS_EXTRA_LOGIN_PARAMS
529 CAS_ATTRIBUTE_CALLBACK: $EDXAPP_CAS_ATTRIBUTE_CALLBACK
530 HOSTNAME_MODULESTORE_DEFAULT_MAPPINGS:
531 'preview\.': 'draft'
532
533lms_auth_config:
534 <<: *edxapp_generic_auth
535 CC_PROCESSOR: $EDXAPP_CC_PROCESSOR
536 MODULESTORE:
537 default: &lms_default_modulestore
538 ENGINE: 'xmodule.modulestore.mixed.MixedModuleStore'
539 OPTIONS:
540 mappings: $EDXAPP_XML_MAPPINGS
541 stores:
542 xml:
543 ENGINE: 'xmodule.modulestore.xml.XMLModuleStore'
544 OPTIONS:
545 data_dir: $edxapp_course_data_dir
546 default_class: 'xmodule.hidden_module.HiddenDescriptor'
547 default:
548 OPTIONS:
549 default_class: 'xmodule.hidden_module.HiddenDescriptor'
550 host: $EDXAPP_MONGO_HOSTS
551 db: $EDXAPP_MONGO_DB_NAME
552 collection: 'modulestore'
553 render_template: 'edxmako.shortcuts.render_to_string'
554 user: $EDXAPP_MONGO_USER
555 password: $EDXAPP_MONGO_PASSWORD
556 port: $EDXAPP_MONGO_PORT
557 fs_root: $edxapp_course_data_dir
558 ENGINE: 'xmodule.modulestore.mongo.MongoModuleStore'
559 DOC_STORE_CONFIG: *edxapp_generic_default_docstore
560 draft:
561 <<: *edxapp_generic_default_modulestore
562 ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
563lms_env_config:
564 <<: *edxapp_generic_env
565 PAID_COURSE_REGISTRATION_CURRENCY: $EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY
566 'CODE_JAIL':
567 # from https://github.com/edx/codejail/blob/master/codejail/django_integration.py#L24, '' should be same as None
568 'python_bin': '{% if EDXAPP_PYTHON_SANDBOX %}{{ edxapp_sandbox_venv_dir }}/bin/python{% endif %}'
569 'limits':
570 'VMEM': 0
571 'REALTIME': 5
572 'user': '{{ edxapp_sandbox_user }}'
573
574cms_auth_config:
575 <<: *edxapp_generic_auth
576cms_env_config:
577 <<: *edxapp_generic_env
578
579# install dir for the edx-platform repo
580edxapp_code_dir: "{{ edxapp_app_dir }}/edx-platform"
581
582
583# gunicorn ports/hosts, these shouldn't need to be overridden
584edxapp_cms_gunicorn_port: 8010
585edxapp_cms_gunicorn_host: 127.0.0.1
586edxapp_lms_gunicorn_port: 8000
587edxapp_lms_gunicorn_host: 127.0.0.1
588
589# These vars are for creating the application json config
590# files. There are two for each service that uses the
591# 'edx-platform' code. Defining them will create the upstart
592# job. It will also enable the corresponding section in the
593# 'edxapp' upstart job.
594
595service_variants_enabled:
596 - lms
597 - cms
598
599edxapp_lms_env: 'lms.envs.aws'
600edxapp_cms_env: 'cms.envs.aws'
601
602#Number of gunicorn worker processes to spawn, as a multiplier to number of virtual cores
603worker_core_mult:
604 lms: 4
605 cms: 2
606
607# Theming
608# Turn theming on and off with edxapp_use_custom_theme
609# Set theme name with edxapp_theme_name
610# Stanford, for example, uses edxapp_theme_name: 'stanford'
611#
612# TODO: change variables to ALL-CAPS, since they are meant to be externally overridden
613edxapp_use_custom_theme: false
614edxapp_theme_name: ""
615edxapp_theme_source_repo: 'https://{{ COMMON_GIT_MIRROR }}/Stanford-Online/edx-theme.git'
616edxapp_theme_version: 'master'
617
618# make this the public URL instead of writable
619edx_platform_repo: "https://{{ COMMON_GIT_MIRROR }}/edx/edx-platform.git"
620# `edx_platform_version` can be anything that git recognizes as a commit
621# reference, including a tag, a branch name, or a commit hash
622edx_platform_version: 'release'
623local_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/local.txt"
624pre_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/pre.txt"
625post_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/post.txt"
626base_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/base.txt"
627paver_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/paver.txt"
628github_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/github.txt"
629repo_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/repo.txt"
630private_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/edx-private.txt"
631
632sandbox_base_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/base.txt"
633sandbox_local_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/local.txt"
634sandbox_post_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/post.txt"
635
636edxapp_debian_pkgs:
637 - npm
638 # for compiling the virtualenv
639 # (only needed if wheel files aren't available)
640 - build-essential
641 - s3cmd
642 - pkg-config
643 - graphviz-dev
644 - graphviz
645 - libmysqlclient-dev
646 # for scipy, do not install
647 # libopenblas-base, it will cause
648 # problems for numpy
649 - gfortran
650 - libatlas3gf-base
651 - liblapack-dev
652 - g++
653 - libxml2-dev
654 - libxslt1-dev
655 # apparmor
656 - apparmor-utils
657 # misc
658 - curl
659 - ipython
660 - npm
661 - ntp
662 # for shapely
663 - libgeos-dev
664 # i18n
665 - gettext
666 # Pillow (PIL Fork) Dependencies
667 # Needed by the CMS to manipulate images.
668 - libjpeg8-dev
669 - libpng12-dev
670
671# Ruby Specific Vars
672edxapp_ruby_version: "1.9.3-p374"
673
674# Deploy Specific Vars
675edxapp_lms_variant: lms
676edxapp_cms_variant: cms
677
678# Worker Settings
679worker_django_settings_module: 'aws'