Commit 3ca28f59 by John Jarvis

variable naming consistency

parent aa17b10a
......@@ -97,12 +97,20 @@ edxapp_app_dir: "{{ app_dir }}/edxapp"
edxapp_log_dir: "{{ log_dir }}/edxapp"
edxapp_venvs_dir: "{{ app_dir }}/venvs"
edxapp_venv_dir: "{{ edxapp_venvs_dir }}/edxapp"
edxapp_venv_bin: "{{ edxapp_venv_dir }}/bin"
edxapp_rbenvs_dir: "{{ app_dir }}/rbenvs"
edxapp_rbenv_dir: "{{ edxapp_rbenvs_dir }}/edxapp"
edxapp_user: edxapp
edxapp_rbenv_root: "{{ edxapp_rbenv_dir }}/.rbenv"
edxapp_gem_root: "{{ edxapp_rbenv_dir }}/.gem"
edxapp_gem_bin: "{{ edxapp_gem_root }}/bin"
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
AWS_ACCESS_KEY_ID: $EDXAPP_AWS_ACCESS_KEY_ID
......@@ -137,7 +145,7 @@ edxapp_generic_auth_config: &edxapp_generic_auth
collection: 'modulestore'
db: $EDXAPP_MONGO_DB_NAME
default_class: 'xmodule.hidden_module.HiddenDescriptor'
fs_root: '/opt/wwc/data'
fs_root: $edxapp_course_data_dir
host: $EDXAPP_MONGO_HOSTS
password: $EDXAPP_MONGO_PASSWORD
port: $EDXAPP_MONGO_PORT
......@@ -234,7 +242,7 @@ lms_auth_config:
xml:
ENGINE: 'xmodule.modulestore.xml.XMLModuleStore'
OPTIONS:
data_dir: '/opt/wwc/data'
data_dir: $edxapp_course_data_dir
default_class: 'xmodule.hidden_module.HiddenDescriptor'
default:
OPTIONS:
......@@ -246,7 +254,7 @@ lms_auth_config:
user: $EDXAPP_MONGO_USER
password: $EDXAPP_MONGO_PASSWORD
port: $EDXAPP_MONGO_PORT
fs_root: '/opt/wwc/data'
fs_root: $edxapp_course_data_dir
ENGINE: 'xmodule.modulestore.mongo.MongoModuleStore'
DOC_STORE_CONFIG: *edxapp_generic_default_docstore
......@@ -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
install_sandbox_reqs_into_regular_venv: true
lms_debian_pkgs:
edxapp_debian_pkgs:
- npm
# for compiling the virtualenv
# (only needed if wheel files aren't available)
......@@ -356,16 +364,18 @@ lms_debian_pkgs:
edxapp_ruby_version: "1.9.3-p374"
# Deploy Specific Vars
lms_variant: lms
cms_variant: cms
edxapp_lms_variant: lms
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"
NO_PREREQ_INSTALL: 1
SKIP_WS_MIGRATIONS: 1
RBENV_ROOT: "{{ edxapp_rbenv_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"
RBENV_ROOT: $edxapp_rbenv_root
GEM_HOME: $edxapp_gem_root
PATH: $edxapp_deploy_path
# Worker Settings
worker_django_settings_module: 'aws'
......@@ -19,7 +19,7 @@
- deploy
- 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:
- cms
- cms-env
......
......@@ -50,17 +50,21 @@
# Ruby plays that need to be run after platform updates.
- name: edxapp | gem install bundler
shell: >
RBENV_ROOT={{ edxapp_rbenv_root }} GEM_HOME={{ edxapp_gem_root }} {{ edxapp_rbenv_shims }}/gem install bundle
gem install bundle
chdir={{ edxapp_code_dir }}
executable=/bin/bash
environment: "{{ edxapp_deploy_environment }}"
sudo_user: "{{ edxapp_user }}"
tags:
- deploy
- name: edxapp | bundle install
shell: >
RBENV_ROOT={{ edxapp_rbenv_root }} GEM_HOME={{ edxapp_gem_root }} {{ edxapp_rbenv_shims }}/bundle install --binstubs
bundle install --binstubs
chdir={{ edxapp_code_dir }}
executable=/bin/bash
sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_deploy_environment }}"
tags:
- deploy
......@@ -155,23 +159,25 @@
# Gather lms assets using rake if possible
- 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:
- restart edxapp
sudo_user: "{{ edxapp_user }}"
when: celery_worker is not defined
environment: "{{ deploy_environment }}"
environment: "{{ edxapp_deploy_environment }}"
tags:
- deploy
# Gather cms assets using rake if possible
- 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:
- restart edxapp
sudo_user: "{{ edxapp_user }}"
when: celery_worker is not defined
environment: "{{ deploy_environment }}"
environment: "{{ edxapp_deploy_environment }}"
tags:
- deploy
......
......@@ -17,7 +17,7 @@
- deploy
- 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:
- lms-preview
- lms-preview-env
......
......@@ -16,7 +16,7 @@
- deploy
- 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:
- lms
- lms-env
......
......@@ -28,13 +28,13 @@
state=directory
owner="{{ common_web_user }}"
with_items:
- "{{ edxapp_data_dir }}/staticfiles"
- "{{ edxapp_data_dir }}/data"
- "{{ edxapp_data_dir }}/uploads"
- "{{ edxapp_data_dir }}/themes"
- "{{ edxapp_staticfile_dir }}"
- "{{ edxapp_course_data_dir }}"
- "{{ edxapp_upload_dir }}"
- "{{ edxapp_theme_dir }}"
- 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
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