Merge "Adjust to per-service configuration"
This commit is contained in:
commit
88e7544475
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
BACKUP_FILE="/var/ccp/backup/nova/backup-$(date "+%Y%m%d%H%M%S").sql"
|
BACKUP_FILE="/var/ccp/backup/nova/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 {{ nova.db.username }} -p{{ nova.db.password }} \
|
-u {{ nova.db.username }} -p{{ nova.db.password }} \
|
||||||
--single-transaction {{ nova.db.name }} > "${BACKUP_FILE}"
|
--single-transaction {{ nova.db.name }} > "${BACKUP_FILE}"
|
||||||
BACKUP_FILE_API="/var/ccp/backup/nova/backup-$(date "+%Y%m%d%H%M%S")-api.sql"
|
BACKUP_FILE_API="/var/ccp/backup/nova/backup-$(date "+%Y%m%d%H%M%S")-api.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 {{ nova.db.username }} -p{{ nova.db.password }} \
|
-u {{ nova.db.username }} -p{{ nova.db.password }} \
|
||||||
--single-transaction {{ nova.db.api_name }} > "${BACKUP_FILE_API}"
|
--single-transaction {{ nova.db.api_name }} > "${BACKUP_FILE_API}"
|
||||||
|
|
|
@ -132,13 +132,13 @@ username = {{ neutron.username }}
|
||||||
password = {{ neutron.password }}
|
password = {{ neutron.password }}
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address(service.database) }}/{{ nova.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
|
connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address("database") }}/{{ nova.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
|
||||||
max_pool_size = 50
|
max_pool_size = 50
|
||||||
max_overflow = 1000
|
max_overflow = 1000
|
||||||
max_retries = -1
|
max_retries = -1
|
||||||
|
|
||||||
[api_database]
|
[api_database]
|
||||||
connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address(service.database) }}/{{ nova.db.api_name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
|
connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address("database") }}/{{ nova.db.api_name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
|
||||||
max_retries = -1
|
max_retries = -1
|
||||||
|
|
||||||
[cache]
|
[cache]
|
||||||
|
|
|
@ -14,7 +14,7 @@ service:
|
||||||
pre:
|
pre:
|
||||||
- name: nova-db-create
|
- name: nova-db-create
|
||||||
type: single
|
type: single
|
||||||
command: mysql -v -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e 'create database `{{ nova.db.name }}`;
|
command: mysql -v -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ nova.db.name }}`;
|
||||||
create database `{{ nova.db.api_name }}`;
|
create database `{{ nova.db.api_name }}`;
|
||||||
create user "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
create user "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
{% if db.tls.enabled %} require ssl {% endif %};
|
{% if db.tls.enabled %} require ssl {% endif %};
|
||||||
|
@ -23,7 +23,7 @@ service:
|
||||||
grant all privileges on `{{ nova.db.api_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
grant all privileges on `{{ nova.db.api_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
{% if db.tls.enabled %} require ssl {% endif %};'
|
{% if db.tls.enabled %} require ssl {% endif %};'
|
||||||
dependencies:
|
dependencies:
|
||||||
- {{ service.database }}
|
- database
|
||||||
files:
|
files:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
- name: nova-db-sync
|
- name: nova-db-sync
|
||||||
|
|
|
@ -33,8 +33,8 @@ service:
|
||||||
- nova-db-migrations
|
- nova-db-migrations
|
||||||
- nova-libvirt:local
|
- nova-libvirt:local
|
||||||
- nova-conductor
|
- nova-conductor
|
||||||
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
|
- rpc
|
||||||
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
|
- notifications
|
||||||
files:
|
files:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
# {% if nova.libvirt.tls.enabled %}
|
# {% if nova.libvirt.tls.enabled %}
|
||||||
|
|
|
@ -10,8 +10,8 @@ service:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
dependencies:
|
dependencies:
|
||||||
- nova-db-migrations
|
- nova-db-migrations
|
||||||
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
|
- rpc
|
||||||
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
|
- notifications
|
||||||
files:
|
files:
|
||||||
nova.conf:
|
nova.conf:
|
||||||
path: /etc/nova/nova.conf
|
path: /etc/nova/nova.conf
|
||||||
|
|
|
@ -10,8 +10,8 @@ service:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
dependencies:
|
dependencies:
|
||||||
- nova-db-migrations
|
- nova-db-migrations
|
||||||
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
|
- rpc
|
||||||
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
|
- notifications
|
||||||
files:
|
files:
|
||||||
nova.conf:
|
nova.conf:
|
||||||
path: /etc/nova/nova.conf
|
path: /etc/nova/nova.conf
|
||||||
|
|
Loading…
Reference in New Issue