Commit 7888e7f1 by John Jarvis

Create a var in defaults for storage_base_dir which defaults to /mnt

parent 7fa492f1
...@@ -2,8 +2,9 @@ ...@@ -2,8 +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
storage_base_dir: /mnt
app_base_dir: /opt/wwc app_base_dir: /opt/wwc
log_base_dir: /mnt/logs log_base_dir: {{ storage_base_dir }}/logs
venv_dir: /opt/edx venv_dir: /opt/edx
os_name: ubuntu os_name: ubuntu
......
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
- pre_install - pre_install
- update - update
- name: common | Create the base directory for storage
file: >
path={{ storagage_base_dir }}
state=directory
owner=root
group=root
mode=0755
- name: common | Create application root - name: common | Create application root
# In the future consider making group edx r/t adm # In the future consider making group edx r/t adm
file: path={{ app_base_dir }} state=directory owner=root group=adm mode=2775 file: path={{ app_base_dir }} state=directory owner=root group=adm mode=2775
......
...@@ -154,7 +154,7 @@ generic_env_config: &edxapp_generic_env ...@@ -154,7 +154,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: '/mnt/logs/edx' LOG_DIR: "{{ storage_base_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
......
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,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 /mnt - name: edxlocal | move mongodb to {{ storage_base_dir }}
command: mv /var/lib/mongodb /mnt/. creates=/mnt/mongodb command: mv /var/lib/mongodb {{ storage_base_dir }}/. creates={{ storage_base_dir }}/mongodb
- name: edxlocal | create mongodb symlink - name: edxlocal | create mongodb symlink
file: src=/mnt/mongodb dest=/var/lib/mongodb state=link file: src={{ storage_base_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: /mnt/jenkins jenkins_home: "{{ storage_base_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 /mnt/jenkins # Symlink /var/lib/jenkins to {{ storage_base_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: /mnt/jenkins jenkins_workspace: "{{ storage_base_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: "/mnt/mongodb" mongo_dir: "{{ storage_base_dir }}/mongodb"
mongo_log_dir: "/mnt/logs/mongodb" mongo_log_dir: "{{ storage_base_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: "/mnt/python_pkgs" python_download_dir: "{{ storage_base_dir }}/python_pkgs"
python_virtualenv: "/mnt/venv" python_virtualenv: "{{ storage_base_dir}}/venv"
--- ---
# Configure Mongo to use /mnt so we don't # Configure Mongo to use {{ storage_base_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 /mnt - name: mongo | move mongodb to {{ storage_base_dir }}
command: mv /var/lib/mongodb /mnt/. creates=/mnt/mongodb command: mv /var/lib/mongodb {{ storage_base_dir}}/. creates={{ storage_base_dir }}/mongodb
tags: mongo tags: mongo
- name: mongo | create mongodb symlink - name: mongo | create mongodb symlink
file: src=/mnt/mongodb dest=/var/lib/mongodb state=link file: src={{ storage_base_dir }}/mongodb dest=/var/lib/mongodb state=link
tags: mongo tags: mongo
- name: mongo | copy configuration template - name: mongo | copy configuration template
......
...@@ -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: "/mnt/logs/supervisor" NOTIFIER_SUPERVISOR_LOG_DEST: "{{ storage_base_dir }}/logs/supervisor"
NOTIFER_REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt" NOTIFER_REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"
......
...@@ -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: "/mnt/s3/my_bucket", owner: "root", group: "adm", mode: "0755" } # - { bucket: "my_bucket", mount_point: "{{ storage_base_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
# #
......
...@@ -45,7 +45,7 @@ xqueue_env_config: ...@@ -45,7 +45,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 : '/mnt/logs/xqueue' LOG_DIR : "{{ storage_base_dir }}/logs/xqueue"
RABBIT_HOST : $XQUEUE_RABBIT_HOSTNAME RABBIT_HOST : $XQUEUE_RABBIT_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
......
...@@ -15,7 +15,7 @@ xserver_env_config: ...@@ -15,7 +15,7 @@ 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: '/mnt/logs/xserver' LOG_DIR: "{{ storage_base_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'
......
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