Merge "Adjust to per-service configuration"

This commit is contained in:
Jenkins 2017-03-03 13:58:55 +00:00 committed by Gerrit Code Review
commit c4380d9a73
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex
set -o pipefail
BACKUP_FILE="/var/ccp/backup/keystone/backup-$(date "+%Y%m%d%H%M%S").sql"
mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \
mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \
-u {{ keystone.db.username }} -p{{ keystone.db.password }} \
--single-transaction {{ keystone.db.name }} > "${BACKUP_FILE}"

View File

@ -8,7 +8,7 @@ notification_format = {{ keystone.notifications.format }}
{% endif %}
[database]
connection = mysql+pymysql://{{ keystone.db.username }}:{{ keystone.db.password }}@{{ address(service.database) }}/{{ keystone.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
connection = mysql+pymysql://{{ keystone.db.username }}:{{ keystone.db.password }}@{{ address("database") }}/{{ keystone.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
max_retries = -1
max_overflow = 60

View File

@ -38,10 +38,10 @@ service:
- fernet-manage
- name: keystone-db-create
dependencies:
- {{ service.database }}
- database
type: single
command:
mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ keystone.db.name }};
mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e "create database {{ keystone.db.name }};
create user '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
{% if db.tls.enabled %} require ssl {% endif %};
grant all privileges on {{ keystone.db.name }}.* to '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
@ -75,7 +75,7 @@ service:
dependencies:
- memcached
# {% if keystone.notifications.enable -%}
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
- notifications
# {%- endif %}
files:
- keystone-conf