Commit 370cdf62 by Arbab Nazar

Merge pull request #2897 from edx/arbab/modified-adhocreporting

pass the read replica hosts list as external variables from secure repo
parents ff6039cd 7f642fa9
...@@ -45,3 +45,16 @@ MONGODB_APT_KEY: "7F0CEB10" ...@@ -45,3 +45,16 @@ MONGODB_APT_KEY: "7F0CEB10"
MONGODB_APT_KEYSERVER: "keyserver.ubuntu.com" MONGODB_APT_KEYSERVER: "keyserver.ubuntu.com"
MONGODB_REPO: "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" MONGODB_REPO: "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
mongo_version: 3.0.8 mongo_version: 3.0.8
# AD_HOC_REPORTING_REPLICA_DB_HOSTS:
# - db_host: "{{ EDXAPP_MYSQL_REPLICA_HOST }}"
# db_name: "{{ EDXAPP_MYSQL_DB_NAME }}"
# script_name: edxapp-mysql.sh
# #depends on no other vars
# depends_on: True
AD_HOC_REPORTING_REPLICA_DB_HOSTS: []
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
- name: install system packages - name: install system packages
apt: apt:
pkg: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: ad_hoc_reporting_debian_pkgs with_items: ad_hoc_reporting_debian_pkgs
tags: tags:
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
- name: install mongo shell - name: install mongo shell
apt: apt:
pkg: mongodb-org-shell={{ mongo_version }} name: mongodb-org-shell={{ mongo_version }}
state: present state: present
install_recommends: yes install_recommends: yes
force: yes force: yes
...@@ -92,42 +92,7 @@ ...@@ -92,42 +92,7 @@
- scripts - scripts
- scripts:mysql - scripts:mysql
- install:code - install:code
with_items: with_items: AD_HOC_REPORTING_REPLICA_DB_HOSTS
- db_host: "{{ EDXAPP_MYSQL_REPLICA_HOST }}"
db_name: "{{ EDXAPP_MYSQL_DB_NAME }}"
script_name: edxapp-mysql.sh
#depends on no other vars
depends_on: True
- db_host: "{{ EDXAPP_MYSQL_CSMH_REPLICA_HOST }}"
db_name: "{{ EDXAPP_MYSQL_CSMH_DB_NAME }}"
script_name: csmh-mysql.sh
depends_on: True
- db_host: "{{ AD_HOC_REPORTING_XQUEUE_MYSQL_REPLICA_HOST }}"
db_name: "{{ XQUEUE_MYSQL_DB_NAME }}"
script_name: xqueue-mysql.sh
depends_on: "{{ AD_HOC_REPORTING_XQUEUE_MYSQL_REPLICA_HOST | default(None) }}"
- db_host: "{{ AD_HOC_REPORTING_ANALYTICS_API_REPORTS_REPLICA_DB_HOST }}"
db_name: "{{ ANALYTICS_API_REPORTS_DB_NAME }}"
script_name: analytics-mysql.sh
depends_on: "{{ AD_HOC_REPORTING_ANALYTICS_API_REPORTS_REPLICA_DB_HOST | default(None) }}"
- db_host: "{{ AD_HOC_REPORTING_ANALYTICS_API_DEFAULT_DB_HOST }}"
db_name: "{{ ANALYTICS_API_DEFAULT_DB_NAME }}"
script_name: analytics-django-mysql.sh
depends_on: "{{ AD_HOC_REPORTING_ANALYTICS_API_DEFAULT_DB_HOST | default(None) }}"
- db_host: "{{ AD_HOC_REPORTING_ECOMMERCE_REPLICA_DB_HOST }}"
db_name: "{{ ECOMMERCE_DEFAULT_DB_NAME }}"
script_name: ecommerce-mysql.sh
depends_on: "{{ AD_HOC_REPORTING_ECOMMERCE_REPLICA_DB_HOST | default(None) }}"
- db_host: "{{ AD_HOC_REPORTING_INSIGHTS_REPLICA_DB_HOST }}"
db_name: "{{ INSIGHTS_DATABASE_NAME }}"
script_name: insights-mysql.sh
depends_on: "{{ AD_HOC_REPORTING_INSIGHTS_REPLICA_DB_HOST | default(None) }}"
# These templates rely on there being a global # These templates rely on there being a global
# read_only mongo user, you must override the default # read_only mongo user, you must override the default
......
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