Browse Source

Merge "Adjust to per-service configuration"

changes/61/441761/1
Jenkins 3 years ago
parent
commit
022bd8b8fb
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      service/files/backup.sh.j2
  2. +1
    -1
      service/files/glance-api.conf.j2
  3. +1
    -1
      service/files/glance-registry.conf.j2
  4. +2
    -2
      service/glance-api.yaml

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

@@ -1,6 +1,6 @@
#!/bin/bash -ex
set -o pipefail
BACKUP_FILE="/var/ccp/backup/glance/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 {{ glance.db.username }} -p{{ glance.db.password }} \
--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
show_multiple_locations = true

[database]
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 %}
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 %}
max_retries = -1

{{ 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"] }}
bind_port = {{ glance.registry_port.cont }}

[database]
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 %}
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 %}
max_retries = -1

{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}

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

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

Loading…
Cancel
Save