summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/database')
-rw-r--r--deploy/adapters/ansible/roles/database/files/remove_user.sh14
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/main.yml35
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml14
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml73
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml71
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml88
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml75
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_config.yml70
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_install.yml40
-rw-r--r--deploy/adapters/ansible/roles/database/templates/data.j251
-rw-r--r--deploy/adapters/ansible/roles/database/templates/mongodb.conf6
-rw-r--r--deploy/adapters/ansible/roles/database/templates/my.cnf59
-rw-r--r--deploy/adapters/ansible/roles/database/templates/replica.js8
-rw-r--r--deploy/adapters/ansible/roles/database/templates/wsrep.cnf105
-rw-r--r--deploy/adapters/ansible/roles/database/vars/Debian.yml55
-rw-r--r--deploy/adapters/ansible/roles/database/vars/RedHat.yml45
-rw-r--r--deploy/adapters/ansible/roles/database/vars/main.yml39
17 files changed, 0 insertions, 848 deletions
diff --git a/deploy/adapters/ansible/roles/database/files/remove_user.sh b/deploy/adapters/ansible/roles/database/files/remove_user.sh
deleted file mode 100644
index dc0b43fa..00000000
--- a/deploy/adapters/ansible/roles/database/files/remove_user.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-mysql -uroot -Dmysql <<EOF
-use mysql;
-delete from user where user='';
-EOF
diff --git a/deploy/adapters/ansible/roles/database/tasks/main.yml b/deploy/adapters/ansible/roles/database/tasks/main.yml
deleted file mode 100644
index f28da23b..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/main.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- include_vars: "{{ ansible_os_family }}.yml"
- tags:
- - test_mongo
- - recovery
-
-- include: mariadb_install.yml
-
-- include: mariadb_cluster.yml
- tags:
- - recovery
-
-- include: mariadb_config.yml
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
-
-- include: mongodb_install.yml
- tags:
- - test_mongo
-
-- include: mongodb_config.yml
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
- tags:
- - test_mongo
-
-- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml
deleted file mode 100644
index 84704fa4..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- include: mariadb_cluster_debian.yml
- when: ansible_os_family == "Debian"
-
-- include: mariadb_cluster_redhat.yml
- when: ansible_os_family == "RedHat"
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
deleted file mode 100644
index 9752b550..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: get cluster status
- shell: |
- mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"' \
- | awk '{print $2}'
- register: cluster_status
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
-
-- name: start first node to create new cluster
- shell: >
- service mysql bootstrap;
- service mysql start;
- when: |
- inventory_hostname == haproxy_hosts.keys()[0]
- and not cluster_status.stdout | search("OPERATIONAL")
-
-- name: wait for cluster ready
- shell: |
- mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"' \
- | awk '{print $2}'
- register: cluster_status
- until: cluster_status|success
- failed_when: not cluster_status.stdout | search("OPERATIONAL")
- retries: 10
- delay: 3
- when: |
- inventory_hostname == haproxy_hosts.keys()[0]
- and not cluster_status.stdout | search("OPERATIONAL")
-
-- name: if I in the cluster nodes
- shell: |
- mysql --silent --skip-column-names \
- -e 'SHOW STATUS LIKE "wsrep_incoming_addresses"' | awk '{print $2}'
- register: cluster_nodes
- changed_when: false
-
-- name: restart other nodes and join cluster1
- shell: service mysql restart;
- when: |
- inventory_hostname != haproxy_hosts.keys()[0]
- and not cluster_nodes.stdout | search( "{{ internal_ip }}" )
- ignore_errors: "True"
-
-- name: delay 60 seconds
- shell: sleep 60
-
-- name: restart other nodes and join cluster2
- shell: service mysql restart;
- when: |
- inventory_hostname != haproxy_hosts.keys()[0]
- and not cluster_nodes.stdout | search( "{{ internal_ip }}" )
-
-- name: chmod directory
- shell: >
- chmod 755 -R /var/lib/mysql/;
- chmod 755 -R /var/log/mysql/;
- chmod 755 -R /etc/mysql/conf.d/;
-
-- name: restart first nodes
- shell: service mysql restart
- when: |
- (inventory_hostname == haproxy_hosts.keys()[0]
- and haproxy_hosts|length > 1
- and not cluster_nodes.stdout | search( '{{ internal_ip }}' ))
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml
deleted file mode 100644
index 77b18702..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: Register RECOVERY
- set_fact: RECOVERY_ENV={{RECOVERY_ENV | default('False')}}
-
-- name: killall mysqld processes
- shell: sudo killall -9 mysqld
- when: RECOVERY_ENV
- ignore_errors: "True"
-
-- name: get cluster status
- shell: |
- mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"' \
- | awk '{print $2}'
- register: cluster_status
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
-
-- name: start first node to create new cluster
- shell: service mysql start --wsrep-new-cluster
- when: |
- inventory_hostname == haproxy_hosts.keys()[0]
- and not cluster_status.stdout | search("OPERATIONAL")
-
-- name: wait for cluster ready
- shell: |
- mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"' \
- | awk '{print $2}'
- register: cluster_status
- until: cluster_status|success
- failed_when: not cluster_status.stdout | search("OPERATIONAL")
- retries: 10
- delay: 3
- when: |
- inventory_hostname == haproxy_hosts.keys()[0]
- and not cluster_status.stdout | search("OPERATIONAL")
-
-- name: if I in the cluster nodes
- shell: |
- mysql --silent --skip-column-names \
- -e 'SHOW STATUS LIKE "wsrep_incoming_addresses"' | awk '{print $2}'
- register: cluster_nodes
- changed_when: false
-
-- name: restart other nodes and join cluster
- service:
- name: mysql
- state: restarted
- enabled: "yes"
- when: |
- inventory_hostname != haproxy_hosts.keys()[0]
- and not cluster_nodes.stdout | search( "{{ internal_ip }}")
-
-- name: remove unused user
- script: remove_user.sh
- when: ansible_os_family == "RedHat"
-
-- name: restart first nodes
- service:
- name: mysql
- state: restarted
- when: |
- inventory_hostname == haproxy_hosts.keys()[0]
- and haproxy_hosts|length > 1
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
deleted file mode 100644
index 22b5d60c..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: create all needed db
- mysql_db:
- login_unix_socket=/var/run/mysqld/mysqld.sock
- name={{ item.db }}
- state=present
- with_items: "{{ credentials }}"
- tags:
- - test_db
-
-- name: create service db user
- mysql_user:
- login_unix_socket=/var/run/mysqld/mysqld.sock
- name={{ item[0].user }}
- password={{ item[0].password }}
- priv=*.*:ALL,GRANT
- host={{ item[1] }}
- state=present
- with_nested:
- - "{{ credentials }}"
- - ['%', 'localhost']
- tags:
- - test_user
-
-- name: create wsrep db user
- mysql_user:
- login_unix_socket=/var/run/mysqld/mysqld.sock
- name={{ WSREP_SST_USER }}
- password={{ WSREP_SST_PASS }}
- priv=*.*:ALL,GRANT
- host={{ item }}
- state=present
- with_items: ['%', 'localhost']
-
-- name: remove unused user
- script: remove_user.sh
- when: ansible_os_family == "RedHat"
-
-- name: restart mysql for centos noha
- service:
- name: mysql
- state: restarted
- when: >
- inventory_hostname == haproxy_hosts.keys()[0]
- and haproxy_hosts|length == 1
- and ansible_os_family == "RedHat"
-
-- name: restart mysql second time for centos noha
- service:
- name: mysql
- state: restarted
- when: >
- inventory_hostname == haproxy_hosts.keys()[0]
- and haproxy_hosts|length == 1
- and ansible_os_family == "RedHat"
-
-- name: restart first nodes
- service:
- name: mysql
- state: restarted
- when: inventory_hostname == haproxy_hosts.keys()[0]
- and haproxy_hosts|length > 1
-
-- name: wait for cluster ready
- command: mysql -e"show status like 'wsrep%'"
- register: cluster_status
- until: cluster_status|success
- failed_when: not cluster_status.stdout | search("ON")
- retries: 10
- delay: 3
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
-
-- name: restart other nodes
- service:
- name: mysql
- state: restarted
- enabled: "yes"
- when:
- - inventory_hostname != haproxy_hosts.keys()[0]
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
deleted file mode 100644
index ba800dca..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: disable auto start
- copy:
- content: "#!/bin/sh\nexit 101"
- dest: "/usr/sbin/policy-rc.d"
- mode: 0755
- when: ansible_os_family == "Debian"
-
-- name: change open file limit
- copy:
- content: "* - nofile 65536 }}"
- dest: "/etc/security/limits.conf"
- mode: 0755
-
-- name: install python-mysqldb
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: "{{ maridb_packages | union(packages_noarch) }}"
-
-- name: create conf dir for wsrep
- file: path=/etc/my.cnf.d state=directory mode=0755
- when: ansible_os_family == "RedHat"
-
-- name: update mariadb config file
- template:
- src: '{{ item.src }}'
- dest: '{{ item.dest }}'
- backup: "yes"
- mode: 0644
- with_items: "{{ mysql_config }}"
-
-- name: bugfix for rsync version 3.1
- lineinfile:
- dest: /usr/bin/wsrep_sst_rsync
- state: absent
- regexp: '{{ item }}'
- with_items:
- - "\\s*uid = \\$MYUID$"
- - "\\s*gid = \\$MYGID$"
-
-- name: enable auto start
- file:
- path=/usr/sbin/policy-rc.d
- state=absent
- when: ansible_os_family == "Debian"
-
-- name: set owner
- file:
- path: /var/lib/mysql
- owner: mysql
- group: mysql
- recurse: "yes"
- state: directory
- mode: 0755
-
-- name: get logfile stat
- stat: path='{{ mysql_data_dir }}/ib_logfile0'
- register: logfile_stat
-
-- debug: msg='{{ logfile_stat.stat.exists}}'
-- debug: msg='{{ logfile_stat.stat.size }}'
- when: logfile_stat.stat.exists
-
-- name: rm logfile if exist and size mismatch
- shell: 'rm -rf {{ mysql_data_dir }}/ib_logfile*'
- when: |
- logfile_stat.stat.exists
- and logfile_stat.stat.size != 1073741824
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
deleted file mode 100755
index 10f0322c..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: copy mongo js
- template:
- src: '{{ item.src }}'
- dest: '{{ item.dest }}'
- with_items:
- - src: replica.js
- dest: /opt/replica.js
-
-- name: init replica servers
- shell: mongo compass /opt/replica.js
-
-- name: wait replica servers are ready
- shell: |
- mongo compass --eval 'printjson(rs.status())'| \
- grep -E 'PRIMARY|SECONDARY'| wc -l
- register: servers
- until: servers.stdout|int == {{ haproxy_hosts|length }}
- retries: 60
- delay: 10
-
-- debug: msg='{{ servers.stdout |int }}'
-
-- name: wait replica servers are ready
- shell: mongo compass --eval 'printjson(rs.status())'|grep -E 'PRIMARY'|wc -l
- register: servers
- until: servers.stdout|int == 1
- retries: 60
- delay: 10
-
-- debug: msg='{{ servers.stdout |int }}'
-
-- name: Add admin user
- mongodb_user:
- login_host: "{{ internal_vip.ip }}"
- database: admin
- name: root
- password: root
- roles: 'root'
- state: present
-
-- name: create mongodb user and db
- mongodb_user:
- login_host: "{{ internal_vip.ip }}"
- login_user: root
- login_password: root
- database: ceilometer
- name: ceilometer
- password: "{{ CEILOMETER_DBPASS }}"
- roles: 'readWrite,dbAdmin'
- state: present
-
-- name: grant user privilege
- mongodb_user:
- login_host: "{{ internal_vip.ip }}"
- login_user: root
- login_password: root
- database: ceilometer
- name: ceilometer
- password: "{{ CEILOMETER_DBPASS }}"
- roles: 'readWrite,dbAdmin'
- state: present
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
deleted file mode 100755
index 67bc0499..00000000
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: install mongodb packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: "{{ mongodb_packages | union(packages_noarch) }}"
-
-- name: install pymongod packages
- pip: name={{ item }} state=present extra_args='--pre'
- with_items: "{{ pip_packages }}"
-
-- name: copy ceilometer configs
- template: src=mongodb.conf dest=/opt/os_templates backup=yes
-
-- name: update mongodb config file
- shell: |
- crudini --merge {{ mongodb_config.dest }} < /opt/os_templates/mongodb.conf
-
-- name: rm prealloc files
- file:
- dest: "{{ item }}"
- state: absent
- with_fileglob:
- - "{{ mongodb_config.journal }}"
-
-- name: manually restart mongodb server
- service: name={{ mongodb_service }} state=restarted enabled=yes
- ignore_errors: true
-
-- name: write mongodb to monitor list
- lineinfile: dest=/opt/service create=yes line={{ mongodb_service}}
-
-- name: wait for mongod ready
- wait_for: host=0.0.0.0 port=27017 delay=10
diff --git a/deploy/adapters/ansible/roles/database/templates/data.j2 b/deploy/adapters/ansible/roles/database/templates/data.j2
deleted file mode 100644
index 66c2fead..00000000
--- a/deploy/adapters/ansible/roles/database/templates/data.j2
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-mysql -uroot -Dmysql <<EOF
-drop database if exists keystone;
-drop database if exists glance;
-drop database if exists neutron;
-drop database if exists nova;
-drop database if exists cinder;
-drop database if exists heat;
-drop database if exists aodh;
-
-CREATE DATABASE keystone;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON keystone.* TO 'keystone'@'{{ host }}' IDENTIFIED BY '{{ KEYSTONE_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE glance;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON glance.* TO 'glance'@'{{ host }}' IDENTIFIED BY '{{ GLANCE_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE neutron;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON neutron.* TO 'neutron'@'{{ host }}' IDENTIFIED BY '{{ NEUTRON_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE nova;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON nova.* TO 'nova'@'{{ host }}' IDENTIFIED BY '{{ NOVA_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE cinder;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON cinder.* TO 'cinder'@'{{ host }}' IDENTIFIED BY '{{ CINDER_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE heat;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON heat.* TO 'heat'@'{{ host }}' IDENTIFIED BY '{{ HEAT_DBPASS }}';
-{% endfor %}
-
-CREATE DATABASE aodh;
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON aodh.* TO 'aodh'@'{{ host }}' IDENTIFIED BY '{{ AODH_DBPASS }}';
-{% endfor %}
-
-{% if WSREP_SST_USER is defined %}
-{% for host in ['%', 'localhost', inventory_hostname] %}
-GRANT ALL ON *.* TO '{{ WSREP_SST_USER }}'@'{{ host }}' IDENTIFIED BY '{{ WSREP_SST_PASS }}';
-{% endfor %}
-{% endif %}
-EOF
diff --git a/deploy/adapters/ansible/roles/database/templates/mongodb.conf b/deploy/adapters/ansible/roles/database/templates/mongodb.conf
deleted file mode 100644
index 7d6dda93..00000000
--- a/deploy/adapters/ansible/roles/database/templates/mongodb.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# mongodb.conf
-bind_ip = 0.0.0.0
-replSet = compass
-port = 27017
-smallfiles = true
-oplogSize = 10240
diff --git a/deploy/adapters/ansible/roles/database/templates/my.cnf b/deploy/adapters/ansible/roles/database/templates/my.cnf
deleted file mode 100644
index 1ed9b931..00000000
--- a/deploy/adapters/ansible/roles/database/templates/my.cnf
+++ /dev/null
@@ -1,59 +0,0 @@
-[client]
-port = 3306
-socket = /var/run/mysqld/mysqld.sock
-
-
-[mysqld_safe]
-socket = /var/run/mysqld/mysqld.sock
-nice = 0
-
-
-[mysql]
-default-character-set = utf8
-
-[mysqld]
-user = mysql
-collation-server = utf8_unicode_ci
-init-connect = 'SET NAMES utf8'
-character-set-server = utf8
-datadir = /var/lib/mysql
-bind-address = {{ internal_ip }}
-
-max-allowed-packet = 16M
-max-connect-errors = 1000000
-
-max_connections = {{ ansible_processor_vcpus * 100 }}
-
-wait_timeout = 28800
-tmp-table-size = 32M
-max-heap-table-size = 32M
-query-cache-type = 0
-query-cache-size = 0M
-thread-cache-size = {{ ansible_processor_vcpus * 10 }}
-open-files-limit = 65535
-table-definition-cache = 4096
-table-open-cache = 10240
-
-innodb-flush-method = O_DIRECT
-innodb-additional-mem-pool-size = 24M
-innodb-log-file-size = 1024M
-innodb-file-per-table = 1
-innodb-buffer-pool-size = 4096M
-
-innodb-read-io-threads = 4
-innodb-write-io-threads = 4
-innodb-doublewrite = 1
-innodb-log-buffer-size = 1024M
-innodb-buffer-pool-instances = 8
-innodb-log-files-in-group = 2
-innodb-thread-concurrency = {{ ansible_processor_vcpus * 2 }}
-
-innodb_stats_on_metadata = 0
-
-[mysqldump]
-quick
-quote-names
-max_allowed_packet = 16M
-
-
-!includedir {{ mysql_config_dir }}
diff --git a/deploy/adapters/ansible/roles/database/templates/replica.js b/deploy/adapters/ansible/roles/database/templates/replica.js
deleted file mode 100644
index 7e7072ff..00000000
--- a/deploy/adapters/ansible/roles/database/templates/replica.js
+++ /dev/null
@@ -1,8 +0,0 @@
-config = { _id:"compass", members:[
-{% for hostname, host in haproxy_hosts.items() %}
-{% set pair = '%s:27017' % host %}
- {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ host_index[hostname] + 1 }}},
- {% endfor %}
- ]
-};
-rs.initiate(config);
diff --git a/deploy/adapters/ansible/roles/database/templates/wsrep.cnf b/deploy/adapters/ansible/roles/database/templates/wsrep.cnf
deleted file mode 100644
index 4dc6fb7b..00000000
--- a/deploy/adapters/ansible/roles/database/templates/wsrep.cnf
+++ /dev/null
@@ -1,105 +0,0 @@
-[mysqld]
-binlog_format=ROW
-innodb_autoinc_lock_mode=2
-innodb_locks_unsafe_for_binlog=1
-
-# Query Cache is not supported with wsrep
-query_cache_size=0
-query_cache_type=0
-
-default_storage_engine = InnoDB
-
-##
-## WSREP options
-##
-
-# Full path to wsrep provider library or 'none'
-wsrep_provider={{ wsrep_provider_file }}
-
-# Provider specific configuration options
-wsrep_provider_options="gcache.size=1024M"
-
-# Logical cluster name. Should be the same for all nodes.
-wsrep_cluster_name="my_wsrep_cluster"
-
-# Group communication system handle
-{% if haproxy_hosts|length == 1 %}
-wsrep_cluster_address=gcomm://
-{% else %}
-wsrep_cluster_address=gcomm://{{ haproxy_hosts.values()|join(",") }}
-{% endif %}
-
-# Human-readable node name (non-unique). Hostname by default.
-#wsrep_node_name=
-
-# Base replication <address|hostname>[:port] of the node.
-# The values supplied will be used as defaults for state transfer receiving,
-# listening ports and so on. Default: address of the first network interface.
-wsrep_node_address={{ internal_ip }}
-
-# Address for incoming client connections. Autodetect by default.
-#wsrep_node_incoming_address=
-
-# How many threads will process writesets from other nodes
-wsrep_slave_threads={{ ansible_processor_vcpus }}
-
-# DBUG options for wsrep provider
-#wsrep_dbug_option
-
-# Generate fake primary keys for non-PK tables (required for multi-master
-# and parallel applying operation)
-wsrep_certify_nonPK=1
-
-# Maximum number of rows in write set
-wsrep_max_ws_rows=131072
-
-# Maximum size of write set
-wsrep_max_ws_size=1073741824
-
-# to enable debug level logging, set this to 1
-wsrep_debug=1
-
-# convert locking sessions into transactions
-wsrep_convert_LOCK_to_trx=0
-
-# how many times to retry deadlocked autocommits
-wsrep_retry_autocommit=3
-
-# change auto_increment_increment and auto_increment_offset automatically
-wsrep_auto_increment_control=1
-
-# retry autoinc insert, which failed for duplicate key error
-wsrep_drupal_282555_workaround=0
-
-# enable "strictly synchronous" semantics for read operations
-wsrep_causal_reads=0
-
-# Command to call when node status or cluster membership changes.
-# Will be passed all or some of the following options:
-# --status - new status of this node
-# --uuid - UUID of the cluster
-# --primary - whether the component is primary or not ("yes"/"no")
-# --members - comma-separated list of members
-# --index - index of this node in the list
-wsrep_notify_cmd=
-
-##
-## WSREP State Transfer options
-##
-
-# State Snapshot Transfer method
-wsrep_sst_method=rsync
-
-# Address on THIS node to receive SST at. DON'T SET IT TO DONOR ADDRESS!!!
-# (SST method dependent. Defaults to the first IP of the first interface)
-#wsrep_sst_receive_address=
-
-# SST authentication string. This will be used to send SST to joining nodes.
-# Depends on SST method. For mysqldump method it is root:<root password>
-wsrep_sst_auth={{ WSREP_SST_USER }}:{{ WSREP_SST_PASS }}
-
-# Desired SST donor name.
-#wsrep_sst_donor=
-
-# Protocol version to use
-# wsrep_protocol_version=
diff --git a/deploy/adapters/ansible/roles/database/vars/Debian.yml b/deploy/adapters/ansible/roles/database/vars/Debian.yml
deleted file mode 100644
index c657f62e..00000000
--- a/deploy/adapters/ansible/roles/database/vars/Debian.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-mongodb_packages:
- - mongodb-server
- - mongodb-clients
- - python-pymongo
-
-mysql_packages:
- - python-mysqldb
- - mysql-server
-
-maridb_packages:
- - apt-transport-https
- - debconf-utils
- - libaio1
- - libc6
- - libdbd-mysql-perl
- - libgcc1
- - libgcrypt20
- - libstdc++6
- - python-software-properties
- - mariadb-client
- - galera-3
- - rsync
- - socat
- - mariadb-galera-server-10.0
- - python-mysqldb
-
-pip_packages: []
-
-services: []
-
-mongodb_service: mongodb
-mysql_config:
- - dest: /etc/mysql/my.cnf
- src: my.cnf
- - dest: /etc/mysql/conf.d/wsrep.cnf
- src: wsrep.cnf
-
-mysql_config_dir: /etc/mysql/conf.d
-mysql_data_dir: /var/lib/mysql
-
-mongodb_config:
- dest: /etc/mongodb.conf
- src: mongodb.conf
- journal: /var/lib/mongodb/journal/*
-
-wsrep_provider_file: "/usr/lib/galera/libgalera_smm.so"
diff --git a/deploy/adapters/ansible/roles/database/vars/RedHat.yml b/deploy/adapters/ansible/roles/database/vars/RedHat.yml
deleted file mode 100644
index 62f331c7..00000000
--- a/deploy/adapters/ansible/roles/database/vars/RedHat.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-mysql_packages:
- - MySQL-python
- - mysql-server
-
-maridb_packages:
- - MySQL-python
- - MariaDB-Galera-server
- - MariaDB-client
- - galera
-
-mongodb_packages:
- - mongo-10gen-server
- - mongo-10gen
-
-pip_packages:
- - pymongo
-
-services: []
-
-mongodb_service: mongod
-
-mysql_config:
- - dest: /etc/my.cnf
- src: my.cnf
- - dest: /etc/my.cnf.d/wsrep.cnf
- src: wsrep.cnf
-
-mysql_config_dir: /etc/my.cnf.d
-mysql_data_dir: /var/lib/mysql
-
-mongodb_config:
- dest: /etc/mongod.conf
- src: mongodb.conf
- journal: /var/lib/mongo/journal/*
-
-wsrep_provider_file: "/usr/lib64/galera/libgalera_smm.so"
diff --git a/deploy/adapters/ansible/roles/database/vars/main.yml b/deploy/adapters/ansible/roles/database/vars/main.yml
deleted file mode 100644
index a32897f0..00000000
--- a/deploy/adapters/ansible/roles/database/vars/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-packages_noarch: []
-
-services_noarch:
- - mysql
-
-credentials:
- - user: keystone
- db: keystone
- password: "{{ KEYSTONE_DBPASS }}"
- - user: neutron
- db: neutron
- password: "{{ NEUTRON_DBPASS }}"
- - user: glance
- db: glance
- password: "{{ GLANCE_DBPASS }}"
- - user: nova
- db: nova_api
- password: "{{ NOVA_DBPASS }}"
- - user: nova
- db: nova
- password: "{{ NOVA_DBPASS }}"
- - user: cinder
- db: cinder
- password: "{{ CINDER_DBPASS }}"
- - user: heat
- db: heat
- password: "{{ HEAT_DBPASS }}"
- - user: aodh
- db: aodh
- password: "{{ AODH_DBPASS }}"