Update to use oslo.messaging services for RPC and Notify

This commit contains updates to introduced oslo.messaging
service in place of rabbitmq server.

This patch:
* Add ensure oslo.messaging vhost and user for backend
* Update service role installs
* Add oslo.messaging settings to test-vars

Change-Id: Ie69d522ee2df4282ce4fc69c2b3f81f4df1da77d
This commit is contained in:
Andrew Smith 2018-04-05 12:43:14 -04:00
parent e8bdfbe222
commit 7c756b1f91
11 changed files with 204 additions and 34 deletions

76
ensure-oslomsg.yml Normal file
View File

@ -0,0 +1,76 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Ensure RPC Rabbitmq vhost
rabbitmq_vhost:
name: "{{ rpc_vhost }}"
state: "present"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "rabbit"
- name: Ensure RPC Rabbitmq user
rabbitmq_user:
user: "{{ rpc_user }}"
password: "{{ rpc_password }}"
vhost: "{{ rpc_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
no_log: true
when:
- oslomsg_rpc_transport == "rabbit"
- name: Ensure Notify Rabbitmq vhost
rabbitmq_vhost:
name: "{{ notify_vhost }}"
state: "present"
delegate_to: "{{ groups['oslomsg_notify_all'][0] }}"
run_once: True
when:
- oslomsg_notify_transport == "rabbit"
- name: Ensure Notify Rabbitmq user
rabbitmq_user:
user: "{{ notify_user }}"
password: "{{ notify_password }}"
vhost: "{{ notify_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "{{ groups['oslomsg_notify_all'][0] }}"
run_once: True
no_log: true
when:
- oslomsg_notify_transport == "rabbit"
- name: Ensure RPC qdrouterd vhost
command: echo "create qdrouterd vhost"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "amqp"
- name: Ensure RPC qdrouterd user
command: echo "create qdrouterd user"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "amqp"

View File

@ -21,10 +21,13 @@
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ cinder_rabbitmq_vhost }}"
user_name: "{{ cinder_rabbitmq_userid }}"
user_password: "{{ cinder_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ cinder_oslomsg_rpc_vhost }}"
rpc_user: "{{ cinder_oslomsg_rpc_userid }}"
rpc_password: "{{ cinder_oslomsg_rpc_password }}"
notify_vhost: "{{ cinder_oslomsg_notify_vhost }}"
notify_user: "{{ cinder_oslomsg_notify_userid }}"
notify_password: "{{ cinder_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ cinder_galera_database }}"

View File

@ -20,10 +20,13 @@
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ glance_rabbitmq_vhost }}"
user_name: "{{ glance_rabbitmq_userid }}"
user_password: "{{ glance_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ glance_oslomsg_rpc_vhost }}"
rpc_user: "{{ glance_oslomsg_rpc_userid }}"
rpc_password: "{{ glance_oslomsg_rpc_password }}"
notify_vhost: "{{ glance_oslomsg_notify_vhost }}"
notify_user: "{{ glance_oslomsg_notify_userid }}"
notify_password: "{{ glance_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ glance_galera_database }}"
db_password: "{{ glance_container_mysql_password }}"

View File

@ -20,11 +20,13 @@
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ heat_rabbitmq_vhost }}"
user_name: "{{ heat_rabbitmq_userid }}"
user_password: "{{ heat_rabbitmq_password }}"
when: groups['rabbitmq_all'] is defined
- include: ensure-oslomsg.yml
rpc_vhost: "{{ heat_oslomsg_rpc_vhost }}"
rpc_user: "{{ heat_oslomsg_rpc_userid }}"
rpc_password: "{{ heat_oslomsg_rpc_password }}"
notify_vhost: "{{ heat_oslomsg_notify_vhost }}"
notify_user: "{{ heat_oslomsg_notify_userid }}"
notify_password: "{{ heat_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ heat_galera_database }}"
db_password: "{{ heat_container_mysql_password }}"

View File

@ -20,10 +20,13 @@
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ ironic_rabbitmq_vhost }}"
user_name: "{{ ironic_rabbitmq_userid }}"
user_password: "{{ ironic_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ ironic_oslomsg_rpc_vhost }}"
rpc_user: "{{ ironic_oslomsg_rpc_userid }}"
rpc_password: "{{ ironic_oslomsg_rpc_password }}"
notify_vhost: "{{ ironic_oslomsg_notify_vhost }}"
notify_user: "{{ ironic_oslomsg_notify_userid }}"
notify_password: "{{ ironic_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ ironic_galera_database }}"
db_password: "{{ ironic_container_mysql_password }}"

View File

@ -23,11 +23,13 @@
- name: Set keystone_messaging fact
set_fact:
keystone_messaging_enabled: "{{ groups['rabbitmq_all'] is defined }}"
- include: ensure-rabbitmq.yml
vhost_name: "{{ keystone_rabbitmq_vhost }}"
user_name: "{{ keystone_rabbitmq_userid }}"
user_password: "{{ keystone_rabbitmq_password }}"
when: groups['rabbitmq_all'] is defined
- include: ensure-oslomsg.yml
rpc_vhost: "{{ keystone_oslomsg_rpc_vhost }}"
rpc_user: "{{ keystone_oslomsg_rpc_userid }}"
rpc_password: "{{ keystone_oslomsg_rpc_password }}"
notify_vhost: "{{ keystone_oslomsg_notify_vhost }}"
notify_user: "{{ keystone_oslomsg_notify_userid }}"
notify_password: "{{ keystone_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ keystone_galera_database }}"
db_password: "{{ keystone_container_mysql_password }}"

View File

@ -78,10 +78,13 @@
name: "{{ required_packages[ansible_pkg_mgr] }}"
state: present
- include: ensure-rabbitmq.yml
vhost_name: "{{ neutron_rabbitmq_vhost }}"
user_name: "{{ neutron_rabbitmq_userid }}"
user_password: "{{ neutron_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ neutron_oslomsg_rpc_vhost }}"
rpc_user: "{{ neutron_oslomsg_rpc_userid }}"
rpc_password: "{{ neutron_oslomsg_rpc_password }}"
notify_vhost: "{{ neutron_oslomsg_notify_vhost }}"
notify_user: "{{ neutron_oslomsg_notify_userid }}"
notify_password: "{{ neutron_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ neutron_galera_database }}"

View File

@ -57,10 +57,13 @@
name: "{{ required_packages[ansible_pkg_mgr] }}"
state: present
- include: ensure-rabbitmq.yml
vhost_name: "{{ nova_rabbitmq_vhost }}"
user_name: "{{ nova_rabbitmq_userid }}"
user_password: "{{ nova_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ nova_oslomsg_rpc_vhost }}"
rpc_user: "{{ nova_oslomsg_rpc_userid }}"
rpc_password: "{{ nova_oslomsg_rpc_password }}"
notify_vhost: "{{ nova_oslomsg_notify_vhost }}"
notify_user: "{{ nova_oslomsg_notify_userid }}"
notify_password: "{{ nova_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ nova_galera_database }}"

View File

@ -20,10 +20,13 @@
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ sahara_rabbitmq_vhost }}"
user_name: "{{ sahara_rabbitmq_userid }}"
user_password: "{{ sahara_rabbitmq_password }}"
- include: ensure-oslomsg.yml
rpc_vhost: "{{ sahara_oslomsg_rpc_vhost }}"
rpc_user: "{{ sahara_oslomsg_rpc_userid }}"
rpc_password: "{{ sahara_oslomsg_rpc_password }}"
notify_vhost: "{{ sahara_oslomsg_notify_vhost }}"
notify_user: "{{ sahara_oslomsg_notify_userid }}"
notify_password: "{{ sahara_oslomsg_notify_password }}"
- include: create-grant-db.yml
db_name: "{{ sahara_galera_database }}"
db_password: "{{ sahara_container_mysql_password }}"

View File

@ -91,6 +91,24 @@ rabbitmq_use_ssl: False
rabbitmq_port: 5672
rabbitmq_password: "secrete"
# Oslo Messaging RPC Settings
oslomsg_rpc_transport: rabbit
oslomsg_rpc_port: "{{ rabbitmq_port }}"
oslomsg_rpc_servers: "{{ rabbitmq_servers }}"
oslomsg_rpc_use_ssl: "{{ rabbitmq_use_ssl }}"
oslomsg_rpc_host_group: "{{ test_rabbitmq_group }}"
oslomsg_rpc_ssl_param: "{{ (oslomsg_rpc_use_ssl | bool) | ternary(1, 0) }}"
oslomsg_rpc_password: "{{ rabbitmq_password }}"
# Oslo Messaging Notify Settings
oslomsg_notify_transport: rabbit
oslomsg_notify_port: "{{ rabbitmq_port }}"
oslomsg_notify_servers: "{{ rabbitmq_servers }}"
oslomsg_notify_use_ssl: "{{ rabbitmq_use_ssl }}"
oslomsg_notify_host_group: "{{ test_rabbitmq_group }}"
oslomsg_notify_ssl_param: "{{ (oslomsg_notify_use_ssl | bool) | ternary(1, 0) }}"
oslomsg_notify_password: "{{ rabbitmq_password }}"
# Memcache Settings
memcached_listen: "{{ test_memcached_host }}"
memcached_servers: "{{ test_memcached_host }}"
@ -111,6 +129,12 @@ keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3"
keystone_service_adminuri: "http://{{ test_keystone_host }}:35357"
keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3"
keystone_service_password: "secrete"
keystone_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
keystone_oslomsg_rpc_userid: keystone
keystone_oslomsg_rpc_vhost: /keystone
keystone_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
keystone_oslomsg_notify_userid: keystone
keystone_oslomsg_notify_vhost: /keystone
keystone_rabbitmq_password: "{{ rabbitmq_password }}"
keystone_rabbitmq_port: "{{ rabbitmq_port }}"
keystone_rabbitmq_servers: "{{ rabbitmq_servers }}"
@ -141,6 +165,12 @@ glance_galera_address: "{{ test_galera_host }}"
glance_galera_database: glance
glance_git_install_branch: "{{ test_branch }}"
glance_profiler_hmac_key: "secrete"
glance_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
glance_oslomsg_rpc_userid: glance
glance_oslomsg_rpc_vhost: /glance
glance_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
glance_oslomsg_notify_userid: glance
glance_oslomsg_notify_vhost: /glance
glance_rabbitmq_password: "{{ rabbitmq_password }}"
glance_rabbitmq_port: "{{ rabbitmq_port }}"
glance_rabbitmq_servers: "{{ rabbitmq_servers }}"
@ -172,6 +202,12 @@ nova_metadata_insecure: False
nova_metadata_proxy_secret: "secrete"
nova_novncproxy_vncserver_listen: localhost
nova_novncproxy_vncserver_proxyclient_address: localhost
nova_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
nova_oslomsg_rpc_userid: nova
nova_oslomsg_rpc_vhost: /nova
nova_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
nova_oslomsg_notify_userid: nova
nova_oslomsg_notify_vhost: /nova
nova_rabbitmq_password: "{{ rabbitmq_password }}"
nova_rabbitmq_port: "{{ rabbitmq_port }}"
nova_rabbitmq_servers: "{{ rabbitmq_servers }}"
@ -216,6 +252,12 @@ neutron_galera_database: neutron
neutron_git_install_branch: "{{ test_branch }}"
neutron_ha_vrrp_auth_password: secrete
neutron_management_address: "{{ test_neutron_server_host }}"
neutron_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
neutron_oslomsg_rpc_userid: neutron
neutron_oslomsg_rpc_vhost: /neutron
neutron_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
neutron_oslomsg_notify_userid: neutron
neutron_oslomsg_notify_vhost: /neutron
neutron_rabbitmq_password: "{{ rabbitmq_password }}"
neutron_rabbitmq_port: "{{ rabbitmq_port }}"
neutron_rabbitmq_servers: "{{ rabbitmq_servers }}"
@ -248,6 +290,12 @@ cinder_galera_address: "{{ test_galera_host }}"
cinder_git_install_branch: "{{ test_branch }}"
cinder_glance_api_servers: "{{ glance_api_servers }}"
cinder_profiler_hmac_key: "secrete"
cinder_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
cinder_oslomsg_rpc_userid: cinder
cinder_oslomsg_rpc_vhost: /cinder
cinder_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
cinder_oslomsg_notify_userid: cinder
cinder_oslomsg_notify_vhost: /cinder
cinder_rabbitmq_port: "{{ rabbitmq_port }}"
cinder_rabbitmq_servers: "{{ rabbitmq_servers }}"
cinder_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
@ -325,6 +373,12 @@ heat_container_mysql_password: "SuperSecrete"
heat_galera_address: "{{ test_galera_host }}"
heat_galera_user: heat
heat_galera_database: heat
heat_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
heat_oslomsg_rpc_userid: heat
heat_oslomsg_rpc_vhost: /heat
heat_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
heat_oslomsg_notify_userid: heat
heat_oslomsg_notify_vhost: /heat
heat_rabbitmq_servers: "{{ rabbitmq_servers }}"
heat_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
heat_rabbitmq_port: "{{ rabbitmq_port }}"
@ -362,6 +416,12 @@ ironic_galera_address: "{{ test_galera_host }}"
ironic_galera_database: ironic
ironic_galera_user: ironic
ironic_container_mysql_password: "secrete"
ironic_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
ironic_oslomsg_rpc_userid: ironic
ironic_oslomsg_rpc_vhost: /ironic
ironic_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
ironic_oslomsg_notify_userid: ironic
ironic_oslomsg_notify_vhost: /ironic
ironic_rabbitmq_password: "{{ rabbitmq_password }}"
ironic_rabbitmq_userid: ironic
ironic_rabbitmq_vhost: /ironic
@ -388,6 +448,12 @@ sahara_service_internalurl: "{{ sahara_service_internaluri }}/v1.1/%(tenant_id)s
sahara_service_adminuri: "http://{{ test_sahara_host }}:{{ sahara_service_port }}"
sahara_service_adminurl: "{{ sahara_service_adminuri }}/v1.1/%(tenant_id)s"
sahara_container_mysql_password: "SuperSecrete"
sahara_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
sahara_oslomsg_rpc_userid: sahara
sahara_oslomsg_rpc_vhost: /sahara
sahara_oslomsg_notify_password: "{{ oslomsg_notify_password }}"
sahara_oslomsg_notify_userid: sahara
sahara_oslomsg_notify_vhost: /sahara
sahara_rabbitmq_servers: "{{ rabbitmq_servers }}"
sahara_rabbitmq_port: "{{ rabbitmq_port }}"
sahara_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"

View File

@ -7,6 +7,12 @@ keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root
infra1
keystone1
[oslomsg_rpc_all]
infra1
[oslomsg_notify_all]
infra1
[rabbitmq_all]
infra1