Browse Source

Use database service name from config

Change-Id: Ief38f9ae826133d3c005c0a8881504e14bd406ad
Depends-on: Iacc3f02fdd4f39edb5c95d144ffff00b65baa55a
Sergey Reshetnyak 2 years ago
parent
commit
23246cf6da
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      service/files/heat.conf.j2
  2. 2
    2
      service/heat-api.yaml

+ 1
- 1
service/files/heat.conf.j2 View File

@@ -7,7 +7,7 @@ region_name_for_services = RegionOne
7 7
 rpc_backend = rabbit
8 8
 
9 9
 [database]
10
-connection = mysql+pymysql://{{ heat.db.username }}:{{ heat.db.password }}@{{ address('mariadb') }}/{{ heat.db.name }}
10
+connection = mysql+pymysql://{{ heat.db.username }}:{{ heat.db.password }}@{{ address(service.database) }}/{{ heat.db.name }}
11 11
 
12 12
 [oslo_messaging_rabbit]
13 13
 rabbit_userid = {{ rabbitmq.user }}

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

@@ -14,10 +14,10 @@ service:
14 14
       pre:
15 15
         - name: heat-db-create
16 16
           dependencies:
17
-            - mariadb
17
+            - {{ service.database }}
18 18
           type: single
19 19
           command:
20
-            mysql -u root -p{{ db.root_password }} -h {{ address('mariadb') }} -e "create database {{ heat.db.name }};
20
+            mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ heat.db.name }};
21 21
             grant all privileges on {{ heat.db.name }}.* to '{{ heat.db.username }}'@'%' identified by '{{ heat.db.password }}';"
22 22
         - name: heat-db-sync
23 23
           files:

Loading…
Cancel
Save