Commit 0e0a0043 by Edward Zarecor

Merge pull request #1970 from edx/e0d/add-replicas

E0d/add replicas
parents 088582a2 5a99bdab
......@@ -64,6 +64,8 @@
login_user={{ item.value.login_user }}
login_password={{ item.value.login_password }}
with_dict: databases
tags:
- dbs
- name: create mysql users and assign privileges
mysql_user: >
......@@ -76,3 +78,5 @@
login_password={{ item.value.login_password }}
append_privs=yes
with_dict: database_users
tags:
- users
\ No newline at end of file
......@@ -41,7 +41,9 @@
mode=0755
with_items:
- /edx/bin
tags:
- scripts
# These templates rely on there being a global
# read_only mysql user, you must override the default
# in order for these templates to be written out
......@@ -55,7 +57,9 @@
db_name: "{{ EDXAPP_MYSQL_DB_NAME }}"
script_name: edxapp-mysql.sh
when: COMMON_MYSQL_READ_ONLY_PASS is defined
tags:
- scripts
- name: install xqueue mysql replica scripts
template: >
src=edx/bin/mysql.sh.j2
......@@ -65,7 +69,35 @@
- db_host: "{{ XQUEUE_MYSQL_REPLICA_HOST }}"
db_name: "{{ XQUEUE_MYSQL_DB_NAME }}"
script_name: xqueue-mysql.sh
when: COMMON_MYSQL_READ_ONLY_PASS is defined and XQUEUE_MYSQL_DB_HOST is defined
when: COMMON_MYSQL_READ_ONLY_PASS is defined and XQUEUE_MYSQL_REPLICA_HOST is defined
tags:
- scripts
- name: install analytics api mysql replica scripts
template: >
src=edx/bin/mysql.sh.j2
dest=/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode=0755 owner=root group=root
with_items:
- db_host: "{{ ANALYTICS_API_REPORTS_REPLICA_DB_HOST }}"
db_name: "{{ ANALYTICS_API_REPORTS_DB_NAME }}"
script_name: analytics-mysql.sh
when: COMMON_MYSQL_READ_ONLY_PASS is defined and ANALYTICS_API_REPORTS_REPLICA_DB_HOST is defined
tags:
- scripts
- name: install ecommerce mysql replica scripts
template: >
src=edx/bin/mysql.sh.j2
dest=/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode=0755 owner=root group=root
with_items:
- db_host: "{{ ECOMMERCE_REPLICA_DB_HOST }}"
db_name: "{{ ECOMMERCE_DEFAULT_DB_NAME }}"
script_name: ecommerce-mysql.sh
when: COMMON_MYSQL_READ_ONLY_PASS is defined and ECOMMERCE_REPLICA_DB_HOST is defined
tags:
- scripts
# These templates rely on there being a global
# read_only mongo user, you must override the default
......@@ -85,3 +117,5 @@
db_port: "{{ FORUM_MONGO_PORT }}"
script_name: forum-mongo.sh
when: COMMON_MONGO_READ_ONLY_PASS is defined
tags:
- scripts
\ No newline at end of file
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