Merge "Add vars for Swift telemetry settings"

This commit is contained in:
Jenkins 2016-09-01 18:03:10 +00:00 committed by Gerrit Code Review
commit 08ca66d537
4 changed files with 24 additions and 3 deletions

View File

@ -119,6 +119,8 @@ swift_dispersion_password:
### Once the swift cluster has been setup DO NOT change these hash values!
swift_hash_path_suffix:
swift_hash_path_prefix:
# Swift needs a telemetry password when using ceilometer
swift_rabbitmq_telemetry_password:
## haproxy stats password
haproxy_stats_password:

View File

@ -379,6 +379,18 @@ swift_system_shell: /bin/bash
swift_system_comment: swift system user
swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}"
# Swift Telemetry notifications
swift_rabbitmq_telemetry_userid: "swift"
swift_rabbitmq_telemetry_vhost: "/swift"
swift_rabbitmq_telemetry_servers: "{{ rabbitmq_servers }}"
# TODO: (andymccr) ceilometer with swift does not support SSL rabbitmq connections, so we are hard coding the port and use_ssl var
swift_rabbitmq_telemetry_port: "5672"
swift_rabbitmq_use_ssl: False
swift_rabbitmq_telemetry_host_group: "{{ rabbitmq_host_group }}"
# If there are any Ceilometer and Swift hosts in the environment, then enable its usage
swift_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['swift_proxy'] is defined) and (groups['ceilometer_all'] | length > 0) and (groups['swift_proxy'] | length > 0) }}"
## OpenStack Openrc
openrc_os_auth_url: "{{ keystone_service_internalurl }}"
openrc_os_password: "{{ keystone_auth_admin_password }}"

View File

@ -16,8 +16,5 @@
swift_service_region: "{{ service_region }}"
swift_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
swift_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
# Ensure that the package state matches the global setting
swift_package_state: "{{ package_state }}"

View File

@ -99,6 +99,16 @@
- inventory_hostname in groups['swift_all']
- hostvars[inventory_hostname]['container_networks']['replication_address']['address'] is undefined
- not is_metal | bool
# If we're using ceilometer then swift needs a rabbitmq/vhost & usera
- include: common-tasks/rabbitmq-vhost-user.yml
vars:
user: "{{ swift_rabbitmq_telemetry_userid }}"
password: "{{ swift_rabbitmq_telemetry_password }}"
vhost: "{{ swift_rabbitmq_telemetry_vhost }}"
_rabbitmq_host_group: "{{ swift_rabbitmq_telemetry_host_group }}"
when:
- swift_ceilometer_enabled | bool
- inventory_hostname == groups['swift_all'][0]
roles:
- role: "os_swift"
swift_venv_tag: "{{ openstack_release }}"