Browse Source

Merge "Moving tls flag from percona to db group"

changes/78/436378/1
Jenkins 3 years ago
committed by Gerrit Code Review
parent
commit
e96c3bc529
4 changed files with 7 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. +4
    -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 percona.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \
mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.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

@@ -16,7 +16,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 percona.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
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 %}
max_retries = -1

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


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

@@ -9,7 +9,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 percona.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
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 %}
max_retries = -1

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


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

@@ -18,9 +18,9 @@ service:
command:
mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ glance.db.name }};
create user '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
{% if percona.tls.enabled %} require ssl {% endif %};
{% if db.tls.enabled %} require ssl {% endif %};
grant all privileges on {{ glance.db.name }}.* to '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
{% if percona.tls.enabled %} require ssl {% endif %};"
{% if db.tls.enabled %} require ssl {% endif %};"
- name: glance-db-sync
files:
- glance-api
@@ -69,6 +69,8 @@ service:
- glance-swift-conf
# {% endif %}
command: glance-api
dependencies:
- memcached
# {% if glance.bootstrap.enable %}
post:
- name: glance-cirros-image-upload


Loading…
Cancel
Save