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 service will be transparent to the designate service.

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

Change-Id: I620a13e1ea3c24c8bd31c02206613d37d769dd30
This commit is contained in:
Andrew Smith 2018-06-06 11:47:58 -04:00
parent 83ba4d06c9
commit 9625cb41fc
8 changed files with 71 additions and 19 deletions

View File

@ -67,12 +67,24 @@ designate_galera_database: designate
designate_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
designate_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
## Oslo Messaging
# RPC
designate_oslomsg_rpc_transport: rabbit
designate_oslomsg_rpc_servers: 127.0.0.1
designate_oslomsg_rpc_port: 5672
designate_oslomsg_rpc_use_ssl: False
designate_oslomsg_rpc_userid: designate-rpc
designate_oslomsg_rpc_vhost: /designate
# Notify
designate_oslomsg_notify_transport: rabbit
designate_oslomsg_notify_servers: 127.0.0.1
designate_oslomsg_notify_port: 5672
designate_oslomsg_notify_use_ssl: False
designate_oslomsg_notify_userid: designate-notify
designate_oslomsg_notify_vhost: /designate
## RabbitMQ info
designate_rabbitmq_userid: designate
designate_rabbitmq_vhost: /designate
designate_rabbitmq_servers: 127.0.0.1
designate_rabbitmq_use_ssl: False
designate_rabbitmq_port: 5672
## Pool Configuration Defaults
designate_pool_uuid: 794ccc2c-d751-44fe-b57f-8894c9f5c842

View File

@ -39,7 +39,8 @@ This role needs the following variables defined:
designate_galera_address
designate_galera_password
designate_service_password
designate_rabbitmq_password
designate_oslomsg_rpc_password
designate_oslomsg_notify_password
Example playbook
~~~~~~~~~~~~~~~~

View File

@ -9,4 +9,5 @@
designate_galera_address: "{{ internal_lb_vip_address }}"
designate_galera_password: "SuperSecretePassword1"
designate_service_password: "SuperSecretePassword3"
designate_rabbitmq_password: "SuperSecretePassword4"
designate_oslomsg_rpc_password: "SuperSecretePassword4"
designate_oslomsg_notify_password: "SuperSecretePassword5"

View File

@ -0,0 +1,20 @@
---
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.
- designate_oslomsg_rpc_servers replaces designate_rabbitmq_servers
- designate_oslomsg_rpc_port replaces designate_rabbitmq_port
- designate_oslomsg_rpc_use_ssl replaces designate_rabbitmq_use_ssl
- designate_oslomsg_rpc_userid replaces designate_rabbitmq_userid
- designate_oslomsg_rpc_vhost replaces designate_rabbitmq_vhost
- designate_oslomsg_notify_servers replaces designate_rabbitmq_telemetry_servers
- designate_oslomsg_notify_port replaces designate_rabbitmq_telemetry_port
- designate_oslomsg_notify_use_ssl replaces designate_rabbitmq_telemetry_use_ssl
- designate_oslomsg_notify_userid replaces designate_rabbitmq_telemetry_userid
- designate_oslomsg_notify_vhost replaces designate_rabbitmq_telemetry_vhost
- designate_oslomsg_notify_password replaces designate_rabbitmq_telemetry_password

View File

@ -29,14 +29,17 @@ root_helper = sudo designate-rootwrap /etc/designate/rootwrap.conf
#network_api = neutron
## RabbitMQ RPC
transport_url = rabbit://{% for host in designate_rabbitmq_servers.split(',') %}{{ designate_rabbitmq_userid }}:{{ designate_rabbitmq_password }}@{{ host }}:{{ designate_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ designate_rabbitmq_vhost }}{% endif %}{% endfor %}
transport_url = {{ designate_oslomsg_rpc_transport }}://{% for host in designate_oslomsg_rpc_servers.split(',') %}{{ designate_oslomsg_rpc_userid }}:{{ designate_oslomsg_rpc_password }}@{{ host }}:{{ designate_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ designate_oslomsg_rpc_vhost }}{% if designate_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
# RabbitMQ Config
[oslo_messaging_rabbit]
ssl = {{ designate_rabbitmq_use_ssl }}
ssl = {{ designate_oslomsg_rpc_use_ssl }}
rabbit_notification_exchange = designate
rabbit_notification_topic = notifications
[oslo_messaging_notifications]
transport_url = {{ designate_oslomsg_notify_transport }}://{% for host in designate_oslomsg_notify_servers.split(',') %}{{ designate_oslomsg_notify_userid }}:{{ designate_oslomsg_notify_password }}@{{ host }}:{{ designate_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ designate_oslomsg_notify_vhost }}{% if designate_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
########################
## Service Configuration
########################

View File

@ -47,6 +47,12 @@ rabbitmq_all
galera_all
memcached_all
[oslomsg_rpc_all]
infra1
[oslomsg_notify_all]
infra1
[rabbitmq_all]
infra1

View File

@ -21,12 +21,18 @@ designate_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host']
designate_galera_database: designate
designate_galera_user: designate
designate_galera_password: "SuperSecrete"
designate_rabbitmq_password: "secrete"
designate_rabbitmq_userid: designate
designate_rabbitmq_vhost: /designate
designate_rabbitmq_servers: "{{ rabbitmq_servers }}"
designate_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
designate_rabbitmq_port: "{{ rabbitmq_port }}"
designate_oslomsg_rpc_password: "secrete"
designate_oslomsg_rpc_userid: designate-rpc
designate_oslomsg_rpc_vhost: /designate
designate_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers }}"
designate_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl }}"
designate_oslomsg_rpc_port: "{{ oslomsg_rpc_port }}"
designate_oslomsg_notify_password: "secrete"
designate_oslomsg_notify_userid: designate-notify
designate_oslomsg_notify_vhost: /designate
designate_oslomsg_notify_servers: "{{ oslomsg_notify_servers }}"
designate_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl }}"
designate_oslomsg_notify_port: "{{ oslomsg_notify_port }}"
designate_pools_yaml:
- name: "default"
description: Default BIND9 Pool

View File

@ -18,10 +18,13 @@
user: root
gather_facts: true
pre_tasks:
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ designate_rabbitmq_vhost }}"
user_name: "{{ designate_rabbitmq_userid }}"
user_password: "{{ designate_rabbitmq_password }}"
- include: common/ensure-oslomsg.yml
rpc_vhost: "{{ designate_oslomsg_rpc_vhost }}"
rpc_user: "{{ designate_oslomsg_rpc_userid }}"
rpc_password: "{{ designate_oslomsg_rpc_password }}"
notify_vhost: "{{ designate_oslomsg_notify_vhost }}"
notify_user: "{{ designate_oslomsg_notify_userid }}"
notify_password: "{{ designate_oslomsg_notify_password }}"
- include: common/create-grant-db.yml
db_name: "{{ designate_galera_user }}"
db_password: "{{ designate_galera_password }}"