Update to use oslo.messaging services for RPC and Notify

This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters
replace the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be
transparent to the aodh service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Update transport_url generation (add for notifications)
* Add oslo.messaging to tests inventory
* Update tests
* Add release note
* Update README and example

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: I356e7256f5e8090f35dce8a02fd633638fd659fa
This commit is contained in:
Andrew Smith 2018-05-16 20:21:56 -04:00
parent 6e12159d10
commit 1f4a1e71a1
9 changed files with 90 additions and 32 deletions

View File

@ -43,11 +43,17 @@ To use this role, define the following variables:
# Needed for aodh to talk to memcached
memcached_servers: 127.0.0.1
memcached_encryption_key: "some_key"
# Needed for aodh to locate and connect to the RabbitMQ cluster
aodh_rabbitmq_password: "secrete"
rabbitmq_servers: "10.100.100.2"
rabbitmq_use_ssl: true
rabbitmq_port: 5671
# Needed for aodh to locate and connect to Oslo.Messaging
aodh_oslomsg_rpc_transport: rabbit
aodh_oslomsg_rpc_password: "secrete"
aodh_oslomsg_rpc_servers: "10.100.100.2"
aodh_oslomsg_rpc_use_ssl: true
aodh_oslomsg_rpc_port: 5671
aodh_oslomsg_notify_transport: rabbit
aodh_oslomsg_notify_password: "secrete"
aodh_oslomsg_notify_servers: "10.100.100.2"
aodh_oslomsg_notify_use_ssl: true
aodh_oslomsg_notify_port: 5671
# Needed to setup the aodh service in Keystone
keystone_admin_user_name: admin
keystone_admin_tenant_name: admin

View File

@ -61,12 +61,22 @@ aodh_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
aodh_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
aodh_connection_string: "{{ aodh_db_type }}://{{ aodh_database_user }}:{{ aodh_container_db_password }}@{{ aodh_db_address }}/{{ aodh_database_name }}?charset=utf8{% if aodh_galera_use_ssl | bool %}&ssl_ca={{ aodh_galera_ssl_ca_cert }}{% endif %}"
## RabbitMQ info
aodh_rabbitmq_userid: aodh
aodh_rabbitmq_vhost: /aodh
aodh_rabbitmq_servers: 127.0.0.1
aodh_rabbitmq_port: 5672
aodh_rabbitmq_use_ssl: False
# Oslo Messaging
# RPC
aodh_oslomsg_rpc_transport: rabbit
aodh_oslomsg_rpc_servers: 127.0.0.1
aodh_oslomsg_rpc_port: 5672
aodh_oslomsg_rpc_use_ssl: False
aodh_oslomsg_rpc_userid: aodh
aodh_oslomsg_rpc_vhost: /aodh
# Notify
aodh_oslomsg_notify_transport: rabbit
aodh_oslomsg_notify_servers: 127.0.0.1
aodh_oslomsg_notify_port: 5672
aodh_oslomsg_notify_use_ssl: False
aodh_oslomsg_notify_userid: aodh
aodh_oslomsg_notify_vhost: /aodh
## Apache setup
aodh_apache_log_level: info
@ -152,7 +162,8 @@ aodh_services:
aodh_required_secrets:
- memcached_encryption_key
- aodh_container_db_password
- aodh_rabbitmq_password
- aodh_oslomsg_rpc_password
- aodh_oslomsg_notify_password
- aodh_service_password
install_test_packages: False

View File

@ -39,11 +39,17 @@ To use this role, define the following variables:
# Needed for aodh to talk to memcached
memcached_servers: 127.0.0.1
memcached_encryption_key: "some_key"
# Needed for aodh to locate and connect to the RabbitMQ cluster
aodh_rabbitmq_password: "secrete"
rabbitmq_servers: "10.100.100.2"
rabbitmq_use_ssl: true
rabbitmq_port: 5671
# Needed for aodh to locate and connect to Oslo.Messaging
aodh_oslomsg_rpc_transport: rabbit
aodh_oslomsg_rpc_password: "secrete"
aodh_oslomsg_rpc_servers: "10.100.100.2"
aodh_oslomsg_rpc_use_ssl: true
aodh_oslomsg_rpc_port: 5671
aodh_oslomsg_notify_transport: rabbit
aodh_oslomsg_notify_password: "secrete"
aodh_oslomsg_notify_servers: "10.100.100.2"
aodh_oslomsg_notify_use_ssl: true
aodh_oslomsg_notify_port: 5671
# Needed to setup the aodh service in Keystone
keystone_admin_user_name: admin
keystone_admin_tenant_name: admin

View File

@ -11,11 +11,17 @@
# Needed for aodh to talk to memcached
memcached_servers: 127.0.0.1
memcached_encryption_key: "some_key"
# Needed for aodh to locate and connect to the RabbitMQ cluster
aodh_rabbitmq_password: "secrete"
rabbitmq_servers: "10.100.100.2"
rabbitmq_use_ssl: true
rabbitmq_port: 5671
# Needed for aodh to locate and connect to Oslo.Messaging
aodh_oslomsg_rpc_transport: rabbit
aodh_oslomsg_rpc_password: "secrete"
aodh_oslomsg_rpc_servers: "10.100.100.2"
aodh_oslomsg_rpc_use_ssl: true
aodh_oslomsg_rpc_port: 5671
aodh_oslomsg_notify_transport: rabbit
aodh_oslomsg_notify_password: "secrete"
aodh_oslomsg_notify_servers: "10.100.100.2"
aodh_oslomsg_notify_use_ssl: true
aodh_oslomsg_notify_port: 5671
# Needed to setup the aodh service in Keystone
keystone_admin_user_name: admin
keystone_admin_tenant_name: admin

View File

@ -0,0 +1,15 @@
---
features:
- Support separate oslo.messaging services for RPC and Notifications
to enable operation of separate and different messaging backend servers.
deprecations:
- |
The rabbitmq server parameters have been replaced by corresponding
oslo.messaging RPC and Notify parameters in order to abstract the
messaging service from the actual backend server deployment.
- aodh_oslomsg_rpc_servers replaces aodh_rabbitmq_servers
- aodh_oslomsg_rpc_port replaces aodh_rabbitmq_port
- aodh_oslomsg_rpc_use_ssl replaces aodh_rabbitmq_use_ssl
- aodh_oslomsg_rpc_userid replaces aodh_rabbitmq_userid
- aodh_oslomsg_rpc_vhost replaces aodh_rabbitmq_vhost
- aodh_oslomsg_rpc_password replaces aodh_rabbitmq_password

View File

@ -5,10 +5,10 @@
use_stderr = False
auth_strategy = keystone
debug = {{ debug }}
transport_url = rabbit://{% for host in aodh_rabbitmq_servers.split(',') %}{{ aodh_rabbitmq_userid }}:{{ aodh_rabbitmq_password }}@{{ host }}:{{ aodh_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ aodh_rabbitmq_vhost }}{% endif %}{% endfor %}
transport_url = {{ aodh_oslomsg_rpc_transport }}://{% for host in aodh_oslomsg_rpc_servers.split(',') %}{{ aodh_oslomsg_rpc_userid }}:{{ aodh_oslomsg_rpc_password }}@{{ host }}:{{ aodh_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ aodh_oslomsg_rpc_vhost }}{% if aodh_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
[oslo_messaging_rabbit]
ssl = {{ aodh_rabbitmq_use_ssl }}
ssl = {{ aodh_oslomsg_rpc_use_ssl }}
[api]
port = {{ aodh_service_port }}
@ -36,6 +36,9 @@ token_cache_time = 300
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcached_encryption_key }}
[oslo_messaging_notifications]
transport_url = {{ aodh_oslomsg_notify_transport }}://{% for host in aodh_oslomsg_notify_servers.split(',') %}{{ aodh_oslomsg_notify_userid }}:{{ aodh_oslomsg_notify_password }}@{{ host }}:{{ aodh_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ aodh_oslomsg_notify_vhost }}{% if aodh_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
[service_credentials]
auth_type = {{ aodh_keystone_auth_plugin }}
auth_url = {{ keystone_service_internalurl }}

View File

@ -11,6 +11,12 @@ openstack1
aodh
gnocchi
[oslomsg_rpc_all]
infra1
[oslomsg_notify_all]
infra1
[rabbitmq_all]
infra1

View File

@ -16,10 +16,12 @@
aodh_container_db_password: "secrete"
aodh_db_address: "{{ test_galera_host }}"
aodh_database_name: aodh
aodh_rabbitmq_servers: "{{ rabbitmq_servers }}"
aodh_rabbitmq_password: "secrete"
aodh_rabbitmq_userid: aodh
aodh_rabbitmq_vhost: /aodh
aodh_oslomsg_rpc_password: "secrete"
aodh_oslomsg_notify_password: "secrete"
aodh_oslomsg_rpc_userid: aodh
aodh_oslomsg_rpc_vhost: /aodh
aodh_oslomsg_notify_userid: aodh
aodh_oslomsg_notify_vhost: /aodh
aodh_venv_tag: "testing"
aodh_developer_mode: true
aodh_service_password: "secrete"

View File

@ -18,10 +18,13 @@
user: root
gather_facts: true
pre_tasks:
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ aodh_rabbitmq_vhost }}"
user_name: "{{ aodh_rabbitmq_userid }}"
user_password: "{{ aodh_rabbitmq_password }}"
- include: common/ensure-oslomsg.yml
rpc_vhost: "{{ aodh_oslomsg_rpc_vhost }}"
rpc_user: "{{ aodh_oslomsg_rpc_userid }}"
rpc_password: "{{ aodh_oslomsg_rpc_password }}"
notify_vhost: "{{ aodh_oslomsg_notify_vhost }}"
notify_user: "{{ aodh_oslomsg_notify_userid }}"
notify_password: "{{ aodh_oslomsg_notify_password }}"
- include: common/create-grant-db.yml
db_name: "{{ aodh_database_name }}"
db_password: "{{ aodh_container_db_password }}"