summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Pavlov <apavlov@mirantis.com>2017-02-27 09:40:10 +0000
committerAndrey Pavlov <apavlov@mirantis.com>2017-02-28 11:23:07 +0000
commit2310af59e59d539d15ab4d078a348e05954a234a (patch)
tree4e09336e69178ce16099a6aa01cbec6dfa1a9829
parent27d01257d4fbbd94cd26fa4942d584e59aab277d (diff)
Adjust to per-service configuration
Notes
Notes (review): Verified-1: Mirantis CCP CI <mirantis-fuel-ccp-ci@mirantis.com> Code-Review+2: Sergey Reshetnyak <sreshetniak@mirantis.com> Code-Review+2: Proskurin Kirill <kproskurin@mirantis.com> Workflow+1: Proskurin Kirill <kproskurin@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 03 Mar 2017 13:57:56 +0000 Reviewed-on: https://review.openstack.org/438394 Project: openstack/fuel-ccp-glance Branch: refs/heads/master
-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 f5ecd28..d28b35f 100644
--- a/service/files/glance-api.conf.j2
+++ b/service/files/glance-api.conf.j2
@@ -16,7 +16,7 @@ show_image_direct_url = true
16show_multiple_locations = true 16show_multiple_locations = true
17 17
18[database] 18[database]
19connection = 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 %} 19connection = 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 %}
20max_retries = -1 20max_retries = -1
21 21
22{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }} 22{{ 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 92104cd..118a32f 100644
--- a/service/files/glance-registry.conf.j2
+++ b/service/files/glance-registry.conf.j2
@@ -9,7 +9,7 @@ bind_host = {{ network_topology["private"]["address"] }}
9bind_port = {{ glance.registry_port.cont }} 9bind_port = {{ glance.registry_port.cont }}
10 10
11[database] 11[database]
12connection = 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 %} 12connection = 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 %}
13max_retries = -1 13max_retries = -1
14 14
15{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }} 15{{ keystone_authtoken.keystone_authtoken(glance.user, glance.password) }}
diff --git a/service/glance-api.yaml b/service/glance-api.yaml
index adf6a39..a14a7f2 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 }}'