Messaging multi-backend support

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

Change-Id: I9b065f92416a5b9ae1ca54d85f342d0f2581ed27
This commit is contained in:
Kirill Bespalov 2016-12-28 18:25:11 +03:00
parent aa96cf1285
commit ed10d71070
4 changed files with 8 additions and 12 deletions

View File

@ -4,7 +4,6 @@ use_syslog = False
use_stderr = True use_stderr = True
use_forwarded_for = True use_forwarded_for = True
region_name_for_services = RegionOne region_name_for_services = RegionOne
rpc_backend = rabbit
rpc_response_timeout=600 rpc_response_timeout=600
stack_domain_admin = {{ heat.domain.user }} stack_domain_admin = {{ heat.domain.user }}
stack_domain_admin_password = {{ heat.domain.password }} stack_domain_admin_password = {{ heat.domain.password }}
@ -12,19 +11,12 @@ stack_user_domain_name = {{ heat.domain.name }}
heat_waitcondition_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1/waitcondition heat_waitcondition_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1/waitcondition
heat_metadata_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }} heat_metadata_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}
[clients] [clients]
endpoint_type = internalURL endpoint_type = internalURL
[database] [database]
connection = mysql+pymysql://{{ heat.db.username }}:{{ heat.db.password }}@{{ address(service.database) }}/{{ heat.db.name }} connection = mysql+pymysql://{{ heat.db.username }}:{{ heat.db.password }}@{{ address(service.database) }}/{{ heat.db.name }}
[oslo_messaging_rabbit]
rabbit_userid = {{ rabbitmq.user }}
rabbit_password = {{ rabbitmq.password }}
rabbit_ha_queues = true
rabbit_hosts = rabbitmq
[keystone_authtoken] [keystone_authtoken]
auth_version = v3 auth_version = v3
auth_uri = {{ address('keystone', keystone.public_port, with_scheme=True) }}/v3 auth_uri = {{ address('keystone', keystone.public_port, with_scheme=True) }}/v3
@ -59,8 +51,11 @@ bind_port = {{ heat.api_port.cont }}
bind_host = {{ network_topology["private"]["address"] }} bind_host = {{ network_topology["private"]["address"] }}
bind_port = {{ heat.api_cfn_port.cont }} bind_port = {{ heat.api_cfn_port.cont }}
[cache] [cache]
backend = oslo_cache.memcache_pool backend = oslo_cache.memcache_pool
enabled = True enabled = True
memcache_servers = {{ address('memcached', memcached.port) }} memcache_servers = {{ address('memcached', memcached.port) }}
{# messaging macros template #}
{{ oslo_messaging[messaging.backend.rpc]('rpc_config') }}
{{ oslo_messaging[messaging.backend.notifications]('notifications_config') }}

View File

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

View File

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

View File

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