Commit 7888e7f1 by John Jarvis

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

parent 7fa492f1
......@@ -2,8 +2,9 @@
# This should only have variables
# that are applicable to all edX roles
storage_base_dir: /mnt
app_base_dir: /opt/wwc
log_base_dir: /mnt/logs
log_base_dir: {{ storage_base_dir }}/logs
venv_dir: /opt/edx
os_name: ubuntu
......
......@@ -10,6 +10,14 @@
- pre_install
- 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
# In the future consider making group edx r/t adm
file: path={{ app_base_dir }} state=directory owner=root group=adm mode=2775
......
......@@ -154,7 +154,7 @@ generic_env_config: &edxapp_generic_env
WIKI_ENABLED: true
SYSLOG_SERVER: $EDXAPP_SYSLOG_SERVER
SITE_NAME: $EDXAPP_SITE_NAME
LOG_DIR: '/mnt/logs/edx'
LOG_DIR: "{{ storage_base_dir }}/logs/edx"
MEDIA_URL: $EDXAPP_MEDIA_URL
ANALYTICS_SERVER_URL: $EDXAPP_ANALYTICS_SERVER_URL
FEEDBACK_SUBMISSION_EMAIL: $EDXAPP_FEEDBACK_SUBMISSION_EMAIL
......
......@@ -44,11 +44,11 @@
- name: edxlocal | stop mongo service
service: name=mongodb state=stopped
- name: edxlocal | move mongodb to /mnt
command: mv /var/lib/mongodb /mnt/. creates=/mnt/mongodb
- name: edxlocal | move mongodb to {{ storage_base_dir }}
command: mv /var/lib/mongodb {{ storage_base_dir }}/. creates={{ storage_base_dir }}/mongodb
- 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
service: name=mongodb state=started
......@@ -71,4 +71,4 @@
state=present
- name: edxlocal | install memcached
apt: pkg=memcached state=present
\ No newline at end of file
apt: pkg=memcached state=present
jenkins_home: /mnt/jenkins
jenkins_home: "{{ storage_base_dir }}/jenkins"
jenkins_user: "jenkins"
jenkins_group: "edx"
jenkins_server_name: "jenkins.testeng.edx.org"
......
......@@ -34,7 +34,7 @@
file: path={{ jenkins_home }} recurse=yes state=directory
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
- name: jenkins_master | Symlink /var/lib/jenkins
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_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2
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.
jscover_version: "1.0.2"
# Mongo config
mongo_dir: "/mnt/mongodb"
mongo_log_dir: "/mnt/logs/mongodb"
mongo_dir: "{{ storage_base_dir }}/mongodb"
mongo_log_dir: "{{ storage_base_dir }}/logs/mongodb"
# URL of S3 bucket containing pre-compiled Python packages
python_pkg_url: "https://s3.amazonaws.com/jenkins.python_pkgs"
python_download_dir: "/mnt/python_pkgs"
python_virtualenv: "/mnt/venv"
python_download_dir: "{{ storage_base_dir }}/python_pkgs"
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
- name: jenkins_worker | Stop mongo service
service: name=mongodb state=stopped
......
......@@ -12,12 +12,12 @@
service: name=mongodb state=stopped
tags: mongo
- name: mongo | move mongodb to /mnt
command: mv /var/lib/mongodb /mnt/. creates=/mnt/mongodb
- name: mongo | move mongodb to {{ storage_base_dir }}
command: mv /var/lib/mongodb {{ storage_base_dir}}/. creates={{ storage_base_dir }}/mongodb
tags: mongo
- 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
- name: mongo | copy configuration template
......
......@@ -38,7 +38,7 @@ NOTIFIER_USER_SERVICE_HTTP_AUTH_USER: "guido"
NOTIFIER_USER_SERVICE_HTTP_AUTH_PASS: "vanrossum"
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"
......
......@@ -23,7 +23,7 @@
# Assuming the following config
#
# 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
#
......@@ -89,4 +89,4 @@
shell:
/usr/bin/make install
chdir={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}
\ No newline at end of file
......@@ -45,7 +45,7 @@ xqueue_env_config:
XQUEUE_WORKERS_PER_QUEUE: 12
LOGGING_ENV : $XQUEUE_LOGGING_ENV
SYSLOG_SERVER: $XQUEUE_SYSLOG_SERVER
LOG_DIR : '/mnt/logs/xqueue'
LOG_DIR : "{{ storage_base_dir }}/logs/xqueue"
RABBIT_HOST : $XQUEUE_RABBIT_HOSTNAME
S3_BUCKET : $XQUEUE_S3_BUCKET
S3_PATH_PREFIX: $XQUEUE_S3_PATH_PREFIX
......
......@@ -15,7 +15,7 @@ xserver_env_config:
RUN_URL: $RABBIT_RUN_URL
GRADER_ROOT: $RABBIT_GRADER_ROOT
LOGGING_ENV: $RABBIT_LOGGING_ENV
LOG_DIR: '/mnt/logs/xserver'
LOG_DIR: "{{ storage_base_dir }}/logs/xserver"
SYSLOG_SERVER: $RABBIT_SYSLOG_SERVER
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