Browse Source

Messaging multi-backend support

To set backend-related dependencies and configurations
for oslo.messaging.

Change-Id: I9b065f92416a5b9ae1ca54d85f342d0f2581ed27
Kirill Bespalov 2 years ago
parent
commit
ed10d71070
4 changed files with 8 additions and 12 deletions
  1. 4
    9
      service/files/heat.conf.j2
  2. 1
    1
      service/heat-api-cfn.yaml
  3. 1
    1
      service/heat-api.yaml
  4. 2
    1
      service/heat-engine.yaml

+ 4
- 9
service/files/heat.conf.j2 View File

@@ -4,7 +4,6 @@ use_syslog = False
4 4
 use_stderr = True
5 5
 use_forwarded_for = True
6 6
 region_name_for_services = RegionOne
7
-rpc_backend = rabbit
8 7
 rpc_response_timeout=600
9 8
 stack_domain_admin = {{ heat.domain.user }}
10 9
 stack_domain_admin_password = {{ heat.domain.password }}
@@ -12,19 +11,12 @@ stack_user_domain_name = {{ heat.domain.name }}
12 11
 heat_waitcondition_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1/waitcondition
13 12
 heat_metadata_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}
14 13
 
15
-
16 14
 [clients]
17 15
 endpoint_type = internalURL
18 16
 
19 17
 [database]
20 18
 connection = mysql+pymysql://{{ heat.db.username }}:{{ heat.db.password }}@{{ address(service.database) }}/{{ heat.db.name }}
21 19
 
22
-[oslo_messaging_rabbit]
23
-rabbit_userid = {{ rabbitmq.user }}
24
-rabbit_password = {{ rabbitmq.password }}
25
-rabbit_ha_queues = true
26
-rabbit_hosts = rabbitmq
27
-
28 20
 [keystone_authtoken]
29 21
 auth_version = v3
30 22
 auth_uri = {{ address('keystone', keystone.public_port, with_scheme=True) }}/v3
@@ -59,8 +51,11 @@ bind_port = {{ heat.api_port.cont }}
59 51
 bind_host = {{ network_topology["private"]["address"] }}
60 52
 bind_port = {{ heat.api_cfn_port.cont }}
61 53
 
62
-
63 54
 [cache]
64 55
 backend = oslo_cache.memcache_pool
65 56
 enabled = True
66 57
 memcache_servers = {{ address('memcached', memcached.port) }}
58
+
59
+{# messaging macros template #}
60
+{{ oslo_messaging[messaging.backend.rpc]('rpc_config') }}
61
+{{ oslo_messaging[messaging.backend.notifications]('notifications_config') }}

+ 1
- 1
service/heat-api-cfn.yaml View File

@@ -33,7 +33,7 @@ service:
33 33
             openstack endpoint create --region RegionOne cloudformation admin {{ address('heat-api-cfn', heat.api_cfn_port, with_scheme=True) }}/v1
34 34
       daemon:
35 35
         dependencies:
36
-          - rabbitmq
36
+          - "{{ messaging.dependencies[messaging.backend.rpc] }}"
37 37
           # heat-api in dependencies, because it prepares DB, which will be used
38 38
           - heat-api
39 39
         files:

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

@@ -91,7 +91,7 @@ service:
91 91
             - grant-doman-user-admin-privileges
92 92
       daemon:
93 93
         dependencies:
94
-          - rabbitmq
94
+          - "{{ messaging.dependencies[messaging.backend.rpc] }}"
95 95
         files:
96 96
           - heat-conf
97 97
         command: heat-api --config-file /etc/heat/heat.conf

+ 2
- 1
service/heat-engine.yaml View File

@@ -8,7 +8,8 @@ service:
8 8
         command: heat-engine --config-file /etc/heat/heat.conf
9 9
         dependencies:
10 10
           - heat-api
11
-          - rabbitmq
11
+          - "{{ messaging.dependencies[messaging.backend.rpc] }}"
12
+          - "{{ messaging.dependencies[messaging.backend.notifications] }}"
12 13
         files:
13 14
           - heat.conf
14 15
 files:

Loading…
Cancel
Save