summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-03 13:57:56 +0000
committerGerrit Code Review <review@openstack.org>2017-03-03 13:57:56 +0000
commit022bd8b8fbd0c2757c09559406cbbba6c7a5f791 (patch)
tree947428b4099d6bd5119a7d1df8a7edfd4764c466
parentb368e4833eb986df3a1e89467b88078365454cda (diff)
parent2310af59e59d539d15ab4d078a348e05954a234a (diff)
Merge "Adjust to per-service configuration"
-rw-r--r--service/files/backup.sh.j22
-rw-r--r--service/files/glance-api.conf.j22
-rw-r--r--service/files/glance-registry.conf.j22
-rw-r--r--service/glance-api.yaml4
4 files changed, 5 insertions, 5 deletions
diff --git a/service/files/backup.sh.j2 b/service/files/backup.sh.j2
index 1f57758..958aa5a 100644
--- a/service/files/backup.sh.j2
+++ b/service/files/backup.sh.j2
@@ -1,6 +1,6 @@
1#!/bin/bash -ex 1#!/bin/bash -ex
2set -o pipefail 2set -o pipefail
3BACKUP_FILE="/var/ccp/backup/glance/backup-$(date "+%Y%m%d%H%M%S").sql" 3BACKUP_FILE="/var/ccp/backup/glance/backup-$(date "+%Y%m%d%H%M%S").sql"
4mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \ 4mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \
5 -u {{ glance.db.username }} -p{{ glance.db.password }} \ 5 -u {{ glance.db.username }} -p{{ glance.db.password }} \
6 --single-transaction {{ glance.db.name }} > "${BACKUP_FILE}" 6 --single-transaction {{ glance.db.name }} > "${BACKUP_FILE}"
diff --git a/service/files/glance-api.conf.j2 b/service/files/glance-api.conf.j2
index 4542c40..e325565 100644
--- a/service/files/glance-api.conf.j2
+++ b/service/files/glance-api.conf.j2
@@ -22,7 +22,7 @@ show_image_direct_url = true
22show_multiple_locations = true 22show_multiple_locations = true
23 23
24[database] 24[database]
25connection = 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 %} 25connection = 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 %}
26max_retries = -1 26max_retries = -1
27 27
28{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }} 28{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}
diff --git a/service/files/glance-registry.conf.j2 b/service/files/glance-registry.conf.j2
index 3b4a705..0bc5c48 100644
--- a/service/files/glance-registry.conf.j2
+++ b/service/files/glance-registry.conf.j2
@@ -13,7 +13,7 @@ bind_host = {{ network_topology["private"]["address"] }}
13bind_port = {{ glance.registry_port.cont }} 13bind_port = {{ glance.registry_port.cont }}
14 14
15[database] 15[database]
16connection = 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 %} 16connection = 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 %}
17max_retries = -1 17max_retries = -1
18 18
19{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }} 19{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}
diff --git a/service/glance-api.yaml b/service/glance-api.yaml
index c3a13cf..ef205c4 100644
--- a/service/glance-api.yaml
+++ b/service/glance-api.yaml
@@ -13,10 +13,10 @@ service:
13 pre: 13 pre:
14 - name: glance-db-create 14 - name: glance-db-create
15 dependencies: 15 dependencies:
16 - {{ service.database }} 16 - database
17 type: single 17 type: single
18 command: 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 create user '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}' 20 create user '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
21 {% if db.tls.enabled %} require ssl {% endif %}; 21 {% if db.tls.enabled %} require ssl {% endif %};
22 grant all privileges on {{ glance.db.name }}.* to '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}' 22 grant all privileges on {{ glance.db.name }}.* to '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'