Merge "Update to use oslo.messaging services for RPC and Notify"

This commit is contained in:
Zuul 2018-06-08 18:57:24 +00:00 committed by Gerrit Code Review
commit 33a51bc918
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 }}"