Commit e807e76c by John Jarvis

app_base_dir and data_base_dir changed to app_dir and data_dir

parent 84d568e1
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
# This should only have variables # This should only have variables
# that are applicable to all edX roles # that are applicable to all edX roles
data_base_dir: /mnt data_dir: /edx/var
app_base_dir: /opt/wwc app_dir: /edx/app
log_base_dir: "{{ data_base_dir }}/logs" log_base_dir: "{{ data_dir }}/log"
venv_dir: /opt/edx
os_name: ubuntu os_name: ubuntu
ENV_NAME: 'default_env' ENV_NAME: 'default_env'
......
--- ---
- name: common | restart rsyslogd - name: common | restart rsyslogd
service: name=rsyslog state=restarted service: name=rsyslog state=restarted
sudo: True
- name: common | restart logrotate - name: common | restart logrotate
service: name=logrotate state=restarted service: name=logrotate state=restarted
sudo: True
--- ---
- name: common | Add user www-data - name: common | Add user www-data
# This is the default user for nginx and gunicorn # This is the default user for nginx
user: name=www-data user: name=www-data
tags:
- pre_install
- update
- name: common | Create the base directory for storage - name: common | Create the base directory for storage
file: > file: >
path={{ data_base_dir }} path={{ data_dir }}
state=directory state=directory
owner=root owner=root
group=root group=root
mode=0755 mode=0755
- name: common | Create application root - name: common | Create the base directory for the app
# In the future consider making group edx r/t adm file: >
file: path={{ app_base_dir }} state=directory owner=root group=adm mode=2775 path={{ app_dir }}
tags: state=directory
- pre_install owner=root
- update group=root
mode=0755
- name: common | Create upload directory - name: common | Create upload directory
file: path={{ app_base_dir }}/uploads mode=2775 state=directory owner=root group=adm file: path={{ app_dir }}/uploads mode=2775 state=directory owner=root group=adm
tags:
- pre_install
- update
- name: common | Create data dir - name: common | Create data dir
file: path={{ app_base_dir }}/data state=directory owner=www-data group=root file: path={{ app_dir }}/data state=directory owner=www-data group=root
tags: tags:
- pre_install - pre_install
- update - update
- name: common | Create staticfiles dir - name: common | Create staticfiles dir
file: path={{ app_base_dir }}/staticfiles state=directory owner=www-data group=adm mode=2775 file: path={{ app_dir }}/staticfiles state=directory owner=www-data group=adm mode=2775
tags: tags:
- pre_install - pre_install
- update - update
...@@ -52,8 +47,8 @@ ...@@ -52,8 +47,8 @@
- pre_install - pre_install
- update - update
- name: common | Create alias from app_base_dir to the log_base_dir - name: common | Create alias from app_dir to the log_base_dir
file: state=link src={{log_base_dir}} path={{app_base_dir}}/log file: state=link src={{log_base_dir}} path={{app_dir}}/log
tags: tags:
- pre_install - pre_install
- logging - logging
......
--- ---
devpi_venv_dir: "{{ app_base_dir }}/devpi/venvs/devpi" devpi_venv_dir: "{{ app_dir }}/devpi/venvs/devpi"
devpi_pip_pkgs: devpi_pip_pkgs:
- devpi-server - devpi-server
- eventlet - eventlet
......
...@@ -3,8 +3,8 @@ DISCERN_BASIC_AUTH: False ...@@ -3,8 +3,8 @@ DISCERN_BASIC_AUTH: False
discern_source_repo: https://github.com/edx/discern.git discern_source_repo: https://github.com/edx/discern.git
ease_source_repo: https://github.com/edx/ease.git ease_source_repo: https://github.com/edx/ease.git
ease_dir: $app_base_dir/ease ease_dir: $app_dir/ease
discern_dir: $app_base_dir/discern discern_dir: $app_dir/discern
discern_settings: discern.aws discern_settings: discern.aws
nltk_data_dir: /usr/share/nltk_data nltk_data_dir: /usr/share/nltk_data
ease_branch: master ease_branch: master
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
#Upload config files for django (auth and env) #Upload config files for django (auth and env)
- name: discern | create discern application config env.json file - name: discern | create discern application config env.json file
template: src=env.json.j2 dest={{app_base_dir}}/env.json owner={{discern_user}} group=edx mode=0640 template: src=env.json.j2 dest={{app_dir}}/env.json owner={{discern_user}} group=edx mode=0640
notify: notify:
- discern | restart celery - discern | restart celery
- discern | restart discern - discern | restart discern
- name: discern | create discern auth file auth.json - name: discern | create discern auth file auth.json
template: src=auth.json.j2 dest={{app_base_dir}}/auth.json owner={{discern_user}} group=edx mode=0640 template: src=auth.json.j2 dest={{app_dir}}/auth.json owner={{discern_user}} group=edx mode=0640
notify: notify:
- discern | restart celery - discern | restart celery
- discern | restart discern - discern | restart discern
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
- name: discern | change memory commit settings -- needed for redis - name: discern | change memory commit settings -- needed for redis
command: sysctl vm.overcommit_memory=1 command: sysctl vm.overcommit_memory=1
- name: discern | set permissions on app_base_dir sgid for edx - name: discern | set permissions on app_dir sgid for edx
file: path={{app_base_dir}} owner=root group=edx mode=2775 state=directory file: path={{app_dir}} owner=root group=edx mode=2775 state=directory
file: path={{venv_dir}} owner=root group=edx mode=2775 state=directory file: path={{venv_dir}} owner=root group=edx mode=2775 state=directory
- name: discern | Install git so that we can clone repos - name: discern | Install git so that we can clone repos
......
...@@ -91,6 +91,9 @@ EDXAPP_LMS_PREVIEW_BASIC_AUTH: False ...@@ -91,6 +91,9 @@ EDXAPP_LMS_PREVIEW_BASIC_AUTH: False
#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_data_dir:
edxapp_app_dir:
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
AWS_SECRET_ACCESS_KEY: $EDXAPP_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY: $EDXAPP_AWS_SECRET_ACCESS_KEY
...@@ -158,7 +161,7 @@ generic_env_config: &edxapp_generic_env ...@@ -158,7 +161,7 @@ generic_env_config: &edxapp_generic_env
WIKI_ENABLED: true WIKI_ENABLED: true
SYSLOG_SERVER: $EDXAPP_SYSLOG_SERVER SYSLOG_SERVER: $EDXAPP_SYSLOG_SERVER
SITE_NAME: $EDXAPP_SITE_NAME SITE_NAME: $EDXAPP_SITE_NAME
LOG_DIR: "{{ data_base_dir }}/logs/edx" LOG_DIR: "{{ data_dir }}/logs/edx"
MEDIA_URL: $EDXAPP_MEDIA_URL MEDIA_URL: $EDXAPP_MEDIA_URL
ANALYTICS_SERVER_URL: $EDXAPP_ANALYTICS_SERVER_URL ANALYTICS_SERVER_URL: $EDXAPP_ANALYTICS_SERVER_URL
FEEDBACK_SUBMISSION_EMAIL: $EDXAPP_FEEDBACK_SUBMISSION_EMAIL FEEDBACK_SUBMISSION_EMAIL: $EDXAPP_FEEDBACK_SUBMISSION_EMAIL
...@@ -235,7 +238,7 @@ lms_preview_env_config: ...@@ -235,7 +238,7 @@ lms_preview_env_config:
# install dir for the edx-platform repo # install dir for the edx-platform repo
edx_platform_code_dir: "{{ app_base_dir }}/edx-platform" edx_platform_code_dir: "{{ app_dir }}/edx-platform"
# gunicorn ports/hosts, these shouldn't need to be overridden # gunicorn ports/hosts, these shouldn't need to be overridden
...@@ -304,7 +307,7 @@ lms_debian_pkgs: ...@@ -304,7 +307,7 @@ lms_debian_pkgs:
# for scipy, do not install # for scipy, do not install
# libopenblas-base, it will cause # libopenblas-base, it will cause
# problems for numpy # problems for numpy
- gfortran - gfortran
- libatlas3gf-base - libatlas3gf-base
- liblapack-dev - liblapack-dev
- g++ - g++
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# - common/tasks/main.yml # - common/tasks/main.yml
--- ---
- name: create cms application config - name: create cms application config
template: src=cms.env.json.j2 dest=$app_base_dir/cms.env.json mode=640 owner=www-data group=adm template: src=cms.env.json.j2 dest=$app_dir/cms.env.json mode=640 owner=www-data group=adm
tags: tags:
- cms-env - cms-env
- cms - cms
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- deploy - deploy
- name: create cms auth file - name: create cms auth file
template: src=cms.auth.json.j2 dest=$app_base_dir/cms.auth.json mode=640 owner=www-data group=adm template: src=cms.auth.json.j2 dest=$app_dir/cms.auth.json mode=640 owner=www-data group=adm
tags: tags:
- cms-env - cms-env
- cms - cms
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
- deploy - deploy
- name: checkout theme - name: checkout theme
git: dest={{app_base_dir}}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}} git: dest={{app_dir}}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
when: edxapp_theme_name != '' when: edxapp_theme_name != ''
tags: tags:
- cms - cms
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
# - common/tasks/main.yml # - common/tasks/main.yml
--- ---
- name: create lms application config - name: create lms application config
template: src=lms-preview.env.json.j2 dest=$app_base_dir/lms-preview.env.json mode=640 owner=www-data group=adm template: src=lms-preview.env.json.j2 dest=$app_dir/lms-preview.env.json mode=640 owner=www-data group=adm
tags: tags:
- lms-preview - lms-preview
- lms-preview-env - lms-preview-env
- deploy - deploy
- name: create lms auth file - name: create lms auth file
template: src=lms-preview.auth.json.j2 dest=$app_base_dir/lms-preview.auth.json mode=640 owner=www-data group=adm template: src=lms-preview.auth.json.j2 dest=$app_dir/lms-preview.auth.json mode=640 owner=www-data group=adm
tags: tags:
- lms-preview - lms-preview
- lms-preview-env - lms-preview-env
......
--- ---
- name: create lms application config - name: create lms application config
template: src=lms.env.json.j2 dest=$app_base_dir/lms.env.json mode=640 owner=www-data group=adm template: src=lms.env.json.j2 dest=$app_dir/lms.env.json mode=640 owner=www-data group=adm
tags: tags:
- lms - lms
- lms-env - lms-env
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- deploy - deploy
- name: create lms auth file - name: create lms auth file
template: src=lms.auth.json.j2 dest=$app_base_dir/lms.auth.json mode=640 owner=www-data group=adm template: src=lms.auth.json.j2 dest=$app_dir/lms.auth.json mode=640 owner=www-data group=adm
tags: tags:
- lms - lms
- lms-env - lms-env
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# - common/tasks/main.yml # - common/tasks/main.yml
--- ---
- name: Change permissions on datadir - name: Change permissions on datadir
file: path={{ app_base_dir }}/data state=directory owner=www-data group=www-data file: path={{ app_dir }}/data state=directory owner=www-data group=www-data
tags: tags:
- cms - cms
- lms - lms
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- update - update
- name: Change owner on staticfiles - name: Change owner on staticfiles
file: path={{ app_base_dir }}/staticfiles state=directory owner=www-data group=adm file: path={{ app_dir }}/staticfiles state=directory owner=www-data group=adm
tags: tags:
- cms - cms
- lms - lms
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- update - update
- name: Create theming directory - name: Create theming directory
file: path={{ app_base_dir }}/themes state=directory mode=2775 group=adm owner=www-data file: path={{ app_dir }}/themes state=directory mode=2775 group=adm owner=www-data
tags: tags:
- cms - cms
- lms - lms
......
...@@ -9,7 +9,7 @@ respawn ...@@ -9,7 +9,7 @@ respawn
respawn limit 3 30 respawn limit 3 30
env PID=/var/tmp/cms.pid env PID=/var/tmp/cms.pid
#env NEW_RELIC_CONFIG_FILE={{app_base_dir}}/newrelic.ini #env NEW_RELIC_CONFIG_FILE={{app_dir}}/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin #env NEWRELIC={{venv_dir}}/bin/newrelic-admin
{% if ansible_processor|length > 0 %} {% if ansible_processor|length > 0 %}
env WORKERS={{ ansible_processor|length * worker_core_mult.cms }} env WORKERS={{ ansible_processor|length * worker_core_mult.cms }}
......
...@@ -10,7 +10,7 @@ respawn ...@@ -10,7 +10,7 @@ respawn
respawn limit 3 30 respawn limit 3 30
env PID=/var/tmp/lms.pid env PID=/var/tmp/lms.pid
#env NEW_RELIC_CONFIG_FILE={{app_base_dir}}/newrelic.ini #env NEW_RELIC_CONFIG_FILE={{app_dir}}/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin #env NEWRELIC={{venv_dir}}/bin/newrelic-admin
{% if ansible_processor|length > 0 %} {% if ansible_processor|length > 0 %}
env WORKERS={{ ansible_processor|length * worker_core_mult.lms_preview }} env WORKERS={{ ansible_processor|length * worker_core_mult.lms_preview }}
......
...@@ -7,7 +7,7 @@ respawn ...@@ -7,7 +7,7 @@ respawn
respawn limit 3 30 respawn limit 3 30
env PID=/var/tmp/lms.pid env PID=/var/tmp/lms.pid
#env NEW_RELIC_CONFIG_FILE={{app_base_dir}}/newrelic.ini #env NEW_RELIC_CONFIG_FILE={{app_dir}}/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin #env NEWRELIC={{venv_dir}}/bin/newrelic-admin
{% if ansible_processor|length > 0 %} {% if ansible_processor|length > 0 %}
env WORKERS={{ ansible_processor|length * worker_core_mult.lms }} env WORKERS={{ ansible_processor|length * worker_core_mult.lms }}
......
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
- name: edxlocal | stop mongo service - name: edxlocal | stop mongo service
service: name=mongodb state=stopped service: name=mongodb state=stopped
- name: edxlocal | move mongodb to {{ data_base_dir }} - name: edxlocal | move mongodb to {{ data_dir }}
command: mv /var/lib/mongodb {{ data_base_dir }}/. creates={{ data_base_dir }}/mongodb command: mv /var/lib/mongodb {{ data_dir }}/. creates={{ data_dir }}/mongodb
- name: edxlocal | create mongodb symlink - name: edxlocal | create mongodb symlink
file: src={{ data_base_dir }}/mongodb dest=/var/lib/mongodb state=link file: src={{ data_dir }}/mongodb dest=/var/lib/mongodb state=link
- name: edxlocal | start mongo service - name: edxlocal | start mongo service
service: name=mongodb state=started service: name=mongodb state=started
......
jenkins_home: "{{ data_base_dir }}/jenkins" jenkins_home: "{{ data_dir }}/jenkins"
jenkins_user: "jenkins" jenkins_user: "jenkins"
jenkins_group: "edx" jenkins_group: "edx"
jenkins_server_name: "jenkins.testeng.edx.org" jenkins_server_name: "jenkins.testeng.edx.org"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
file: path={{ jenkins_home }} recurse=yes state=directory file: path={{ jenkins_home }} recurse=yes state=directory
owner={{ jenkins_user }} group={{ jenkins_group }} owner={{ jenkins_user }} group={{ jenkins_group }}
# Symlink /var/lib/jenkins to {{ data_base_dir }}/jenkins # Symlink /var/lib/jenkins to {{ data_dir }}/jenkins
# since Jenkins will expect its files to be in /var/lib/jenkins # since Jenkins will expect its files to be in /var/lib/jenkins
- name: jenkins_master | Symlink /var/lib/jenkins - name: jenkins_master | Symlink /var/lib/jenkins
file: src={{ jenkins_home }} dest=/var/lib/jenkins state=link file: src={{ jenkins_home }} dest=/var/lib/jenkins state=link
......
--- ---
jenkins_workspace: "{{ data_base_dir }}/jenkins" jenkins_workspace: "{{ data_dir }}/jenkins"
jenkins_phantomjs_url: https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 jenkins_phantomjs_url: https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
jenkins_phantomjs_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2 jenkins_phantomjs_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2
jenkins_phantomjs_folder: phantomjs-1.9.1-linux-x86_64 jenkins_phantomjs_folder: phantomjs-1.9.1-linux-x86_64
...@@ -48,10 +48,10 @@ jscover_url: "http://superb-dca2.dl.sourceforge.net/project/jscover/JSCover-1.0. ...@@ -48,10 +48,10 @@ jscover_url: "http://superb-dca2.dl.sourceforge.net/project/jscover/JSCover-1.0.
jscover_version: "1.0.2" jscover_version: "1.0.2"
# Mongo config # Mongo config
mongo_dir: "{{ data_base_dir }}/mongodb" mongo_dir: "{{ data_dir }}/mongodb"
mongo_log_dir: "{{ data_base_dir }}/logs/mongodb" mongo_log_dir: "{{ data_dir }}/logs/mongodb"
# URL of S3 bucket containing pre-compiled Python packages # URL of S3 bucket containing pre-compiled Python packages
python_pkg_url: "https://s3.amazonaws.com/jenkins.python_pkgs" python_pkg_url: "https://s3.amazonaws.com/jenkins.python_pkgs"
python_download_dir: "{{ data_base_dir }}/python_pkgs" python_download_dir: "{{ data_dir }}/python_pkgs"
python_virtualenv: "{{ data_base_dir}}/venv" python_virtualenv: "{{ data_dir}}/venv"
--- ---
# Configure Mongo to use {{ data_base_dir }} so we don't # Configure Mongo to use {{ data_dir }} so we don't
# run out of disk space # run out of disk space
- name: jenkins_worker | Stop mongo service - name: jenkins_worker | Stop mongo service
service: name=mongodb state=stopped service: name=mongodb state=stopped
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
service: name=mongodb state=stopped service: name=mongodb state=stopped
tags: mongo tags: mongo
- name: mongo | move mongodb to {{ data_base_dir }} - name: mongo | move mongodb to {{ data_dir }}
command: mv /var/lib/mongodb {{ data_base_dir}}/. creates={{ data_base_dir }}/mongodb command: mv /var/lib/mongodb {{ data_dir}}/. creates={{ data_dir }}/mongodb
tags: mongo tags: mongo
- name: mongo | create mongodb symlink - name: mongo | create mongodb symlink
file: src={{ data_base_dir }}/mongodb dest=/var/lib/mongodb state=link file: src={{ data_dir }}/mongodb dest=/var/lib/mongodb state=link
tags: mongo tags: mongo
- name: mongo | copy configuration template - name: mongo | copy configuration template
......
...@@ -25,8 +25,8 @@ nginx_cfg: ...@@ -25,8 +25,8 @@ nginx_cfg:
edx_release: link edx_release: link
# path to version files for the basic # path to version files for the basic
# nginx configuration # nginx configuration
version_html: $app_base_dir/versions.html version_html: $app_dir/versions.html
version_json: $app_base_dir/versions.json version_json: $app_dir/versions.json
# default htpasswd contents set to edx/edx # default htpasswd contents set to edx/edx
# this value can be overiden in vars/secure/<group>.yml # this value can be overiden in vars/secure/<group>.yml
htpasswd: | htpasswd: |
......
auth_basic "Restricted"; auth_basic "Restricted";
auth_basic_user_file /etc/nginx/nginx.htpasswd; auth_basic_user_file /etc/nginx/nginx.htpasswd;
root {{ app_base_dir }}/main_static; root {{ app_dir }}/main_static;
index index.html index index.html
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
...@@ -50,7 +50,7 @@ server { ...@@ -50,7 +50,7 @@ server {
# Check security on this # Check security on this
location ~ /static/(?P<file>.*) { location ~ /static/(?P<file>.*) {
root {{app_base_dir}}; root {{app_dir}};
try_files /staticfiles/$file /course_static/$file =404; try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be # return a 403 for static files that shouldn't be
......
...@@ -48,7 +48,7 @@ server { ...@@ -48,7 +48,7 @@ server {
# Check security on this # Check security on this
location ~ /static/(?P<file>.*) { location ~ /static/(?P<file>.*) {
root {{app_base_dir}}; root {{app_dir}};
try_files /staticfiles/$file /course_static/$file =404; try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be # return a 403 for static files that shouldn't be
......
...@@ -50,7 +50,7 @@ server { ...@@ -50,7 +50,7 @@ server {
# Check security on this # Check security on this
location ~ /static/(?P<file>.*) { location ~ /static/(?P<file>.*) {
root {{app_base_dir}}; root {{app_dir}};
try_files /staticfiles/$file /course_static/$file =404; try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be # return a 403 for static files that shouldn't be
......
...@@ -38,7 +38,7 @@ NOTIFIER_USER_SERVICE_HTTP_AUTH_USER: "guido" ...@@ -38,7 +38,7 @@ NOTIFIER_USER_SERVICE_HTTP_AUTH_USER: "guido"
NOTIFIER_USER_SERVICE_HTTP_AUTH_PASS: "vanrossum" NOTIFIER_USER_SERVICE_HTTP_AUTH_PASS: "vanrossum"
NOTIFIER_CELERY_BROKER_URL: "django://" NOTIFIER_CELERY_BROKER_URL: "django://"
NOTIFIER_SUPERVISOR_LOG_DEST: "{{ data_base_dir }}/logs/supervisor" NOTIFIER_SUPERVISOR_LOG_DEST: "{{ data_dir }}/logs/supervisor"
NOTIFER_REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt" NOTIFER_REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
ORA_NGINX_PORT: 18060 ORA_NGINX_PORT: 18060
ORA_BASIC_AUTH: False ORA_BASIC_AUTH: False
ora_code_dir: "{{ app_base_dir }}/edx-ora" ora_code_dir: "{{ app_dir }}/edx-ora"
# Default nginx listen port # Default nginx listen port
# These should be overrided if you want # These should be overrided if you want
# to serve all content on port 80 # to serve all content on port 80
...@@ -72,7 +72,7 @@ ora_version: 'HEAD' ...@@ -72,7 +72,7 @@ ora_version: 'HEAD'
ora_pre_requirements_file: "{{ ora_code_dir }}/pre-requirements.txt" ora_pre_requirements_file: "{{ ora_code_dir }}/pre-requirements.txt"
ora_post_requirements_file: "{{ ora_code_dir }}/requirements.txt" ora_post_requirements_file: "{{ ora_code_dir }}/requirements.txt"
ease_code_dir: "{{ app_base_dir }}/ease" ease_code_dir: "{{ app_dir }}/ease"
ease_source_repo: https://github.com/edx/ease.git ease_source_repo: https://github.com/edx/ease.git
ease_version: 'HEAD' ease_version: 'HEAD'
ease_pre_requirements_file: "{{ ease_code_dir }}/pre-requirements.txt" ease_pre_requirements_file: "{{ ease_code_dir }}/pre-requirements.txt"
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
- deploy - deploy
# Do A Checkout # Do A Checkout
- name: ora | git checkout ora repo into $app_base_dir - name: ora | git checkout ora repo into $app_dir
git: dest={{ora_code_dir}} repo={{ora_source_repo}} version={{ora_version}} git: dest={{ora_code_dir}} repo={{ora_source_repo}} version={{ora_version}}
notify: notify:
- ora | restart edx-ora - ora | restart edx-ora
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Assuming the following config # Assuming the following config
# #
# my_role_s3fs_mounts: # my_role_s3fs_mounts:
# - { bucket: "my_bucket", mount_point: "{{ data_base_dir}}/s3/my_bucket", owner: "root", group: "adm", mode: "0755" } # - { bucket: "my_bucket", mount_point: "{{ data_dir}}/s3/my_bucket", owner: "root", group: "adm", mode: "0755" }
# #
# The role would need to include tasks like the following # The role would need to include tasks like the following
# #
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
XQUEUE_NGINX_PORT: 18040 XQUEUE_NGINX_PORT: 18040
XQUEUE_BASIC_AUTH: False XQUEUE_BASIC_AUTH: False
xqueue_code_dir: "{{ app_base_dir }}/xqueue" xqueue_code_dir: "{{ app_dir }}/xqueue"
# Default nginx listen port # Default nginx listen port
# These should be overrided if you want # These should be overrided if you want
# to serve all content on port 80 # to serve all content on port 80
xqueue_code_dir: "{{ app_base_dir }}/xqueue" xqueue_code_dir: "{{ app_dir }}/xqueue"
xqueue_gunicorn_port: 8040 xqueue_gunicorn_port: 8040
xqueue_gunicorn_host: 127.0.0.1 xqueue_gunicorn_host: 127.0.0.1
...@@ -49,7 +49,7 @@ xqueue_env_config: ...@@ -49,7 +49,7 @@ xqueue_env_config:
XQUEUE_WORKERS_PER_QUEUE: 12 XQUEUE_WORKERS_PER_QUEUE: 12
LOGGING_ENV : $XQUEUE_LOGGING_ENV LOGGING_ENV : $XQUEUE_LOGGING_ENV
SYSLOG_SERVER: $XQUEUE_SYSLOG_SERVER SYSLOG_SERVER: $XQUEUE_SYSLOG_SERVER
LOG_DIR : "{{ data_base_dir }}/logs/xqueue" LOG_DIR : "{{ data_dir }}/logs/xqueue"
RABBIT_HOST : $XQUEUE_RABBITMQ_HOSTNAME RABBIT_HOST : $XQUEUE_RABBITMQ_HOSTNAME
S3_BUCKET : $XQUEUE_S3_BUCKET S3_BUCKET : $XQUEUE_S3_BUCKET
S3_PATH_PREFIX: $XQUEUE_S3_PATH_PREFIX S3_PATH_PREFIX: $XQUEUE_S3_PATH_PREFIX
......
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
- deploy - deploy
- name: xqueue | create xqueue application config - name: xqueue | create xqueue application config
template: src=xqueue.env.json.j2 dest={{app_base_dir}}/xqueue.env.json mode=0640 owner={{ xqueue_user }} group=adm template: src=xqueue.env.json.j2 dest={{app_dir}}/xqueue.env.json mode=0640 owner={{ xqueue_user }} group=adm
tags: tags:
- xqueue - xqueue
- deploy - deploy
- name: xqueue | create xqueue auth file - name: xqueue | create xqueue auth file
template: src=xqueue.auth.json.j2 dest={{app_base_dir}}/xqueue.auth.json mode=0640 owner={{ xqueue_user }} group=adm template: src=xqueue.auth.json.j2 dest={{app_dir}}/xqueue.auth.json mode=0640 owner={{ xqueue_user }} group=adm
tags: tags:
- xqueue - xqueue
- deploy - deploy
# Do A Checkout # Do A Checkout
- name: xqueue | git checkout xqueue repo into {{app_base_dir}} - name: xqueue | git checkout xqueue repo into {{app_dir}}
git: dest={{xqueue_code_dir}} repo={{xqueue_source_repo}} version={{xqueue_version}} git: dest={{xqueue_code_dir}} repo={{xqueue_source_repo}} version={{xqueue_version}}
tags: tags:
- xqueue - xqueue
......
...@@ -18,18 +18,18 @@ xserver_env_config: ...@@ -18,18 +18,18 @@ xserver_env_config:
RUN_URL: $RABBIT_RUN_URL RUN_URL: $RABBIT_RUN_URL
GRADER_ROOT: $RABBIT_GRADER_ROOT GRADER_ROOT: $RABBIT_GRADER_ROOT
LOGGING_ENV: $RABBIT_LOGGING_ENV LOGGING_ENV: $RABBIT_LOGGING_ENV
LOG_DIR: "{{ data_base_dir }}/logs/xserver" LOG_DIR: "{{ data_dir }}/logs/xserver"
SYSLOG_SERVER: $RABBIT_SYSLOG_SERVER SYSLOG_SERVER: $RABBIT_SYSLOG_SERVER
SANDBOX_PYTHON: '/opt/edx_apparmor_sandbox/bin/python' 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_dir }}/xserver"
xserver_source_repo: "git://github.com/edx/xserver.git" xserver_source_repo: "git://github.com/edx/xserver.git"
# This should probably be overridden in the playbook or groupvars # This should probably be overridden in the playbook or groupvars
# with the default pointing to the head of master. # with the default pointing to the head of master.
xserver_version: HEAD xserver_version: HEAD
xserver_grader_dir: "{{ app_base_dir }}/data/content-mit-600x~2012_Fall" xserver_grader_dir: "{{ app_dir }}/data/content-mit-600x~2012_Fall"
xserver_grader_source: "git@github.com:/MITx/6.00x.git" xserver_grader_source: "git@github.com:/MITx/6.00x.git"
xserver_grader_version: HEAD xserver_grader_version: HEAD
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- deploy - deploy
- name: xserver | create xserver application config - name: xserver | create xserver application config
template: src=xserver.env.json.j2 dest={{app_base_dir}}/env.json mode=640 owner=www-data group=adm template: src=xserver.env.json.j2 dest={{app_dir}}/env.json mode=640 owner=www-data group=adm
tags: tags:
- deploy - deploy
......
...@@ -10,7 +10,7 @@ respawn ...@@ -10,7 +10,7 @@ respawn
respawn limit 3 30 respawn limit 3 30
env PID=/var/tmp/xserver.pid env PID=/var/tmp/xserver.pid
env NEW_RELIC_CONFIG_FILE={{ app_base_dir }}/newrelic.ini env NEW_RELIC_CONFIG_FILE={{ app_dir }}/newrelic.ini
env NEWRELIC={{ venv_dir }}/bin/newrelic-admin env NEWRELIC={{ venv_dir }}/bin/newrelic-admin
env WORKERS={{ ansible_processor|length }} env WORKERS={{ ansible_processor|length }}
env PORT={{ xserver_gunicorn_port }} env PORT={{ xserver_gunicorn_port }}
......
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