Browse Source

Adjust to per-service configuration

Change-Id: Iba26e7fd74f2e75d93f1863d48f89cbec344fd83
Depends-On: Ia4d29167cea6dfd19a1970706aafda51a31d5b24
Andrey Pavlov 2 years ago
parent
commit
935a186bbc

+ 3
- 3
service/designate-api.yaml View File

@@ -9,10 +9,10 @@ service:
9 9
       pre:
10 10
         - name: designate-main-db-create
11 11
           dependencies:
12
-            - {{ service.database }}
12
+            - database
13 13
           type: single
14 14
           command:
15
-            mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ designate.db.name.main_database }};
15
+            mysql -u root -p{{ db.root_password }} -h {{ address('database') }} -e "create database {{ designate.db.name.main_database }};
16 16
             create user '{{ designate.db.username }}'@'%' identified by '{{ designate.db.password }}'
17 17
             {% if db.tls.enabled %} require ssl {% endif %};
18 18
             grant all privileges on {{ designate.db.name.main_database }}.* to '{{ designate.db.username }}'@'%' identified by '{{ designate.db.password }}'
@@ -56,7 +56,7 @@ service:
56 56
           command: openstack endpoint create --region RegionOne dns admin  {{ address('designate-api', designate.api_port, with_scheme=True) }}
57 57
       daemon:
58 58
         dependencies:
59
-          - "{{ messaging.dependencies[messaging.backend.rpc] }}"
59
+          - rpc
60 60
         files:
61 61
           - designate-conf
62 62
           - api-paste

+ 2
- 2
service/designate-pool-manager.yaml View File

@@ -7,11 +7,11 @@ service:
7 7
       pre:
8 8
         - name: designate-pool-manager-db-create
9 9
           dependencies:
10
-            - {{ service.database }}
10
+            - database
11 11
             - designate-main-db-create
12 12
           type: single
13 13
           command:
14
-            mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ designate.db.name.pool_manager }};
14
+            mysql -u root -p{{ db.root_password }} -h {{ address('database') }} -e "create database {{ designate.db.name.pool_manager }};
15 15
             grant all privileges on {{ designate.db.name.pool_manager }}.* to '{{ designate.db.username }}'@'%' identified by '{{ designate.db.password }}'
16 16
             {% if db.tls.enabled %} require ssl {% endif %};"
17 17
         - name: designate-pool-update

+ 2
- 2
service/files/designate.conf.j2 View File

@@ -116,7 +116,7 @@ pool_id = {{ designate.pool.pool_id }}
116 116
 # SQLAlchemy Pool Manager Cache
117 117
 #------------------------------
118 118
 [pool_manager_cache:sqlalchemy]
119
-connection = mysql+pymysql://{{ designate.db.username }}:{{ designate.db.password }}@{{ address(service.database) }}/{{ designate.db.name.pool_manager }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
119
+connection = mysql+pymysql://{{ designate.db.username }}:{{ designate.db.password }}@{{ address("database") }}/{{ designate.db.name.pool_manager }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
120 120
 
121 121
 ########################
122 122
 ## Storage Configuration
@@ -125,7 +125,7 @@ connection = mysql+pymysql://{{ designate.db.username }}:{{ designate.db.passwor
125 125
 # SQLAlchemy Storage
126 126
 #-------------------
127 127
 [storage:sqlalchemy]
128
-connection = mysql+pymysql://{{ designate.db.username }}:{{ designate.db.password }}@{{ address(service.database) }}/{{ designate.db.name.main_database }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
128
+connection = mysql+pymysql://{{ designate.db.username }}:{{ designate.db.password }}@{{ address("database") }}/{{ designate.db.name.main_database }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
129 129
 
130 130
 ########################
131 131
 ## Handler Configuration

Loading…
Cancel
Save