Browse Source

Merge "Adjust to per-service configuration"

changes/61/441761/1
Jenkins 2 years ago
parent
commit
022bd8b8fb

+ 1
- 1
service/files/backup.sh.j2 View File

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

+ 1
- 1
service/files/glance-api.conf.j2 View File

@@ -22,7 +22,7 @@ show_image_direct_url = true
22 22
 show_multiple_locations = true
23 23
 
24 24
 [database]
25
-connection = mysql+pymysql://{{ glance.db.username }}:{{ glance.db.password }}@{{ address(service.database) }}/{{ glance.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
25
+connection = mysql+pymysql://{{ glance.db.username }}:{{ glance.db.password }}@{{ address("database") }}/{{ glance.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
26 26
 max_retries = -1
27 27
 
28 28
 {{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}

+ 1
- 1
service/files/glance-registry.conf.j2 View File

@@ -13,7 +13,7 @@ bind_host = {{ network_topology["private"]["address"] }}
13 13
 bind_port = {{ glance.registry_port.cont }}
14 14
 
15 15
 [database]
16
-connection = mysql+pymysql://{{ glance.db.username }}:{{ glance.db.password }}@{{ address(service.database) }}/{{ glance.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
16
+connection = mysql+pymysql://{{ glance.db.username }}:{{ glance.db.password }}@{{ address("database") }}/{{ glance.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
17 17
 max_retries = -1
18 18
 
19 19
 {{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}

+ 2
- 2
service/glance-api.yaml View File

@@ -13,10 +13,10 @@ service:
13 13
       pre:
14 14
         - name: glance-db-create
15 15
           dependencies:
16
-            - {{ service.database }}
16
+            - database
17 17
           type: single
18 18
           command:
19
-            mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ glance.db.name }};
19
+            mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e "create database {{ glance.db.name }};
20 20
             create user '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
21 21
             {% if db.tls.enabled %} require ssl {% endif %};
22 22
             grant all privileges on {{ glance.db.name }}.* to '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'

Loading…
Cancel
Save