From bd64bf7372869e1b42ff90de562f703730e0790b Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 28 Jun 2018 20:01:38 +0100 Subject: [PATCH] Move MQ vhost/user creation into role (glance) There is no record for why we implement the MQ vhost/user creation outside of the role in the playbook, when we could do it inside the role. Implementing it inside the role allows us to reduce the quantity of group_vars duplicated from the role, and allows us to better document the required variables in the role. The delegation can still be done as it is done in the playbook too. In this patch we remove the group_vars which were duplicated from the role, and remove the MQ setup tasks as they are no longer required. We also remove the user_secrets which are now totally unused. Depends-On: https://review.openstack.org/568517 Change-Id: I366d9f7f7ffb0d6912590520a5ea5a718ab0d9af --- etc/openstack_deploy/user_secrets.yml | 1 - inventory/group_vars/all/oslo-messaging.yml | 24 ---------------- playbooks/os-glance-install.yml | 31 --------------------- 3 files changed, 56 deletions(-) diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml index 013e548d50..df1d042356 100644 --- a/etc/openstack_deploy/user_secrets.yml +++ b/etc/openstack_deploy/user_secrets.yml @@ -69,7 +69,6 @@ cinder_ceph_client_uuid: glance_container_mysql_password: glance_service_password: glance_profiler_hmac_key: -glance_rabbitmq_password: glance_oslomsg_rpc_password: glance_oslomsg_notify_password: diff --git a/inventory/group_vars/all/oslo-messaging.yml b/inventory/group_vars/all/oslo-messaging.yml index 9863fd28e4..06884d7ce0 100644 --- a/inventory/group_vars/all/oslo-messaging.yml +++ b/inventory/group_vars/all/oslo-messaging.yml @@ -137,30 +137,6 @@ designate_rabbitmq_use_ssl: "{{ oslomsg_rpc_use_ssl }}" designate_rabbitmq_userid: "{{ designate_oslomsg_rpc_userid }}" designate_rabbitmq_vhost: "{{ designate_oslomsg_rpc_vhost }}" -## Glance -glance_oslomsg_rpc_userid: glance -glance_oslomsg_rpc_vhost: /glance -glance_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport }}" -glance_oslomsg_rpc_port: "{{ oslomsg_rpc_port }}" -glance_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers }}" -glance_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl }}" -glance_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group }}" -glance_oslomsg_notify_userid: glance -glance_oslomsg_notify_vhost: /glance -glance_oslomsg_notify_transport: "{{ oslomsg_notify_transport }}" -glance_oslomsg_notify_port: "{{ oslomsg_notify_port }}" -glance_oslomsg_notify_servers: "{{ oslomsg_notify_servers }}" -glance_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl }}" -glance_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group }}" -# Shim to remove when wiring is done in ceilometer and glance role -glance_rabbitmq_host_group: "{{ oslomsg_rpc_host_group }}" -glance_rabbitmq_port: "{{ oslomsg_rpc_port }}" -glance_rabbitmq_servers: "{{ oslomsg_rpc_servers }}" -glance_rabbitmq_use_ssl: "{{ oslomsg_rpc_use_ssl }}" -glance_rabbitmq_userid: "{{ glance_oslomsg_rpc_userid }}" -glance_rabbitmq_vhost: "{{ glance_oslomsg_rpc_vhost }}" - - ## Heat heat_oslomsg_rpc_userid: heat heat_oslomsg_rpc_vhost: /heat diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 40ee058752..6e72ed119e 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -13,37 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Prepare MQ services - hosts: glance_all - gather_facts: no - user: root - environment: "{{ deployment_environment_variables | default({}) }}" - tags: - - glance - tasks: - - name: Configure oslo messaging rpc vhost/user - 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[glance_oslomsg_rpc_host_group] | length > 0 - - - name: Configure oslo.messaging notify vhost/user - 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[glance_oslomsg_notify_host_group] | length > 0 - - - - name: Install glance API services include: common-playbooks/glance.yml vars: