Commit 3ca28f59 by John Jarvis

variable naming consistency

parent aa17b10a
...@@ -97,12 +97,20 @@ edxapp_app_dir: "{{ app_dir }}/edxapp" ...@@ -97,12 +97,20 @@ edxapp_app_dir: "{{ app_dir }}/edxapp"
edxapp_log_dir: "{{ log_dir }}/edxapp" edxapp_log_dir: "{{ log_dir }}/edxapp"
edxapp_venvs_dir: "{{ app_dir }}/venvs" edxapp_venvs_dir: "{{ app_dir }}/venvs"
edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp" edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp"
edxapp_venv_bin: "{{ edxapp_venv_dir }}/bin"
edxapp_rbenvs_dir: "{{ app_dir }}/rbenvs" edxapp_rbenvs_dir: "{{ app_dir }}/rbenvs"
edxapp_rbenv_dir: "{{ edxapp_rbenvs_dir }}/edxapp" edxapp_rbenv_dir: "{{ edxapp_rbenvs_dir }}/edxapp"
edxapp_user: edxapp edxapp_user: edxapp
edxapp_rbenv_root: "{{ edxapp_rbenv_dir }}/.rbenv" edxapp_rbenv_root: "{{ edxapp_rbenv_dir }}/.rbenv"
edxapp_gem_root: "{{ edxapp_rbenv_dir }}/.gem" edxapp_gem_root: "{{ edxapp_rbenv_dir }}/.gem"
edxapp_gem_bin: "{{ edxapp_gem_root }}/bin"
edxapp_rbenv_shims: "{{ edxapp_rbenv_root }}/shims" edxapp_rbenv_shims: "{{ edxapp_rbenv_root }}/shims"
edxapp_rbenv_bin: "{{ edxapp_rbenv_root }}/bin"
edxapp_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"
edxapp_staticfile_dir: "{{ edxapp_data_dir }}/staticfiles"
edxapp_course_data_dir: "{{ edxapp_data_dir }}/data"
edxapp_upload_dir: "{{ edxapp_data_dir }}/uploads"
edxapp_theme_dir: "{{ edxapp_data_dir }}/themes"
edxapp_generic_auth_config: &edxapp_generic_auth edxapp_generic_auth_config: &edxapp_generic_auth
AWS_ACCESS_KEY_ID: $EDXAPP_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID: $EDXAPP_AWS_ACCESS_KEY_ID
...@@ -137,7 +145,7 @@ edxapp_generic_auth_config: &edxapp_generic_auth ...@@ -137,7 +145,7 @@ edxapp_generic_auth_config: &edxapp_generic_auth
collection: 'modulestore' collection: 'modulestore'
db: $EDXAPP_MONGO_DB_NAME db: $EDXAPP_MONGO_DB_NAME
default_class: 'xmodule.hidden_module.HiddenDescriptor' default_class: 'xmodule.hidden_module.HiddenDescriptor'
fs_root: '/opt/wwc/data' fs_root: $edxapp_course_data_dir
host: $EDXAPP_MONGO_HOSTS host: $EDXAPP_MONGO_HOSTS
password: $EDXAPP_MONGO_PASSWORD password: $EDXAPP_MONGO_PASSWORD
port: $EDXAPP_MONGO_PORT port: $EDXAPP_MONGO_PORT
...@@ -234,7 +242,7 @@ lms_auth_config: ...@@ -234,7 +242,7 @@ lms_auth_config:
xml: xml:
ENGINE: 'xmodule.modulestore.xml.XMLModuleStore' ENGINE: 'xmodule.modulestore.xml.XMLModuleStore'
OPTIONS: OPTIONS:
data_dir: '/opt/wwc/data' data_dir: $edxapp_course_data_dir
default_class: 'xmodule.hidden_module.HiddenDescriptor' default_class: 'xmodule.hidden_module.HiddenDescriptor'
default: default:
OPTIONS: OPTIONS:
...@@ -246,7 +254,7 @@ lms_auth_config: ...@@ -246,7 +254,7 @@ lms_auth_config:
user: $EDXAPP_MONGO_USER user: $EDXAPP_MONGO_USER
password: $EDXAPP_MONGO_PASSWORD password: $EDXAPP_MONGO_PASSWORD
port: $EDXAPP_MONGO_PORT port: $EDXAPP_MONGO_PORT
fs_root: '/opt/wwc/data' fs_root: $edxapp_course_data_dir
ENGINE: 'xmodule.modulestore.mongo.MongoModuleStore' ENGINE: 'xmodule.modulestore.mongo.MongoModuleStore'
DOC_STORE_CONFIG: *edxapp_generic_default_docstore DOC_STORE_CONFIG: *edxapp_generic_default_docstore
...@@ -323,7 +331,7 @@ sandbox_post_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/post ...@@ -323,7 +331,7 @@ sandbox_post_requirements: "{{ edxapp_code_dir }}/requirements/edx-sandbox/post
#do we want to install the sandbox requirements into the regular virtual env #do we want to install the sandbox requirements into the regular virtual env
install_sandbox_reqs_into_regular_venv: true install_sandbox_reqs_into_regular_venv: true
lms_debian_pkgs: edxapp_debian_pkgs:
- npm - npm
# for compiling the virtualenv # for compiling the virtualenv
# (only needed if wheel files aren't available) # (only needed if wheel files aren't available)
...@@ -356,16 +364,18 @@ lms_debian_pkgs: ...@@ -356,16 +364,18 @@ lms_debian_pkgs:
edxapp_ruby_version: "1.9.3-p374" edxapp_ruby_version: "1.9.3-p374"
# Deploy Specific Vars # Deploy Specific Vars
lms_variant: lms edxapp_lms_variant: lms
cms_variant: cms edxapp_cms_variant: cms
deploy_environment: # TODO: old style variable syntax is necessary
# here until ansible 1.4
edxapp_deploy_environment:
LANG: "en_US.UTF-8" LANG: "en_US.UTF-8"
NO_PREREQ_INSTALL: 1 NO_PREREQ_INSTALL: 1
SKIP_WS_MIGRATIONS: 1 SKIP_WS_MIGRATIONS: 1
RBENV_ROOT: "{{ edxapp_rbenv_root }}" RBENV_ROOT: $edxapp_rbenv_root
GEM_HOME: "{{ edxapp_gem_root }}" GEM_HOME: $edxapp_gem_root
PATH: "{{ edxapp_venv_dir }}/bin:{{ edxapp_code_dir }}/bin:{{ edxapp_rbenv_root }}/bin:{{ edxapp_rbenv_root }}/shims:{{ edxapp_gem_home }}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH: $edxapp_deploy_path
# Worker Settings # Worker Settings
worker_django_settings_module: 'aws' worker_django_settings_module: 'aws'
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- deploy - deploy
- name: Create CMS log target directory - name: Create CMS log target directory
file: path={{ edxapp_log_dir }}/cms state=directory owner={{ common_log_user }} mode=2750 file: path={{ edxapp_log_dir }}/cms state=directory owner={{ common_log_user }} mode=0750
tags: tags:
- cms - cms
- cms-env - cms-env
......
...@@ -50,17 +50,21 @@ ...@@ -50,17 +50,21 @@
# Ruby plays that need to be run after platform updates. # Ruby plays that need to be run after platform updates.
- name: edxapp | gem install bundler - name: edxapp | gem install bundler
shell: > shell: >
RBENV_ROOT={{ edxapp_rbenv_root }} GEM_HOME={{ edxapp_gem_root }} {{ edxapp_rbenv_shims }}/gem install bundle gem install bundle
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
executable=/bin/bash
environment: "{{ edxapp_deploy_environment }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags:
- deploy - deploy
- name: edxapp | bundle install - name: edxapp | bundle install
shell: > shell: >
RBENV_ROOT={{ edxapp_rbenv_root }} GEM_HOME={{ edxapp_gem_root }} {{ edxapp_rbenv_shims }}/bundle install --binstubs bundle install --binstubs
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
executable=/bin/bash
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_deploy_environment }}"
tags: tags:
- deploy - deploy
...@@ -155,23 +159,25 @@ ...@@ -155,23 +159,25 @@
# Gather lms assets using rake if possible # Gather lms assets using rake if possible
- name: gather lms static assets with rake - name: gather lms static assets with rake
shell: executable=/bin/bash chdir={{ edxapp_code_dir }} SERVICE_VARIANT={{ lms_variant }} rake lms:gather_assets:aws shell: SERVICE_VARIANT={{ edxapp_lms_variant }} rake lms:gather_assets:aws
executable=/bin/bash
chdir={{ edxapp_code_dir }}
notify: notify:
- restart edxapp - restart edxapp
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: celery_worker is not defined when: celery_worker is not defined
environment: "{{ deploy_environment }}" environment: "{{ edxapp_deploy_environment }}"
tags: tags:
- deploy - deploy
# Gather cms assets using rake if possible # Gather cms assets using rake if possible
- name: gather cms static assets with rake - name: gather cms static assets with rake
shell: executable=/bin/bash chdir={{ edxapp_code_dir }} SERVICE_VARIANT={{ cms_variant }} rake cms:gather_assets:aws shell: executable=/bin/bash chdir={{ edxapp_code_dir }} SERVICE_VARIANT={{ edxapp_cms_variant }} rake cms:gather_assets:aws
notify: notify:
- restart edxapp - restart edxapp
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: celery_worker is not defined when: celery_worker is not defined
environment: "{{ deploy_environment }}" environment: "{{ edxapp_deploy_environment }}"
tags: tags:
- deploy - deploy
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- deploy - deploy
- name: Create lms-preview log target directory - name: Create lms-preview log target directory
file: path={{ edxapp_log_dir }}/lms-preview state=directory owner={{ common_log_user }} mode=2750 file: path={{ edxapp_log_dir }}/lms-preview state=directory owner={{ common_log_user }} mode=0750
tags: tags:
- lms-preview - lms-preview
- lms-preview-env - lms-preview-env
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- deploy - deploy
- name: Create lms log target directory - name: Create lms log target directory
file: path={{ edxapp_log_dir }}/lms state=directory owner=syslog group={{ common_log_user }} mode=2750 file: path={{ edxapp_log_dir }}/lms state=directory owner=syslog group={{ common_log_user }} mode=0750
tags: tags:
- lms - lms
- lms-env - lms-env
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
state=directory state=directory
owner="{{ common_web_user }}" owner="{{ common_web_user }}"
with_items: with_items:
- "{{ edxapp_data_dir }}/staticfiles" - "{{ edxapp_staticfile_dir }}"
- "{{ edxapp_data_dir }}/data" - "{{ edxapp_course_data_dir }}"
- "{{ edxapp_data_dir }}/uploads" - "{{ edxapp_upload_dir }}"
- "{{ edxapp_data_dir }}/themes" - "{{ edxapp_theme_dir }}"
- name: edxapp | install system packages on which LMS and CMS rely - name: edxapp | install system packages on which LMS and CMS rely
apt: pkg={{','.join(lms_debian_pkgs)}} state=present apt: pkg={{','.join(edxapp_debian_pkgs)}} state=present
- name: edxapp | creating edxapp upstart script - name: edxapp | creating edxapp upstart script
sudo: True sudo: 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