Update to use oslo.messaging service 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 aure 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 magnum service. This patch: * Add oslo.messaging variables for RPC and Notify to defaults * Add transport_url generation to conf template * Add oslo.messaging to tests inventory * Update tests * Update examples * Add release note Change-Id: Ib44af3b1d153742975351a321d65c8812a994370
This commit is contained in:
parent
e0e33a5f8d
commit
e587d74d29
|
@ -74,12 +74,22 @@ magnum_galera_user: magnum
|
|||
magnum_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
|
||||
magnum_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"
|
||||
|
||||
# Rabbit vars
|
||||
magnum_rabbitmq_userid: magnum
|
||||
magnum_rabbitmq_vhost: /magnum
|
||||
magnum_rabbitmq_servers: 127.0.0.1
|
||||
magnum_rabbitmq_use_ssl: False
|
||||
magnum_rabbitmq_port: 5672
|
||||
# Oslo Messaging vars
|
||||
# RPC
|
||||
magnum_oslomsg_rpc_transport: rabbit
|
||||
magnum_oslomsg_rpc_servers: 127.0.0.1
|
||||
magnum_oslomsg_rpc_port: 5672
|
||||
magnum_oslomsg_rpc_use_ssl: False
|
||||
magnum_oslomsg_rpc_userid: magnum
|
||||
magnum_oslomsg_rpc_vhost: /magnum
|
||||
|
||||
# Notify
|
||||
magnum_oslomsg_notify_transport: rabbit
|
||||
magnum_oslomsg_notify_servers: 127.0.0.1
|
||||
magnum_oslomsg_notify_port: 5672
|
||||
magnum_oslomsg_notify_use_ssl: False
|
||||
magnum_oslomsg_notify_userid: magnum
|
||||
magnum_oslomsg_notify_vhost: /magnum
|
||||
|
||||
# Keystone AuthToken/Middleware
|
||||
magnum_keystone_auth_plugin: password
|
||||
|
|
|
@ -40,11 +40,17 @@ To use this role, define the following variables:
|
|||
# Magnum Galera username
|
||||
magnum_galera_user: magnum
|
||||
|
||||
# Magnum rabbit userid
|
||||
magnum_rabbitmq_userid: magnum
|
||||
# Magnum rpc userid
|
||||
magnum_oslomsg_rpc_userid: magnum
|
||||
|
||||
# Magnum rabbit vhost
|
||||
magnum_rabbitmq_vhost: /magnum
|
||||
# Magnum rpc vhost
|
||||
magnum_oslomsg_rpc_vhost: /magnum
|
||||
|
||||
# Magnum notify userid
|
||||
magnum_oslomsg_notify_userid: magnum
|
||||
|
||||
# Magnum notify vhost
|
||||
magnum_oslomsg_notify_vhost: /magnum
|
||||
|
||||
This list is not exhaustive. See role internals for further details.
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
magnum_galera_address: "{{ internal_lb_vip_address }}"
|
||||
magnum_galera_database_name: magnum_service
|
||||
magnum_galera_user: magnum
|
||||
magnum_rabbitmq_userid: magnum
|
||||
magnum_rabbitmq_vhost: /magnum
|
||||
magnum_oslomsg_rpc_userid: magnum
|
||||
magnum_oslomsg_rpc_vhost: /magnum
|
||||
magnum_oslomsg_notify_userid: magnum
|
||||
magnum_oslomsg_notify_vhost: /magnum
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
|
|
@ -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.
|
||||
- magnum_oslomsg_rpc_servers replaces rabbitmq_servers
|
||||
- magnum_oslomsg_rpc_port replaces rabbitmq_port
|
||||
- magnum_oslomsg_rpc_userid replaces magnum_rabbitmq_userid
|
||||
- magnum_oslomsg_rpc_vhost replaces magnum_rabbitmq_vhost
|
||||
- added magnum_oslomsg_rpc_use_ssl
|
||||
- added magnum_oslomsg_notify_servers
|
||||
- added magnum_oslomsg_notify_port
|
||||
- added magnum_oslomsg_notify_use_ssl
|
||||
- added magnum_oslomsg_notify_userid
|
||||
- added magnum_oslomsg_notify_vhost
|
||||
- added magnum_oslomsg_notify_password
|
|
@ -3,7 +3,7 @@
|
|||
use_stderr = False
|
||||
debug = {{ debug }}
|
||||
host = {{ ansible_host }}
|
||||
transport_url = rabbit://{% for host in magnum_rabbitmq_servers.split(',') %}{{ magnum_rabbitmq_userid }}:{{ magnum_rabbitmq_password }}@{{ host }}:{{ magnum_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ magnum_rabbitmq_vhost }}{% endif %}{% endfor %}
|
||||
transport_url = {{ magnum_oslomsg_rpc_transport }}://{% for host in magnum_oslomsg_rpc_servers.split(',') %}{{ magnum_oslomsg_rpc_userid }}:{{ magnum_oslomsg_rpc_password }}@{{ host }}:{{ magnum_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ magnum_oslomsg_rpc_vhost }}{% if magnum_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
|
||||
|
||||
[api]
|
||||
host = {{ ansible_host }}
|
||||
|
@ -53,8 +53,11 @@ endpoint_type = internalURL
|
|||
[nova_client]
|
||||
endpoint_type = internalURL
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
transport_url = {{ magnum_oslomsg_notify_transport }}://{% for host in magnum_oslomsg_notify_servers.split(',') %}{{ magnum_oslomsg_notify_userid }}:{{ magnum_oslomsg_notify_password }}@{{ host }}:{{ magnum_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ magnum_oslomsg_notify_vhost }}{% if magnum_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
ssl = {{ magnum_rabbitmq_use_ssl }}
|
||||
ssl = {{ magnum_oslomsg_rpc_use_ssl }}
|
||||
rabbit_notification_exchange = magnum
|
||||
rabbit_notification_topic = notification
|
||||
|
||||
|
|
|
@ -9,6 +9,12 @@ storage1
|
|||
infra1
|
||||
openstack1
|
||||
|
||||
[oslomsg_rpc_all]
|
||||
infra1
|
||||
|
||||
[oslomsg_notify_all]
|
||||
infra1
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@ magnum_developer_mode: true
|
|||
magnum_galera_password: secrete
|
||||
magnum_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
magnum_service_password: secrete
|
||||
magnum_rabbitmq_password: secrete
|
||||
magnum_oslomsg_rpc_password: secrete
|
||||
magnum_oslomsg_notify_password: secrete
|
||||
magnum_trustee_password: secrete
|
||||
magnum_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
magnum_rabbitmq_userid: magnum
|
||||
magnum_rabbitmq_vhost: /magnum
|
||||
magnum_oslomsg_rpc_servers: "{{ rabbitmq_servers }}"
|
||||
magnum_oslomsg_rpc_userid: magnum
|
||||
magnum_oslomsg_rpc_vhost: /magnum
|
||||
magnum_galera_database_name: magnum_service
|
||||
magnum_galera_user: magnum
|
||||
|
||||
|
|
|
@ -17,10 +17,13 @@
|
|||
hosts: magnum_all
|
||||
user: root
|
||||
pre_tasks:
|
||||
- include: common/ensure-rabbitmq.yml
|
||||
vhost_name: "{{ magnum_rabbitmq_vhost }}"
|
||||
user_name: "{{ magnum_rabbitmq_userid }}"
|
||||
user_password: "{{ magnum_rabbitmq_password }}"
|
||||
- include: common/ensure-oslomsg.yml
|
||||
rpc_vhost: "{{ magnum_oslomsg_rpc_vhost }}"
|
||||
rpc_user: "{{ magnum_oslomsg_rpc_userid }}"
|
||||
rpc_password: "{{ magnum_oslomsg_rpc_password }}"
|
||||
notify_vhost: "{{ magnum_oslomsg_notify_vhost }}"
|
||||
notify_user: "{{ magnum_oslomsg_notify_userid }}"
|
||||
notify_password: "{{ magnum_oslomsg_notify_password }}"
|
||||
roles:
|
||||
- role: "os_magnum"
|
||||
vars_files:
|
||||
|
|
Loading…
Reference in New Issue