Commit b5598253 by John Jarvis

moving group_vars/all to the common role, using all-caps with COMMON

prefix
parent 9342a083
...@@ -10,8 +10,8 @@ cfg_dir: /edx/etc ...@@ -10,8 +10,8 @@ cfg_dir: /edx/etc
os_name: ubuntu os_name: ubuntu
ENV_NAME: 'default_env' COMMON_ENV_NAME: 'default_env'
ENV_TYPE: 'default_type' COMMON_ENV_TYPE: 'default_type'
# these pathes are relative to the playbook dir # these pathes are relative to the playbook dir
# directory for secret settings (keys, etc) # directory for secret settings (keys, etc)
...@@ -21,6 +21,6 @@ secure_dir: 'secure_example' ...@@ -21,6 +21,6 @@ secure_dir: 'secure_example'
# things like nginx template files # things like nginx template files
local_dir: '../../ansible_local' local_dir: '../../ansible_local'
# include http/https # include http/https
PYPI_MIRROR_URL: 'https://pypi.python.org/simple' COMMON_PYPI_MIRROR_URL: 'https://pypi.python.org/simple'
# do not include http/https # do not include http/https
GIT_MIRROR: 'github.com' COMMON_GIT_MIRROR: 'github.com'
# Override these variables
# to change the base directory
# where edX is installed
COMMON_DATA_DIR: /edx/var
COMMON_APP_DIR: /edx/app
COMMON_LOG_DIR: "{{ data_dir }}/log"
# these directories contain
# symlinks for convenience
COMMON_BIN_DIR: /edx/bin
COMMON_CFG_DIR: /edx/etc
COMMON_ENV_NAME: 'default_env'
COMMON_ENV_TYPE: 'default_type'
COMMON_PYPI_MIRROR_URL: 'https://pypi.python.org/simple'
# do not include http/https
COMMON_GIT_MIRROR: 'github.com'
common_debian_pkgs: common_debian_pkgs:
- ack-grep - ack-grep
- lynx-cur - lynx-cur
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
path={{ item }} state=directory owner=root path={{ item }} state=directory owner=root
group=root mode=0755 group=root mode=0755
with_items: with_items:
- "{{ data_dir }}" - "{{ COMMON_DATA_DIR }}"
- "{{ app_dir }}" - "{{ COMMON_APP_DIR }}"
- "{{ log_dir }}" - "{{ COMMON_LOG_DIR }}"
- "{{ bin_dir }}" - "{{ COMMON_BIN_DIR }}"
- "{{ cfg_dir }}" - "{{ COMMON_CFG_DIR }}"
- name: common | Install role-independent useful system packages - name: common | Install role-independent useful system packages
# do this before log dir setup; rsyslog package guarantees syslog user present # do this before log dir setup; rsyslog package guarantees syslog user present
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
- name: common | pip install virtualenv - name: common | pip install virtualenv
pip: > pip: >
name="{{ item }}" state=present name="{{ item }}" state=present
extra_args="-i {{ PYPI_MIRROR_URL }}" extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
with_items: common_pip_pkgs with_items: common_pip_pkgs
- name: common | Install rsyslog configuration for edX - name: common | Install rsyslog configuration for edX
......
{{log_dir}}/*/edx.log { {{ COMMON_LOG_DIR }}/*/edx.log {
create create
compress compress
copytruncate copytruncate
......
...@@ -27,12 +27,12 @@ auth,authpriv.* /var/log/auth.log ...@@ -27,12 +27,12 @@ auth,authpriv.* /var/log/auth.log
$template tracking,"%syslogtag%%msg%\n" $template tracking,"%syslogtag%%msg%\n"
# looks for [service_name=<name>] in the beginning of the log message, # looks for [service_name=<name>] in the beginning of the log message,
# if it exists the log will go into {{log_dir}}/<name>/edx.log, otherwise # if it exists the log will go into {{ COMMON_LOG_DIR }}/<name>/edx.log, otherwise
# it will go into {{log_dir}}/edx.log # it will go into {{ COMMON_LOG_DIR }}/edx.log
$template DynaFile,"{{log_dir}}/%syslogtag:R,ERE,1,BLANK:\[service_variant=([a-zA-Z_-]*)\].*--end%/edx.log" $template DynaFile,"{{ COMMON_LOG_DIR }}/%syslogtag:R,ERE,1,BLANK:\[service_variant=([a-zA-Z_-]*)\].*--end%/edx.log"
local0.* -?DynaFile local0.* -?DynaFile
local1.* {{log_dir}}/tracking.log;tracking local1.* {{ COMMON_LOG_DIR }}/tracking.log;tracking
#cron.* /var/log/cron.log #cron.* /var/log/cron.log
#daemon.* -/var/log/daemon.log #daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log kern.* -/var/log/kern.log
......
--- ---
devpi_venv_dir: "{{ app_dir }}/devpi/venvs/devpi" devpi_venv_dir: "{{ COMMON_APP_DIR }}/devpi/venvs/devpi"
devpi_pip_pkgs: devpi_pip_pkgs:
- devpi-server - devpi-server
- eventlet - eventlet
......
...@@ -13,9 +13,9 @@ DISCERN_MYSQL_HOST: 'localhost' ...@@ -13,9 +13,9 @@ DISCERN_MYSQL_HOST: 'localhost'
DISCERN_MYSQL_PORT: '3306' DISCERN_MYSQL_PORT: '3306'
discern_app_dir: "{{ app_dir }}/discern" discern_app_dir: "{{ COMMON_APP_DIR }}/discern"
discern_code_dir: "{{ discern_app_dir }}/discern" discern_code_dir: "{{ discern_app_dir }}/discern"
discern_data_dir: "{{ data_dir }}/discern" discern_data_dir: "{{ COMMON_DATA_DIR }}/discern"
discern_venvs_dir: "{{ discern_app_dir }}/venvs" discern_venvs_dir: "{{ discern_app_dir }}/venvs"
discern_venv_dir: "{{ discern_venvs_dir }}/discern" discern_venv_dir: "{{ discern_venvs_dir }}/discern"
discern_venv_bin: "{{ discern_venv_dir }}/bin" discern_venv_bin: "{{ discern_venv_dir }}/bin"
......
...@@ -51,5 +51,5 @@ ...@@ -51,5 +51,5 @@
- name: discern | create a symlink for venv python - name: discern | create a symlink for venv python
file: > file: >
src="{{ discern_venv_bin }}/python" src="{{ discern_venv_bin }}/python"
dest={{ bin_dir }}/python.discern dest={{ COMMON_BIN_DIR }}/python.discern
state=link state=link
...@@ -92,9 +92,9 @@ EDXAPP_LANG: 'en_US.UTF-8' ...@@ -92,9 +92,9 @@ EDXAPP_LANG: 'en_US.UTF-8'
#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: "{{ data_dir }}/edxapp" edxapp_data_dir: "{{ COMMON_DATA_DIR }}/edxapp"
edxapp_app_dir: "{{ app_dir }}/edxapp" edxapp_app_dir: "{{ COMMON_APP_DIR }}/edxapp"
edxapp_log_dir: "{{ log_dir }}/edxapp" edxapp_log_dir: "{{ COMMON_LOG_DIR }}/edxapp"
edxapp_venvs_dir: "{{ edxapp_app_dir }}/venvs" edxapp_venvs_dir: "{{ edxapp_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_venv_bin: "{{ edxapp_venv_dir }}/bin"
...@@ -229,7 +229,7 @@ generic_env_config: &edxapp_generic_env ...@@ -229,7 +229,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_dir }}/logs/edx" LOG_DIR: "{{ COMMON_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
...@@ -343,11 +343,11 @@ worker_core_mult: ...@@ -343,11 +343,11 @@ worker_core_mult:
#To turn off theming, specify edxapp_theme_name: '' #To turn off theming, specify edxapp_theme_name: ''
#Stanford, for example, uses edxapp_theme_name: 'stanford' #Stanford, for example, uses edxapp_theme_name: 'stanford'
edxapp_theme_name: '' edxapp_theme_name: ''
edxapp_theme_source_repo: 'https://{{ GIT_MIRROR }}/Stanford-Online/edx-theme.git' edxapp_theme_source_repo: 'https://{{ COMMON_GIT_MIRROR }}/Stanford-Online/edx-theme.git'
edxapp_theme_version: 'HEAD' edxapp_theme_version: 'HEAD'
# make this the public URL instead of writable # make this the public URL instead of writable
edx_platform_repo: "https://{{ GIT_MIRROR }}/edx/edx-platform.git" edx_platform_repo: "https://{{ COMMON_GIT_MIRROR }}/edx/edx-platform.git"
# `edx_platform_commit` can be anything that git recognizes as a commit # `edx_platform_commit` can be anything that git recognizes as a commit
# reference, including a tag, a branch name, or a commit hash # reference, including a tag, a branch name, or a commit hash
edx_platform_commit: 'HEAD' edx_platform_commit: 'HEAD'
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
# #
- name: edxapp | Updating requirement files for git mirror - name: edxapp | Updating requirement files for git mirror
command: | command: |
/bin/sed -i -e 's/github\.com/{{ GIT_MIRROR }}/g' {{ item }} /bin/sed -i -e 's/github\.com/{{ COMMON_GIT_MIRROR }}/g' {{ item }}
with_items: with_items:
- "{{ pre_requirements_file }}" - "{{ pre_requirements_file }}"
- "{{ post_requirements_file }}" - "{{ post_requirements_file }}"
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
requirements="{{pre_requirements_file}}" requirements="{{pre_requirements_file}}"
virtualenv="{{edxapp_venv_dir}}" virtualenv="{{edxapp_venv_dir}}"
state=present state=present
extra_args="-i {{ PYPI_MIRROR_URL }}" extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags:
- deploy - deploy
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ base_requirements_file }} shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ base_requirements_file }}
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags:
- deploy - deploy
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
requirements="{{post_requirements_file}}" requirements="{{post_requirements_file}}"
virtualenv="{{edxapp_venv_dir}}" virtualenv="{{edxapp_venv_dir}}"
state=present state=present
extra_args="-i {{ PYPI_MIRROR_URL }}" extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags:
- deploy - deploy
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ item }} shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ item }}
with_items: with_items:
- "{{ repo_requirements_file }}" - "{{ repo_requirements_file }}"
- "{{ github_requirements_file }}" - "{{ github_requirements_file }}"
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ item }} shell: cd {{ edxapp_code_dir }} && {{ edxapp_venv_dir }}/bin/pip install -i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w --use-mirrors -r {{ item }}
with_items: with_items:
- "{{ sandbox_base_requirements }}" - "{{ sandbox_base_requirements }}"
- "{{ sandbox_local_requirements }}" - "{{ sandbox_local_requirements }}"
......
...@@ -58,5 +58,5 @@ ...@@ -58,5 +58,5 @@
- name: edxapp | create a symlink for venv python - name: edxapp | create a symlink for venv python
file: > file: >
src="{{ edxapp_venv_bin }}/python" src="{{ edxapp_venv_bin }}/python"
dest={{ bin_dir }}/python.edxapp dest={{ COMMON_BIN_DIR }}/python.edxapp
state=link state=link
{{log_dir}}/tracking.log { {{ COMMON_LOG_DIR }}/tracking.log {
create create
compress compress
delaycompress delaycompress
......
--- ---
forum_app_dir: "{{ app_dir }}/forum" forum_app_dir: "{{ COMMON_APP_DIR }}/forum"
forum_code_dir: "{{ forum_app_dir }}/cs_comments_service" forum_code_dir: "{{ forum_app_dir }}/cs_comments_service"
forum_data_dir: "{{ data_dir }}/forum" forum_data_dir: "{{ COMMON_DATA_DIR }}/forum"
forum_rbenv_dir: "{{ forum_app_dir }}" forum_rbenv_dir: "{{ forum_app_dir }}"
forum_rbenv_root: "{{ forum_app_dir }}/.rbenv" forum_rbenv_root: "{{ forum_app_dir }}/.rbenv"
forum_rbenv_shims: "{{ forum_rbenv_root }}/shims" forum_rbenv_shims: "{{ forum_rbenv_root }}/shims"
......
jenkins_home: "{{ data_dir }}/jenkins" jenkins_home: "{{ COMMON_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"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,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_dir }}/jenkins # Symlink /var/lib/jenkins to {{ COMMON_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_dir }}/jenkins" jenkins_workspace: "{{ COMMON_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_dir }}/mongodb" mongo_dir: "{{ COMMON_DATA_DIR }}/mongodb"
mongo_log_dir: "{{ data_dir }}/logs/mongodb" mongo_log_dir: "{{ COMMON_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_dir }}/python_pkgs" python_download_dir: "{{ COMMON_DATA_DIR }}/python_pkgs"
python_virtualenv: "{{ data_dir}}/venv" python_virtualenv: "{{ COMMON_DATA_DIR}}/venv"
--- ---
# Configure Mongo to use {{ data_dir }} so we don't # Configure Mongo to use {{ COMMON_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
......
...@@ -6,8 +6,8 @@ mongo_key_file: '/etc/mongodb_key' ...@@ -6,8 +6,8 @@ mongo_key_file: '/etc/mongodb_key'
mongo_repl_set: rs0 mongo_repl_set: rs0
mongo_cluster_members: mongo_cluster_members:
mongo_data_dir: "{{ data_dir }}/mongo" mongo_data_dir: "{{ COMMON_DATA_DIR }}/mongo"
mongo_log_dir: "{{ log_dir }}/mongo" mongo_log_dir: "{{ COMMON_LOG_DIR }}/mongo"
mongo_user: mongodb mongo_user: mongodb
MONGO_USERS: MONGO_USERS:
- user: cs_comments_service - user: cs_comments_service
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: mongo | install python pymongo for mongo_user ansible module - name: mongo | install python pymongo for mongo_user ansible module
pip: > pip: >
name=pymongo state=present name=pymongo state=present
version=2.6.3 extra_args="-i {{ PYPI_MIRROR_URL }}" version=2.6.3 extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
- name: mongo | add the mongodb signing key - name: mongo | add the mongodb signing key
apt_key: > apt_key: >
......
# Variables for nginx role # Variables for nginx role
--- ---
nginx_app_dir: "{{ app_dir }}/nginx" nginx_app_dir: "{{ COMMON_APP_DIR }}/nginx"
nginx_data_dir: "{{ data_dir }}/nginx" nginx_data_dir: "{{ COMMON_DATA_DIR }}/nginx"
nginx_conf_dir: "{{ app_dir }}/conf.d" nginx_conf_dir: "{{ COMMON_APP_DIR }}/conf.d"
nginx_log_dir: "{{ log_dir }}/nginx" nginx_log_dir: "{{ COMMON_LOG_DIR }}/nginx"
nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available" nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available"
nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled" nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled"
nginx_user: root nginx_user: root
......
...@@ -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_dir }}/logs/supervisor" NOTIFIER_SUPERVISOR_LOG_DEST: "{{ COMMON_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,9 +3,9 @@ ...@@ -3,9 +3,9 @@
ORA_NGINX_PORT: 18060 ORA_NGINX_PORT: 18060
ORA_BASIC_AUTH: False ORA_BASIC_AUTH: False
ora_app_dir: "{{ app_dir }}/ora" ora_app_dir: "{{ COMMON_APP_DIR }}/ora"
ora_code_dir: "{{ ora_app_dir }}/ora" ora_code_dir: "{{ ora_app_dir }}/ora"
ora_data_dir: "{{ data_dir }}/ora" ora_data_dir: "{{ COMMON_DATA_DIR }}/ora"
ora_venvs_dir: "{{ ora_app_dir }}/venvs" ora_venvs_dir: "{{ ora_app_dir }}/venvs"
ora_venv_dir: "{{ ora_venvs_dir }}/ora" ora_venv_dir: "{{ ora_venvs_dir }}/ora"
ora_venv_bin: "{{ ora_venv_dir }}/bin" ora_venv_bin: "{{ ora_venv_dir }}/bin"
......
...@@ -31,4 +31,4 @@ ...@@ -31,4 +31,4 @@
- name: ora | create a symlink for venv python - name: ora | create a symlink for venv python
file: > file: >
src="{{ ora_venv_bin }}/python" src="{{ ora_venv_bin }}/python"
dest={{ bin_dir }}/python.ora state=link dest={{ COMMON_BIN_DIR }}/python.ora state=link
...@@ -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_dir}}/s3/my_bucket", owner: "root", group: "adm", mode: "0755" } # - { bucket: "my_bucket", mount_point: "{{ COMMON_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
# #
......
...@@ -23,17 +23,17 @@ SPLUNKFORWARDER_DEB: !!null ...@@ -23,17 +23,17 @@ SPLUNKFORWARDER_DEB: !!null
SPLUNKFORWARDER_PASSWORD: !!null SPLUNKFORWARDER_PASSWORD: !!null
SPLUNKFORWARDER_LOG_ITEMS: SPLUNKFORWARDER_LOG_ITEMS:
- directory: '{{log_dir}}' - directory: '{{ COMMON_LOG_DIR }}'
recursive: true recursive: true
index: '{{ENV_TYPE}}-{{ENV_NAME}}' index: '{{COMMON_ENV_TYPE}}-{{COMMON_ENV_NAME}}'
sourcetype: 'edx' sourcetype: 'edx'
- directory: '/var/log' - directory: '/var/log'
recursive: true recursive: true
index: '{{ENV_TYPE}}-{{ENV_NAME}}' index: '{{COMMON_ENV_TYPE}}-{{COMMON_ENV_NAME}}'
sourcetype: 'syslog' sourcetype: 'syslog'
- directory: '{{log_dir}}/nginx' - directory: '{{ COMMON_LOG_DIR }}/nginx'
recursive: true recursive: true
index: '{{ENV_TYPE}}-{{ENV_NAME}}' index: '{{COMMON_ENV_TYPE}}-{{COMMON_ENV_NAME}}'
sourcetype: 'nginx' sourcetype: 'nginx'
# #
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
# Defaults for role supervisor # Defaults for role supervisor
# #
--- ---
supervisor_app_dir: "{{ app_dir }}/supervisor" supervisor_app_dir: "{{ COMMON_APP_DIR }}/supervisor"
supervisor_cfg_dir: "{{ supervisor_app_dir }}/conf.d" supervisor_cfg_dir: "{{ supervisor_app_dir }}/conf.d"
supervisor_data_dir: "{{ data_dir }}/supervisor" supervisor_data_dir: "{{ COMMON_DATA_DIR }}/supervisor"
supervisor_venvs_dir: "{{ supervisor_app_dir }}/venvs" supervisor_venvs_dir: "{{ supervisor_app_dir }}/venvs"
supervisor_venv_dir: "{{ supervisor_venvs_dir }}/supervisor" supervisor_venv_dir: "{{ supervisor_venvs_dir }}/supervisor"
supervisor_venv_bin: "{{ supervisor_venv_dir }}/bin" supervisor_venv_bin: "{{ supervisor_venv_dir }}/bin"
...@@ -23,5 +23,5 @@ supervisor_ctl: "{{ supervisor_venv_bin }}/supervisorctl" ...@@ -23,5 +23,5 @@ supervisor_ctl: "{{ supervisor_venv_bin }}/supervisorctl"
# which by default is set to www-data in # which by default is set to www-data in
# the common role # the common role
supervisor_user: supervisor supervisor_user: supervisor
supervisor_log_dir: "{{ log_dir }}/supervisor" supervisor_log_dir: "{{ COMMON_LOG_DIR }}/supervisor"
supervisor_cfg: "{{ supervisor_app_dir }}/supervisord.conf" supervisor_cfg: "{{ supervisor_app_dir }}/supervisord.conf"
...@@ -73,19 +73,19 @@ ...@@ -73,19 +73,19 @@
- name: supervisor | create a symlink for supervisortctl - name: supervisor | create a symlink for supervisortctl
file: > file: >
src={{ supervisor_ctl }} src={{ supervisor_ctl }}
dest={{ bin_dir }}/{{ supervisor_ctl|basename }} dest={{ COMMON_BIN_DIR }}/{{ supervisor_ctl|basename }}
state=link state=link
- name: supervisor | create a symlink for supervisor cfg - name: supervisor | create a symlink for supervisor cfg
file: > file: >
src={{ supervisor_cfg }} src={{ supervisor_cfg }}
dest={{ cfg_dir }}/{{ supervisor_cfg|basename }} dest={{ COMMON_CFG_DIR }}/{{ supervisor_cfg|basename }}
state=link state=link
- name: supervisor | create a symlink for supervisor cfg - name: supervisor | create a symlink for supervisor cfg
file: > file: >
src={{ supervisor_cfg_dir }} src={{ supervisor_cfg_dir }}
dest={{ bin_dir }}/supervisor.{{ supervisor_cfg_dir|basename }} dest={{ COMMON_BIN_DIR }}/supervisor.{{ supervisor_cfg_dir|basename }}
state=link state=link
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
XQUEUE_NGINX_PORT: 18040 XQUEUE_NGINX_PORT: 18040
XQUEUE_BASIC_AUTH: False XQUEUE_BASIC_AUTH: False
xqueue_app_dir: "{{ app_dir }}/xqueue" xqueue_app_dir: "{{ COMMON_APP_DIR }}/xqueue"
xqueue_code_dir: "{{ xqueue_app_dir }}/xqueue" xqueue_code_dir: "{{ xqueue_app_dir }}/xqueue"
xqueue_data_dir: "{{ data_dir }}/xqueue" xqueue_data_dir: "{{ COMMON_DATA_DIR }}/xqueue"
xqueue_venvs_dir: "{{ xqueue_app_dir }}/venvs" xqueue_venvs_dir: "{{ xqueue_app_dir }}/venvs"
xqueue_venv_dir: "{{ xqueue_venvs_dir }}/xqueue" xqueue_venv_dir: "{{ xqueue_venvs_dir }}/xqueue"
xqueue_venv_bin: "{{ xqueue_venv_dir }}/bin" xqueue_venv_bin: "{{ xqueue_venv_dir }}/bin"
...@@ -50,7 +50,7 @@ xqueue_env_config: ...@@ -50,7 +50,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_dir }}/logs/xqueue" LOG_DIR : "{{ COMMON_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
......
...@@ -51,5 +51,5 @@ ...@@ -51,5 +51,5 @@
- name: xqueue | create a symlink for venv python - name: xqueue | create a symlink for venv python
file: > file: >
src="{{ xqueue_venv_bin }}/python" src="{{ xqueue_venv_bin }}/python"
dest={{ bin_dir }}/python.xqueue dest={{ COMMON_BIN_DIR }}/python.xqueue
state=link state=link
...@@ -14,16 +14,16 @@ XSERVER_SYSLOG_SERVER: '' ...@@ -14,16 +14,16 @@ XSERVER_SYSLOG_SERVER: ''
# source repo # source repo
XSERVER_GRADER_CHECKOUT: False XSERVER_GRADER_CHECKOUT: False
xserver_app_dir: "{{ app_dir }}/xserver" xserver_app_dir: "{{ COMMON_APP_DIR }}/xserver"
xserver_code_dir: "{{ xserver_app_dir }}/xserver" xserver_code_dir: "{{ xserver_app_dir }}/xserver"
xserver_data_dir: "{{ data_dir }}/xserver" xserver_data_dir: "{{ COMMON_DATA_DIR }}/xserver"
xserver_venvs_dir: "{{ xserver_app_dir }}/venvs" xserver_venvs_dir: "{{ xserver_app_dir }}/venvs"
xserver_venv_dir: "{{ xserver_venvs_dir }}/xserver" xserver_venv_dir: "{{ xserver_venvs_dir }}/xserver"
xserver_venv_sandbox_dir: "{{ xserver_venv_dir }}-sandbox" xserver_venv_sandbox_dir: "{{ xserver_venv_dir }}-sandbox"
xserver_venv_bin: "{{ xserver_venv_dir }}/bin" xserver_venv_bin: "{{ xserver_venv_dir }}/bin"
xserver_user: "xserver" xserver_user: "xserver"
xserver_sandbox_user: "xserver-sandbox" xserver_sandbox_user: "xserver-sandbox"
xserver_log_dir: "{{ log_dir }}/xserver" xserver_log_dir: "{{ COMMON_LOG_DIR }}/xserver"
xserver_env_config: xserver_env_config:
RUN_URL: $XSERVER_RUN_URL RUN_URL: $XSERVER_RUN_URL
......
...@@ -68,6 +68,6 @@ ...@@ -68,6 +68,6 @@
- name: xserver | create a symlink for venv python - name: xserver | create a symlink for venv python
file: > file: >
src="{{ xserver_venv_bin }}/python" src="{{ xserver_venv_bin }}/python"
dest={{ bin_dir }}/python.xserver dest={{ COMMON_BIN_DIR }}/python.xserver
state=link state=link
...@@ -178,7 +178,7 @@ cms_env_config: ...@@ -178,7 +178,7 @@ cms_env_config:
'KEY_PREFIX': 'hidden-prod' 'KEY_PREFIX': 'hidden-prod'
'LOCATION': [ 'hidden-prod', 'LOCATION': [ 'hidden-prod',
'hidden-prod'] 'hidden-prod']
'LOG_DIR': '{{log_dir}}/edx' 'LOG_DIR': '{{ COMMON_LOG_DIR }}/edx'
'LOGGING_ENV': 'cms-dev' 'LOGGING_ENV': 'cms-dev'
'SITE_NAME': 'studio.cms-dev.m.edx.org' 'SITE_NAME': 'studio.cms-dev.m.edx.org'
'SYSLOG_SERVER': 'syslog.a.m.i4x.org' 'SYSLOG_SERVER': 'syslog.a.m.i4x.org'
......
...@@ -48,8 +48,8 @@ ora_version: $ora_version ...@@ -48,8 +48,8 @@ ora_version: $ora_version
ease_version: $ease_version ease_version: $ease_version
ansible_ssh_private_key_file: /var/lib/jenkins/${keypair}.pem ansible_ssh_private_key_file: /var/lib/jenkins/${keypair}.pem
PYPI_MIRROR_URL: 'https://pypi.edx.org/root/pypi/+simple/' COMMON_PYPI_MIRROR_URL: 'https://pypi.edx.org/root/pypi/+simple/'
GIT_MIRROR: 'git.edx.org' COMMON_GIT_MIRROR: 'git.edx.org'
migrate_only: '$run_migration' migrate_only: '$run_migration'
EOF EOF
......
...@@ -79,8 +79,8 @@ region: $region ...@@ -79,8 +79,8 @@ region: $region
instance_tags: '{"environment": "$environment", "github_username": "$github_username", "Name": "$name_tag", "source": "jenkins", "owner": "$BUILD_USER"}' instance_tags: '{"environment": "$environment", "github_username": "$github_username", "Name": "$name_tag", "source": "jenkins", "owner": "$BUILD_USER"}'
root_ebs_size: $root_ebs_size root_ebs_size: $root_ebs_size
name_tag: $name_tag name_tag: $name_tag
PYPI_MIRROR_URL: 'https://pypi.edx.org/root/pypi/+simple/' COMMON_PYPI_MIRROR_URL: 'https://pypi.edx.org/root/pypi/+simple/'
GIT_MIRROR: 'git.edx.org' COMMON_GIT_MIRROR: 'git.edx.org'
gh_users: gh_users:
- jarv - jarv
- feanil - feanil
......
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