This Ansible role installs and configures OpenStack ceilometer.
Meter and notification storage is configured to use a MongoDB backend
by default. This role does not install and configure the MongoDB backend.
Deployers wishing to use MongoDB must install and configure it prior to
using this role and override ceilometer_connection_string
variable with
MongoDB connection details.
To clone or view the source code for this repository, visit the role repository for os_ceilometer.
## Verbosity Options
debug: False
# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
ceilometer_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
ceilometer_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((ceilometer_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
ceilometer_package_state: "latest"
ceilometer_pip_package_state: "latest"
# Set installation method.
ceilometer_install_method: "source"
## Toggle developer mode
ceilometer_developer_mode: false
## The git source/branch
ceilometer_git_repo: https://git.openstack.org/openstack/ceilometer
ceilometer_git_install_branch: 'stable/rocky'
## The packages to build from source (used in developer mode)
ceilometer_developer_constraints:
- "git+{{ ceilometer_git_repo }}@{{ ceilometer_git_install_branch }}#egg=ceilometer"
# Name of the virtual env to deploy into
ceilometer_venv_tag: untagged
ceilometer_bin: "{{ _ceilometer_bin }}"
# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
ceilometer_venv_download: "{{ not ceilometer_developer_mode | bool }}"
# URL of the pre-built virtualenv
ceilometer_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/ceilometer.tgz
## System info
ceilometer_system_user_name: ceilometer
ceilometer_system_group_name: ceilometer
ceilometer_system_shell: /bin/false
ceilometer_system_comment: ceilometer system user
ceilometer_system_user_home: "/var/lib/{{ ceilometer_system_user_name }}"
## Oslo Messaging info
# RPC
ceilometer_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
ceilometer_oslomsg_rpc_setup_host: "{{ (ceilometer_oslomsg_rpc_host_group in groups) | ternary(groups[ceilometer_oslomsg_rpc_host_group][0], 'localhost') }}"
ceilometer_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
ceilometer_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
ceilometer_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
ceilometer_oslomsg_rpc_userid: ceilometer
ceilometer_oslomsg_rpc_vhost: /ceilometer
# Notify
ceilometer_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
ceilometer_oslomsg_notify_setup_host: "{{ (ceilometer_oslomsg_notify_host_group in groups) | ternary(groups[ceilometer_oslomsg_notify_host_group][0], 'localhost') }}"
ceilometer_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
ceilometer_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
ceilometer_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
ceilometer_oslomsg_notify_userid: "{{ ceilometer_oslomsg_rpc_userid }}"
ceilometer_oslomsg_notify_password: "{{ ceilometer_oslomsg_rpc_password }}"
ceilometer_oslomsg_notify_vhost: "{{ ceilometer_oslomsg_rpc_vhost }}"
# Glance notifications
glance_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
glance_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
glance_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
glance_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
glance_oslomsg_notify_userid: "{{ glance_oslomsg_rpc_userid | default('glance') }}"
glance_oslomsg_notify_password: "{{ glance_ceilometer_enabled | ternary(glance_oslomsg_rpc_password, '') }}"
glance_oslomsg_notify_vhost: "{{ glance_oslomsg_rpc_vhost | default('/glance') }}"
# Nova notifications
nova_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
nova_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
nova_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
nova_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
nova_oslomsg_notify_userid: "{{ nova_oslomsg_rpc_userid | default('nova') }}"
nova_oslomsg_notify_password: "{{ nova_ceilometer_enabled | ternary(nova_oslomsg_rpc_password, '') }}"
nova_oslomsg_notify_vhost: "{{ nova_oslomsg_rpc_vhost | default('/nova') }}"
# Cinder notifications
cinder_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
cinder_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
cinder_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
cinder_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
cinder_oslomsg_notify_userid: "{{ cinder_oslomsg_rpc_userid | default('cinder') }}"
cinder_oslomsg_notify_password: "{{ cinder_ceilometer_enabled | ternary(cinder_oslomsg_rpc_password, '') }}"
cinder_oslomsg_notify_vhost: "{{ cinder_oslomsg_rpc_vhost | default('/cinder') }}"
# Neutron notifications
neutron_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
neutron_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
neutron_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
neutron_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
neutron_oslomsg_notify_userid: "{{ neutron_oslomsg_rpc_userid | default('neutron') }}"
neutron_oslomsg_notify_password: "{{ neutron_ceilometer_enabled | ternary(neutron_oslomsg_rpc_password, '') }}"
neutron_oslomsg_notify_vhost: "{{ neutron_oslomsg_rpc_vhost | default('/neutron') }}"
# Heat notifications
heat_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
heat_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
heat_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
heat_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
heat_oslomsg_notify_userid: "{{ heat_oslomsg_rpc_userid | default('heat') }}"
heat_oslomsg_notify_password: "{{ heat_ceilometer_enabled | ternary(heat_oslomsg_rpc_password, '') }}"
heat_oslomsg_notify_vhost: "{{ heat_oslomsg_rpc_vhost | default('/heat') }}"
# Keystone notifications
keystone_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
keystone_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
keystone_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
keystone_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
keystone_oslomsg_notify_userid: "{{ keystone_oslomsg_rpc_userid | default('keystone') }}"
keystone_oslomsg_notify_password: "{{ keystone_ceilometer_enabled | ternary(keystone_oslomsg_rpc_password, '') }}"
keystone_oslomsg_notify_vhost: "{{ keystone_oslomsg_rpc_vhost | default('/keystone') }}"
# Swift notifications
swift_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
swift_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
swift_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
swift_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
swift_oslomsg_notify_userid: "swift"
swift_oslomsg_notify_vhost: "/swift"
# Sahara notifications
sahara_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
sahara_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
sahara_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
sahara_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
sahara_oslomsg_notify_userid: "{{ sahara_oslomsg_rpc_userid | default('sahara') }}"
sahara_oslomsg_notify_password: "{{ sahara_ceilometer_enabled | ternary(sahara_oslomsg_rpc_password, '') }}"
sahara_oslomsg_notify_vhost: "{{ sahara_oslomsg_rpc_vhost | default('/sahara') }}"
## (Qdrouterd) info
# TODO(ansmith): Change structure when more backends will be supported
ceilometer_oslomsg_amqp1_enabled: "{{ ceilometer_oslomsg_rpc_transport == 'amqp' }}"
#Ceilometer services info
ceilometer_role_name: admin
## Service Type and Data
ceilometer_service_region: RegionOne
ceilometer_service_user_name: ceilometer
ceilometer_service_project_name: service
ceilometer_service_project_domain_id: default
ceilometer_service_user_domain_id: default
ceilometer_service_interface: internalURL
ceilometer_service_in_ldap: false
## Ceilometer config
# Cap the maximum number of threads / workers when a user value is unspecified
ceilometer_notification_workers_max: 16
ceilometer_notification_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, ceilometer_notification_workers_max] | min }}"
# Enable/Disable Ceilometer per service
glance_ceilometer_enabled: false
nova_ceilometer_enabled: false
cinder_ceilometer_enabled: false
neutron_ceilometer_enabled: false
heat_ceilometer_enabled: false
keystone_ceilometer_enabled: false
swift_ceilometer_enabled: false
sahara_ceilometer_enabled: false
# Enable/Disable Telemetry partner services in Ceilometer
# Defaults to True if the service is deployed.
ceilometer_aodh_enabled: false
ceilometer_gnocchi_enabled: false
# TODO (andymccr): Remove in Queen release (along with config template overrides)
# Sampling interval for ceilometer-polling services
ceilometer_sample_interval: 600
ceilometer_meter_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_cpu_source_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_disk_source_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_network_source_sample_interval: "{{ ceilometer_sample_interval }}"
## Keystone authentication middleware
ceilometer_keystone_auth_plugin: "{{ ceilometer_keystone_auth_type }}"
ceilometer_keystone_auth_type: password
# Common pip packages
ceilometer_pip_packages:
- ceilometer
- ceilometermiddleware
- cryptography
- gnocchiclient
- osprofiler
- PyMySQL
- pymongo
- python-ceilometerclient
- python-memcached
- systemd-python
- tooz[zake]
- warlock
- kazoo
- redis
ceilometer_optional_oslomsg_amqp1_pip_packages:
- oslo.messaging[amqp1]
ceilometer_agent_init_overrides: {}
ceilometer_polling_init_overrides: {}
## Service Name-Group Mapping
ceilometer_services:
ceilometer-agent-notification:
group:
- ceilometer_agent_notification
init_config_overrides: "{{ ceilometer_agent_init_overrides }}"
service_name: ceilometer-agent-notification
execstarts: "{{ ceilometer_bin }}/ceilometer-agent-notification"
ceilometer-polling:
group:
- ceilometer_agent_central
- ceilometer_agent_compute
init_config_overrides: "{{ ceilometer_polling_init_overrides }}"
service_name: ceilometer-polling
execstarts: "{{ ceilometer_bin }}/ceilometer-polling"
ceilometer_required_secrets:
- memcached_encryption_key
- ceilometer_telemetry_secret
- ceilometer_oslomsg_rpc_password
- ceilometer_oslomsg_notify_password
- ceilometer_service_password
# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
ceilometer_role_project_group: ceilometer_all
#: Tunable file-based overrides
# The contents of these files, if they exist, are read from the
# specified path on the deployment host, interpreted by the
# template engine and copied to the target host. If they do
# not exist then the default files will be sourced from the
# service git repository.
ceilometer_gnocchi_resources_default_file_path: "/etc/openstack_deploy/ceilometer/gnocchi_resources.yaml"
ceilometer_loadbalancer_v2_meter_definitions_default_file_path: "/etc/openstack_deploy/ceilometer/loadbalancer_v2_meter_definitions.yaml"
ceilometer_osprofiler_event_definitions_default_file_path: "/etc/openstack_deploy/ceilometer/osprofiler_event_definitions.yaml"
ceilometer_polling_default_file_path: "/etc/openstack_deploy/ceilometer/polling.yaml"
# If the above-mentioned files do not exist, then these
# paths will be used to find the files from the git config
# lookup location.
ceilometer_git_config_lookup_location: https://git.openstack.org/cgit/openstack/ceilometer/plain
ceilometer_gnocchi_resources_git_file_path: "ceilometer/publisher/data/gnocchi_resources.yaml?h={{ ceilometer_git_install_branch }}"
ceilometer_loadbalancer_v2_meter_definitions_git_file_path: "etc/ceilometer/examples/loadbalancer_v2_meter_definitions.yaml?h={{ ceilometer_git_install_branch }}"
ceilometer_osprofiler_event_definitions_git_file_path: "etc/ceilometer/examples/osprofiler_event_definitions.yaml?h={{ ceilometer_git_install_branch }}"
ceilometer_polling_git_file_path: "etc/ceilometer/polling.yaml?h={{ ceilometer_git_install_branch }}"
## Tunable var-based overrides
# The contents of these are templated over the default files.
ceilometer_ceilometer_conf_overrides: {}
ceilometer_gnocchi_resources_yaml_overrides: {}
ceilometer_loadbalancer_v2_meter_definitions_yaml_overrides: {}
ceilometer_osprofiler_event_definitions_yaml_overrides: {}
ceilometer_pipeline_yaml_overrides: {}
ceilometer_polling_yaml_overrides: {}
ceilometer_rootwrap_conf_overrides: {}
- name: Install ceilometer server
hosts: ceilometer_all
user: root
roles:
- { role: "os_ceilometer", tags: [ "ceilometer-config", "ceilometer-install" ] }
vars:
external_lb_vip_address: 172.16.24.1
internal_lb_vip_address: 192.168.0.1
This role needs pip >= 7.1 installed on the target host.
This role supports two tags: ceilometer-install
and
ceilometer-config
. The ceilometer-install
tag can be used to install
and upgrade. The ceilometer-config
tag can be used to maintain the
configuration of the service.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.