diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml index 6bedc47713..665ec03157 100644 --- a/etc/openstack_deploy/user_secrets.yml +++ b/etc/openstack_deploy/user_secrets.yml @@ -19,6 +19,7 @@ # and may break your OpenStack environment. ############################# WARNING ######################################## +# TODO(ansmith): remove rabbitmq_passwords once oslomsg_*_passwords are used ## Rabbitmq Options rabbitmq_cookie_token: @@ -35,23 +36,31 @@ keystone_container_mysql_password: keystone_auth_admin_password: keystone_service_password: keystone_rabbitmq_password: +keystone_oslomsg_rpc_password: +keystone_oslomsg_notify_password: ## Ceilometer Options: ceilometer_container_db_password: ceilometer_service_password: ceilometer_telemetry_secret: ceilometer_rabbitmq_password: +ceilometer_oslomsg_rpc_password: +ceilometer_oslomsg_notify_password: ## Aodh Options: aodh_container_db_password: aodh_service_password: aodh_rabbitmq_password: +aodh_oslomsg_rpc_password: +aodh_oslomsg_notify_password: ## Cinder Options cinder_container_mysql_password: cinder_service_password: cinder_profiler_hmac_key: cinder_rabbitmq_password: +cinder_oslomsg_rpc_password: +cinder_oslomsg_notify_password: ## Ceph/rbd: a UUID to be used by libvirt to refer to the client.cinder user cinder_ceph_client_uuid: @@ -61,6 +70,8 @@ glance_container_mysql_password: glance_service_password: glance_profiler_hmac_key: glance_rabbitmq_password: +glance_oslomsg_rpc_password: +glance_oslomsg_notify_password: ## Gnocchi Options: gnocchi_container_mysql_password: @@ -74,9 +85,12 @@ heat_auth_encryption_key: ### THE HEAT AUTH KEY NEEDS TO BE 32 CHARACTERS LONG ## heat_service_password: heat_rabbitmq_password: +heat_oslomsg_rpc_password: +heat_oslomsg_notify_password: ## Ironic options ironic_rabbitmq_password: +ironic_oslomsg_rpc_password: ironic_container_mysql_password: ironic_service_password: ironic_swift_temp_url_secret_key: @@ -89,6 +103,8 @@ horizon_secret_key: neutron_container_mysql_password: neutron_service_password: neutron_rabbitmq_password: +neutron_oslomsg_rpc_password: +neutron_oslomsg_notify_password: neutron_ha_vrrp_auth_password: ## Nova Options @@ -97,6 +113,8 @@ nova_api_container_mysql_password: nova_metadata_proxy_secret: nova_service_password: nova_rabbitmq_password: +nova_oslomsg_rpc_password: +nova_oslomsg_notify_password: nova_placement_service_password: # LXD Options for nova compute @@ -107,10 +125,14 @@ octavia_container_mysql_password: octavia_service_password: octavia_health_hmac_key: octavia_rabbitmq_password: +octavia_oslomsg_rpc_password: +octavia_oslomsg_notify_password: ## Sahara Options sahara_container_mysql_password: sahara_rabbitmq_password: +sahara_oslomsg_rpc_password: +sahara_oslomsg_notify_password: sahara_service_password: ## Swift Options: @@ -121,6 +143,8 @@ swift_hash_path_suffix: swift_hash_path_prefix: # Swift needs a telemetry password when using ceilometer swift_rabbitmq_telemetry_password: +swift_oslomsg_rpc_password: +swift_oslomsg_notify_password: ## haproxy stats password haproxy_stats_password: @@ -130,6 +154,8 @@ haproxy_keepalived_authentication_password: magnum_service_password: magnum_galera_password: magnum_rabbitmq_password: +magnum_oslomsg_rpc_password: +magnum_oslomsg_notify_password: magnum_trustee_password: ## Rally Options: @@ -138,6 +164,8 @@ rally_galera_password: ## Trove Options trove_galera_password: trove_rabbitmq_password: +trove_oslomsg_rpc_password: +trove_oslomsg_notify_password: trove_service_password: trove_admin_user_password: trove_taskmanager_rpc_encr_key: @@ -146,11 +174,15 @@ trove_inst_rpc_key_encr_key: ## Barbican Options barbican_galera_password: barbican_rabbitmq_password: +barbican_oslomsg_rpc_password: +barbican_oslomsg_notify_password: barbican_service_password: ## Designate Options designate_galera_password: designate_rabbitmq_password: +designate_oslomsg_rpc_password: +designate_oslomsg_notify_password: designate_service_password: ## Molteniron Options: @@ -158,6 +190,8 @@ molteniron_container_mysql_password: ## Tacker options tacker_rabbitmq_password: +tacker_oslomsg_rpc_password: +tacker_oslomsg_notify_password: tacker_service_password: tacker_container_mysql_password: diff --git a/inventory/group_vars/all/neutron.yml b/inventory/group_vars/all/neutron.yml index 0294b99840..785f3a01af 100644 --- a/inventory/group_vars/all/neutron.yml +++ b/inventory/group_vars/all/neutron.yml @@ -26,6 +26,14 @@ neutron_service_region: "{{ service_region }}" # Horizon consumes this var so it must be in the global vars namespace neutron_plugin_type: ml2.lxb +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +# Oslo Messaging +neutron_oslomsg_rpc_userid: neutron +neutron_oslomsg_rpc_vhost: /neutron +neutron_oslomsg_notify_userid: neutron +neutron_oslomsg_notify_vhost: /neutron + # RPC - for Octavia event streamer. neutron_rabbitmq_userid: neutron neutron_rabbitmq_vhost: /neutron diff --git a/inventory/group_vars/all/oslo-messaging.yml b/inventory/group_vars/all/oslo-messaging.yml new file mode 100644 index 0000000000..6cfad29ae0 --- /dev/null +++ b/inventory/group_vars/all/oslo-messaging.yml @@ -0,0 +1,29 @@ +--- +# +# 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. + +# RPC +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: "{{ rabbitmq_host_group }}" +oslomsg_rpc_ssl_param: "{{ (oslomsg_rpc_use_ssl | bool) | ternary(1, 0) }}" + +# Notify +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: "{{ rabbitmq_host_group }}" +oslomsg_notify_ssl_param: "{{ (oslomsg_notify_use_ssl | bool) | ternary(1, 0) }}" diff --git a/inventory/group_vars/aodh_all.yml b/inventory/group_vars/aodh_all.yml index 9ce0ecd360..0959f1c423 100644 --- a/inventory/group_vars/aodh_all.yml +++ b/inventory/group_vars/aodh_all.yml @@ -18,6 +18,14 @@ aodh_galera_user: aodh aodh_galera_database: aodh aodh_galera_address: "{{ internal_lb_vip_address }}" aodh_connection_string: "mysql+pymysql://{{ aodh_galera_user }}:{{ aodh_container_db_password }}@{{ aodh_galera_address }}/{{ aodh_galera_database }}?charset=utf8" + +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +aodh_oslomsg_rpc_userid: aodh +aodh_oslomsg_rpc_vhost: /aodh +aodh_oslomsg_notify_userid: aodh +aodh_oslomsg_notify_vhost: /aodh + aodh_rabbitmq_host_group: "{{ rabbitmq_host_group }}" aodh_service_in_ldap: "{{ service_ldap_backend_enabled }}" diff --git a/inventory/group_vars/barbican_all.yml b/inventory/group_vars/barbican_all.yml index ce155aa5ad..18f7af194e 100644 --- a/inventory/group_vars/barbican_all.yml +++ b/inventory/group_vars/barbican_all.yml @@ -21,6 +21,13 @@ barbican_galera_address: "{{ galera_address }}" barbican_galera_database: barbican barbican_galera_user: barbican +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +barbican_oslomsg_rpc_userid: barbican +barbican_oslomsg_rpc_vhost: /barbican +barbican_oslomsg_notify_userid: barbican +barbican_oslomsg_notify_vhost: /barbican + barbican_rabbitmq_host_group: "{{ rabbitmq_host_group }}" barbican_rabbitmq_port: "{{ rabbitmq_port }}" barbican_rabbitmq_servers: "{{ rabbitmq_servers }}" diff --git a/inventory/group_vars/ceilometer_all.yml b/inventory/group_vars/ceilometer_all.yml index c1965dacb8..3ad09c4d6c 100644 --- a/inventory/group_vars/ceilometer_all.yml +++ b/inventory/group_vars/ceilometer_all.yml @@ -16,6 +16,13 @@ ceilometer_service_user_name: "{{ hostvars['localhost']['ceilometer_service_user_name'] }}" ceilometer_service_tenant_name: "{{ hostvars['localhost']['ceilometer_service_tenant_name'] }}" +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +ceilometer_oslomsg_rpc_userid: ceilometer +ceilometer_oslomsg_rpc_vhost: /ceilometer +ceilometer_oslomsg_notify_userid: ceilometer +ceilometer_oslomsg_notify_vhost: /ceilometer + # These are here rather than in ceilometer_all because # both the os_ceilometer and os_swift roles require them ceilometer_rabbitmq_userid: ceilometer diff --git a/inventory/group_vars/cinder_all.yml b/inventory/group_vars/cinder_all.yml index 5a79789aa9..8a0b2cecee 100644 --- a/inventory/group_vars/cinder_all.yml +++ b/inventory/group_vars/cinder_all.yml @@ -20,6 +20,13 @@ cinder_service_backup_program_enabled: "{{ hostvars['localhost']['cinder_service # These are here rather than in cinder_all because # both the os_ceilometer and os_cinder roles require them +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +cinder_oslomsg_rpc_userid: cinder +cinder_oslomsg_rpc_vhost: /cinder +cinder_oslomsg_notify_userid: cinder +cinder_oslomsg_notify_vhost: /cinder + # RPC cinder_rabbitmq_userid: cinder cinder_rabbitmq_vhost: /cinder diff --git a/inventory/group_vars/designate_all.yml b/inventory/group_vars/designate_all.yml index 7f1d180ac8..93243cac30 100644 --- a/inventory/group_vars/designate_all.yml +++ b/inventory/group_vars/designate_all.yml @@ -18,6 +18,13 @@ designate_galera_address: "{{ galera_address }}" designate_galera_user: designate designate_galera_database_name: designate +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +designate_oslomsg_rpc_userid: designate +designate_oslomsg_rpc_vhost: /designate +designate_oslomsg_notify_userid: designate +designate_oslomsg_notify_vhost: /designate + # RPC designate_rabbitmq_userid: designate designate_rabbitmq_vhost: /designate diff --git a/inventory/group_vars/glance_all.yml b/inventory/group_vars/glance_all.yml index 7766a83b31..fa71d69e06 100644 --- a/inventory/group_vars/glance_all.yml +++ b/inventory/group_vars/glance_all.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +glance_oslomsg_rpc_userid: glance +glance_oslomsg_rpc_vhost: /glance +glance_oslomsg_notify_userid: glance +glance_oslomsg_notify_vhost: /glance + # RPC glance_rabbitmq_userid: glance glance_rabbitmq_vhost: /glance diff --git a/inventory/group_vars/heat_all.yml b/inventory/group_vars/heat_all.yml index ac91793429..c01d763328 100644 --- a/inventory/group_vars/heat_all.yml +++ b/inventory/group_vars/heat_all.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +heat_oslomsg_rpc_userid: heat +heat_oslomsg_rpc_vhost: /heat +heat_oslomsg_notify_userid: heat +heat_oslomsg_notify_vhost: /heat + # RPC heat_rabbitmq_userid: heat heat_rabbitmq_vhost: /heat diff --git a/inventory/group_vars/ironic_all.yml b/inventory/group_vars/ironic_all.yml index c59cdd669b..6ff7a81a5b 100644 --- a/inventory/group_vars/ironic_all.yml +++ b/inventory/group_vars/ironic_all.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +ironic_oslomsg_rpc_userid: ironic +ironic_oslomsg_rpc_vhost: /ironic +ironic_oslomsg_notify_userid: ironic +ironic_oslomsg_notify_vhost: /ironic + ironic_rabbitmq_userid: ironic ironic_rabbitmq_vhost: /ironic ironic_rabbitmq_port: "{{ rabbitmq_port }}" diff --git a/inventory/group_vars/keystone_all.yml b/inventory/group_vars/keystone_all.yml index 0759331763..a72610fccb 100644 --- a/inventory/group_vars/keystone_all.yml +++ b/inventory/group_vars/keystone_all.yml @@ -16,6 +16,13 @@ # These are here rather than in keystone_all because # both the os_ceilometer and os_keystone roles require them +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +keystone_oslomsg_rpc_userid: keystone +keystone_oslomsg_rpc_vhost: /keystone +keystone_oslomsg_notify_userid: keystone +keystone_oslomsg_notify_vhost: /keystone + # RPC keystone_rabbitmq_userid: keystone keystone_rabbitmq_vhost: /keystone diff --git a/inventory/group_vars/magnum_all.yml b/inventory/group_vars/magnum_all.yml index 8ef60bb7a0..f31d0ab9f7 100644 --- a/inventory/group_vars/magnum_all.yml +++ b/inventory/group_vars/magnum_all.yml @@ -27,6 +27,13 @@ magnum_galera_user: magnum magnum_galera_database_name: magnum_service magnum_galera_address: "{{ galera_address }}" +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +magnum_oslomsg_rpc_userid: magnum +magnum_oslomsg_rpc_vhost: /magnum +magnum_oslomsg_notify_userid: magnum +magnum_oslomsg_notify_vhost: /magnum + magnum_rabbitmq_userid: magnum magnum_rabbitmq_vhost: /magnum magnum_rabbitmq_port: "{{ rabbitmq_port }}" diff --git a/inventory/group_vars/neutron_all.yml b/inventory/group_vars/neutron_all.yml index fe64251ae6..9675eed92e 100644 --- a/inventory/group_vars/neutron_all.yml +++ b/inventory/group_vars/neutron_all.yml @@ -16,6 +16,14 @@ # These are here rather than in neutron_all because # both the os_ceilometer and os_neutron roles require them +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +# Oslo Messaging +neutron_oslomsg_rpc_userid: neutron +neutron_oslomsg_rpc_vhost: /neutron +neutron_oslomsg_notify_userid: neutron +neutron_oslomsg_notify_vhost: /neutron + # Telemetry notifications neutron_rabbitmq_telemetry_userid: "{{ neutron_rabbitmq_userid }}" neutron_rabbitmq_telemetry_password: "{{ neutron_rabbitmq_password }}" diff --git a/inventory/group_vars/nova_all.yml b/inventory/group_vars/nova_all.yml index 4e0dabd1da..d4e504671c 100644 --- a/inventory/group_vars/nova_all.yml +++ b/inventory/group_vars/nova_all.yml @@ -46,6 +46,13 @@ nova_rabbitmq_telemetry_servers: "{{ nova_rabbitmq_servers }}" nova_rabbitmq_telemetry_use_ssl: "{{ nova_rabbitmq_use_ssl }}" nova_rabbitmq_telemetry_host_group: "{{ nova_rabbitmq_host_group }}" +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +nova_oslomsg_rpc_userid: nova +nova_oslomsg_rpc_vhost: /nova +nova_oslomsg_notify_userid: nova +nova_oslomsg_notify_vhost: /nova + # If there are any Designate hosts in the environment, then enable its usage nova_designate_enabled: "{{ (groups['designate_all'] is defined) and (groups['designate_all'] | length > 0) }}" # If there are any Ceilometer hosts in the environment, then enable its usage diff --git a/inventory/group_vars/octavia_all.yml b/inventory/group_vars/octavia_all.yml index ced7d1eea3..734d628794 100644 --- a/inventory/group_vars/octavia_all.yml +++ b/inventory/group_vars/octavia_all.yml @@ -16,6 +16,13 @@ octavia_service_internalurl: "{{ octavia_service_internaluri }}/v1/%(project_id)s" octavia_service_user_name: octavia +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +octavia_oslomsg_rpc_userid: octavia +octavia_oslomsg_rpc_vhost: /octavia +octavia_oslomsg_notify_userid: octavia +octavia_oslomsg_notify_vhost: /octavia + # RPC octavia_rabbitmq_userid: octavia octavia_rabbitmq_vhost: /octavia diff --git a/inventory/group_vars/sahara_all.yml b/inventory/group_vars/sahara_all.yml index 06b35738ad..38f681ae9e 100644 --- a/inventory/group_vars/sahara_all.yml +++ b/inventory/group_vars/sahara_all.yml @@ -11,6 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +sahara_oslomsg_rpc_userid: sahara +sahara_oslomsg_rpc_vhost: /sahara +sahara_oslomsg_notify_userid: sahara +sahara_oslomsg_notify_vhost: /sahara + #RPC sahara_rabbitmq_userid: sahara sahara_rabbitmq_vhost: /sahara diff --git a/inventory/group_vars/swift_all.yml b/inventory/group_vars/swift_all.yml index 947a4e9342..e253a0ad52 100644 --- a/inventory/group_vars/swift_all.yml +++ b/inventory/group_vars/swift_all.yml @@ -19,6 +19,13 @@ swift_system_shell: "{{ hostvars['localhost']['swift_system_shell'] }}" swift_system_comment: "{{ hostvars['localhost']['swift_system_comment'] }}" swift_system_home_folder: "{{ hostvars['localhost']['swift_system_home_folder'] }}" +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +swift_oslomsg_rpc_userid: swift +swift_oslomsg_rpc_vhost: /swift +swift_oslomsg_notify_userid: swift +swift_oslomsg_notify_vhost: /swift + # Swift Telemetry notifications swift_rabbitmq_telemetry_userid: "swift" swift_rabbitmq_telemetry_vhost: "/swift" diff --git a/inventory/group_vars/tacker_all.yml b/inventory/group_vars/tacker_all.yml index 95d5b838d1..6378d20f79 100644 --- a/inventory/group_vars/tacker_all.yml +++ b/inventory/group_vars/tacker_all.yml @@ -16,6 +16,13 @@ tacker_service_user_name: tacker tacker_service_tenant_name: service +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +tacker_oslomsg_rpc_userid: tacker +tacker_oslomsg_rpc_vhost: /tacker +tacker_oslomsg_notify_userid: tacker +tacker_oslomsg_notify_vhost: /tacker + tacker_rabbitmq_userid: tacker tacker_rabbitmq_vhost: /tacker tacker_rabbitmq_port: "{{ rabbitmq_port }}" diff --git a/inventory/group_vars/trove_all.yml b/inventory/group_vars/trove_all.yml index d90b4647ee..fa7fc34af3 100644 --- a/inventory/group_vars/trove_all.yml +++ b/inventory/group_vars/trove_all.yml @@ -20,6 +20,13 @@ trove_galera_user: trove trove_galera_database_name: trove_service trove_galera_address: "{{ galera_address }}" +# TODO(ansmith): remove rabbitmq vars once service file is updated +# to use oslomsg vars +trove_oslomsg_rpc_userid: trove +trove_oslomsg_rpc_vhost: /trove +trove_oslomsg_notify_userid: trove +trove_oslomsg_notify_vhost: /trove + # RPC trove_rabbitmq_userid: trove trove_rabbitmq_vhost: /trove diff --git a/playbooks/common-tasks/oslomsg-notify-vhost-user.yml b/playbooks/common-tasks/oslomsg-notify-vhost-user.yml new file mode 100644 index 0000000000..2af0f695bb --- /dev/null +++ b/playbooks/common-tasks/oslomsg-notify-vhost-user.yml @@ -0,0 +1,46 @@ +--- +# +# 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. + +# Usage: +# To use this common task to create to create the user and vhost if +# needed for the messaging backend configured for Notify communications. +# To used this common task, the variables "notify_user", "notify_password" +# and "notify_vhost" must be set. + +- name: Ensure Notify Rabbitmq vhost + rabbitmq_vhost: + name: "{{ notify_vhost }}" + state: "present" + delegate_to: "{{ groups[oslomsg_notify_host_group][0] }}" + tags: + - common-rabbitmq + when: + - oslomsg_notify_transport == "rabbit" + +- name: Ensure Notify Rabbitmq user + rabbitmq_user: + user: "{{ notify_user }}" + password: "{{ notify_password }}" + vhost: "{{ vhost }}" + configure_priv: ".*" + read_priv: ".*" + write_priv: ".*" + state: "present" + delegate_to: "{{ groups[oslomsg_notify_host_group][0] }}" + no_log: true + tags: + - common-rabbitmq + when: + - oslomsge_notify_transport == "rabbit" + diff --git a/playbooks/common-tasks/oslomsg-rpc-vhost-user.yml b/playbooks/common-tasks/oslomsg-rpc-vhost-user.yml new file mode 100644 index 0000000000..f8a1ee1b3c --- /dev/null +++ b/playbooks/common-tasks/oslomsg-rpc-vhost-user.yml @@ -0,0 +1,61 @@ +--- +# +# 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. + +# Usage: +# To use this common task to create to create the user and vhost (if +# needed for the messaging backend configured for RPC communications. +# To used this common task, the variables "rpc_user", "rpc_password" and +# "rpc_vhost" must be set. + +- name: Ensure RPC Rabbitmq vhost + rabbitmq_vhost: + name: "{{ rpc_vhost }}" + state: "present" + delegate_to: "{{ groups[oslomsg_rpc_host_group][0] }}" + tags: + - common-rabbitmq + 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_host_group][0] }}" + no_log: true + tags: + - common-rabbitmq + when: + - oslomsg_rpc_transport == "rabbit" + +- name: Ensure RPC qdrouterd vhost + command: echo 'create rpc qdrouterd vhost' + delegate_to: "{{ groups[oslomsg_rpc_host_group][0] }}" + tags: + - common-qdrouterd + when: + - oslomsg_rpc_transport == "amqp" + +- name: Ensure RPC qdrouterd user + command: echo 'create rpc qdrouterd user' + delegate_to: "{{ groups[oslomsg_rpc_host_group][0] }}" + tags: + - common-qdrouterd + when: + - oslomsg_rpc_transport == "amqp" diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index 311f63c6af..cd134d3f35 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -29,6 +29,26 @@ when: - inventory_hostname == groups['aodh_api'][0] - groups[aodh_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ aodh_oslomsg_rpc_userid }}" + rpc_password: "{{ aodh_oslomsg_rpc_password }}" + rpc_vhost: "{{ aodh_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['aodh_api'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ aodh_oslomsg_notify_userid }}" + notify_password: "{{ aodh_oslomsg_notify_password }}" + notify_vhost: "{{ aodh_oslomsg_notify_vhost }}" + when: + - inventory_hostname == groups['aodh_api'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 3f433894a1..9b26e29656 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -29,6 +29,26 @@ when: - inventory_hostname == groups['barbican_api'][0] - groups[barbican_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ barbican_oslomsg_rpc_userid }}" + rpc_password: "{{ barbican_oslomsg_rpc_password }}" + rpc_vhost: "{{ barbican_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['barbican_api'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ barbican_oslomsg_notify_userid }}" + notify_password: "{{ barbican_oslomsg_notify_password }}" + notify_vhost: "{{ barbican_oslomsg_notify_vhost }}" + when: + - inventory_hostname == groups['barbican_api'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index 745a9b37aa..cab70aa824 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -29,6 +29,26 @@ when: - inventory_hostname == groups['ceilometer_central_container'][0] - groups[ceilometer_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ ceilometer_oslomsg_rpc_userid }}" + rpc_password: "{{ ceilometer_oslomsg_rpc_password }}" + rpc_vhost: "{{ ceilometer_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['ceilometer_central_container'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ ceilometer_oslomsg_notify_userid }}" + notify_password: "{{ ceilometer_oslomsg_notify_password }}" + notify_vhost: "{{ ceilometer_oslomsg_notify_vhost }}" + when: + - inventory_hostname == groups['ceilometer_central_container'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index 23f83b8ec6..53e77007f5 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -46,6 +46,26 @@ - "groups[cinder_rabbitmq_telemetry_host_group] != groups[cinder_rabbitmq_host_group]" run_once: yes + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ cinder_oslomsg_rpc_userid }}" + rpc_password: "{{ cinder_oslomsg_rpc_password }}" + rpc_vhost: "{{ cinder_oslomsg_rpc_vhost }}" + when: + - groups[oslomsg_rpc_host_group] | length > 0 + run_once: yes + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ cinder_oslomsg_notify_userid }}" + notify_password: "{{ cinder_oslomsg_notify_password }}" + notify_vhost: "{{ cinder_oslomsg_notify_vhost }}" + when: + - "cinder_ceilometer_enabled | bool" + - groups[oslomsg_notify_host_group] | length > 0 + run_once: yes + - name: Configure MySQL user include: common-tasks/mysql-db-user.yml vars: diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index ed3b81dacd..420e6fe4d1 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -45,6 +45,27 @@ - groups[designate_rabbitmq_telemetry_host_group] is defined - groups[designate_rabbitmq_telemetry_host_group] | length > 0 - groups[designate_rabbitmq_telemetry_host_group] != groups[designate_rabbitmq_host_group] + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ designate_oslomsg_rpc_userid }}" + rpc_password: "{{ designate_oslomsg_rpc_password }}" + rpc_vhost: "{{ designate_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['designate_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ designate_oslomsg_notify_userid }}" + notify_password: "{{ designate_oslomsg_notify_password }}" + notify_vhost: "{{ designate_oslomsg_notify_vhost }}" + when: + - designate_ceilometer_enabled | bool + - inventory_hostname == groups['designate_all'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index fdd2b1c2a9..c120205b3d 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -46,6 +46,24 @@ - groups[glance_rabbitmq_telemetry_host_group] != groups[glance_rabbitmq_host_group] run_once: yes + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ glance_oslomsg_rpc_userid }}" + rpc_password: "{{ glance_oslomsg_rpc_password }}" + rpc_vhost: "{{ glance_oslomsg_rpc_vhost }}" + when: + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ glance_oslomsg_notify_userid }}" + notify_password: "{{ glance_oslomsg_notify_password }}" + notify_vhost: "{{ glance_oslomsg_notify_vhost }}" + when: + - glance_ceilometer_enabled | bool + - groups[oslomsg_notify_host_group] | length > 0 + - name: Configure MySQL user include: common-tasks/mysql-db-user.yml vars: diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index aabcde88b0..88adbc47b2 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -42,6 +42,27 @@ - groups[heat_rabbitmq_telemetry_host_group] is defined - groups[heat_rabbitmq_telemetry_host_group] | length > 0 - groups[heat_rabbitmq_telemetry_host_group] != groups[heat_rabbitmq_host_group] + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ heat_oslomsg_rpc_userid }}" + rpc_password: "{{ heat_oslomsg_rpc_password }}" + rpc_vhost: "{{ heat_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['heat_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ heat_oslomsg_notify_userid }}" + notify_password: "{{ heat_oslomsg_notify_password }}" + notify_vhost: "{{ heat_oslomsg_notify_vhost }}" + when: + - heat_ceilometer_enabled | bool + - inventory_hostname == groups['heat_all'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 6c8696877d..7aef3d9683 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -29,6 +29,17 @@ when: - inventory_hostname == groups['ironic_all'][0] - groups[ironic_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ ironic_oslomsg_rpc_userid }}" + rpc_password: "{{ ironic_oslomsg_rpc_password }}" + rpc_vhost: "{{ ironic_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['ironic_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/mysql-db-user.yml static: no vars: diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 7d1d9a3722..b1903734f3 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -47,6 +47,27 @@ - "groups[keystone_rabbitmq_telemetry_host_group] != groups[keystone_rabbitmq_host_group]" run_once: yes + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ keystone_oslomsg_rpc_userid }}" + rpc_password: "{{ keystone_oslomsg_rpc_password }}" + rpc_vhost: "{{ keystone_oslomsg_rpc_vhost }}" + when: + - groups[oslomsg_rpc_host_group] | length > 0 + run_once: yes + + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ keystone_oslomsg_notify_userid }}" + notify_password: "{{ keystone_oslomsg_notify_password }}" + notify_vhost: "{{ keystone_oslomsg_notify_vhost }}" + when: + - "keystone_ceilometer_enabled | bool" + - groups[oslomsg_notify_host_group] | length > 0 + run_once: yes + - name: Configure MySQL user include: common-tasks/mysql-db-user.yml vars: diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 385742b7c7..b9401b5eea 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -40,6 +40,17 @@ when: - inventory_hostname == groups['magnum_all'][0] - groups[magnum_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ magnum_oslomsg_rpc_userid }}" + rpc_password: "{{ magnum_oslomsg_rpc_password }}" + rpc_vhost: "{{ magnum_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['magnum_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/mysql-db-user.yml static: no vars: diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index 43288f7faa..25fe5f2139 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -60,6 +60,27 @@ - groups[neutron_rabbitmq_telemetry_host_group] != groups[neutron_rabbitmq_host_group] run_once: yes + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ neutron_oslomsg_rpc_userid }}" + rpc_password: "{{ neutron_oslomsg_rpc_password }}" + rpc_vhost: "{{ neutron_oslomsg_rpc_vhost }}" + when: + - groups[oslomsg_rpc_host_group] | length > 0 + run_once: yes + + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ neutron_oslomsg_notify_userid }}" + notify_password: "{{ neutron_oslomsg_notify_password }}" + notify_vhost: "{{ neutron_oslomsg_notify_vhost }}" + when: + - neutron_ceilometer_enabled | bool + - groups[oslomsg_notify_host_group] | length > 0 + run_once: yes + - name: Configure MySQL user include: common-tasks/mysql-db-user.yml static: no diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index be6414e91b..28fa20fc2b 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -47,6 +47,27 @@ - groups[nova_rabbitmq_telemetry_host_group] != groups[nova_rabbitmq_host_group] run_once: yes + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ nova_oslomsg_rpc_userid }}" + rpc_password: "{{ nova_oslomsg_rpc_password }}" + rpc_vhost: "{{ nova_oslomsg_rpc_vhost }}" + when: + - groups[oslomsg_rpc_host_group] | length > 0 + run_once: yes + + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ nova_oslomsg_notify_userid }}" + notify_password: "{{ nova_oslomsg_notify_password }}" + notify_vhost: "{{ nova_oslomsg_notify_vhost }}" + when: + - nova_ceilometer_enabled | bool + - groups[oslomsg_notify_host_group] | length > 0 + run_once: yes + - name: Configure MySQL user (nova) include: common-tasks/mysql-db-user.yml vars: diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 4cb349b1dd..29efa4c7b3 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -30,6 +30,17 @@ when: - inventory_hostname == groups['octavia_all'][0] - groups[octavia_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ octavia_oslomsg_rpc_userid }}" + rpc_password: "{{ octavia_oslomsg_rpc_password }}" + rpc_vhost: "{{ octavia_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['octavia_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index 09dc410b5c..3f9cf7442a 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -40,6 +40,27 @@ - groups[sahara_rabbitmq_telemetry_host_group] is defined - groups[sahara_rabbitmq_telemetry_host_group] | length > 0 - groups[sahara_rabbitmq_telemetry_host_group] != groups[sahara_rabbitmq_host_group] + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ sahara_oslomsg_rpc_userid }}" + rpc_password: "{{ sahara_oslomsg_rpc_password }}" + rpc_vhost: "{{ sahara_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['sahara_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ sahara_oslomsg_notify_userid }}" + notify_password: "{{ sahara_oslomsg_notify_password }}" + notify_vhost: "{{ sahara_oslomsg_notify_vhost }}" + when: + - sahara_ceilometer_enabled | bool + - inventory_hostname == groups['sahara_all'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 87c11de9d4..b9452b9706 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -49,6 +49,19 @@ - inventory_hostname == groups['swift_all'][0] tags: - always + + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ swift_oslomsg_notify_userid }}" + notify_password: "{{ swift_oslomsg_notify_password }}" + notify_vhost: "{{ swift_oslomsg_notify_vhost }}" + when: + - swift_ceilometer_enabled | bool + - inventory_hostname == groups['swift_all'][0] + tags: + - always + roles: - role: "os_swift" swift_do_setup: True diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index 5b6af6708e..e2b074bc38 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -29,6 +29,17 @@ when: - inventory_hostname == groups['tacker_all'][0] - groups[tacker_rabbitmq_host_group] | length > 0 + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ tacker_oslomsg_rpc_userid }}" + rpc_password: "{{ tacker_oslomsg_rpc_password }}" + rpc_vhost: "{{ tacker_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['tacker_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index d62e712503..9dbfa0cfc4 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -45,6 +45,27 @@ - groups[trove_rabbitmq_telemetry_host_group] is defined - groups[trove_rabbitmq_telemetry_host_group] | length > 0 - groups[trove_rabbitmq_telemetry_host_group] != groups[trove_rabbitmq_host_group] + + - include: common-tasks/oslomsg-rpc-vhost-user.yml + static: no + vars: + rpc_user: "{{ trove_oslomsg_rpc_userid }}" + rpc_password: "{{ trove_oslomsg_rpc_password }}" + rpc_vhost: "{{ trove_oslomsg_rpc_vhost }}" + when: + - inventory_hostname == groups['trove_all'][0] + - groups[oslomsg_rpc_host_group] | length > 0 + - include: common-tasks/oslomsg-notify-vhost-user.yml + static: no + vars: + notify_user: "{{ trove_oslomsg_notify_userid }}" + notify_password: "{{ trove_oslomsg_notify_password }}" + notify_vhost: "{{ trove_oslomsg_notify_vhost }}" + when: + - trove_ceilometer_enabled | bool + - inventory_hostname == groups['trove_all'][0] + - groups[oslomsg_notify_host_group] | length > 0 + - include: common-tasks/os-log-dir-setup.yml vars: log_dirs: