Ceilometer role for OpenStack-Ansible

Ceilometer role for OpenStack-Ansible

This Ansible role installs and configures OpenStack ceilometer.

The ceilometer API is served using Apache mod_wsgi by default.

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.

Table of Contents

To clone or view the source code for this repository, visit the role repository for os_ceilometer.

Default variables

## Verbosity Options
debug: False

# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
ceilometer_package_state: "latest"
ceilometer_pip_package_state: "latest"

## 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/ocata
ceilometer_git_config_lookup_location: https://git.openstack.org/cgit/openstack/ceilometer/plain/

## The packages to build from source (used in developer mode)
  - "git+{{ ceilometer_git_repo }}@{{ ceilometer_git_install_branch }}#egg=ceilometer"

# Name of the virtual env to deploy into
ceilometer_venv_tag: untagged
ceilometer_bin: "/openstack/venvs/ceilometer-{{ ceilometer_venv_tag }}/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

## 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 }}"

## DB info
# Set to blank by default to disable the database dispatcher (prep for deprecation)
ceilometer_db_type: ""
ceilometer_database_name: ceilometer
ceilometer_database_user: ceilometer
ceilometer_db_ip: localhost
ceilometer_db_port: 27017
ceilometer_connection_string: "{{ ceilometer_db_type }}://{{ ceilometer_database_user }}:{{ ceilometer_container_db_password }}@{{ ceilometer_db_ip }}:{{ ceilometer_db_port }}/{{ ceilometer_database_name }}"

## Apache setup
ceilometer_apache_log_level: info
ceilometer_apache_servertokens: "Prod"
ceilometer_apache_serversignature: "Off"
ceilometer_wsgi_threads: 10
ceilometer_wsgi_processes: "{{ (ansible_processor_vcpus | int > 0) | ternary (ansible_processor_vcpus, 1) * 2}}"

## RabbitMQ info

## Configuration for RPC communications
ceilometer_rabbitmq_userid: ceilometer
ceilometer_rabbitmq_vhost: /ceilometer
ceilometer_rabbitmq_port: 5672
# Comma separated list of hosts
ceilometer_rabbitmq_use_ssl: False
# Inventory group containing the hosts for the cluster
ceilometer_rabbitmq_host_group: "rabbitmq_all"

#Ceilometer services info
ceilometer_role_name: admin

## Service Type and Data
ceilometer_service_region: RegionOne
ceilometer_service_name: ceilometer
ceilometer_service_port: 8777
ceilometer_service_proto: http
ceilometer_service_type: metering
ceilometer_service_description: "Ceilometer Service"
ceilometer_service_user_name: ceilometer
ceilometer_service_project_name: service
ceilometer_service_project_domain_id: default
ceilometer_service_user_domain_id: default
ceilometer_service_publicuri: "{{ ceilometer_service_proto }}://{{ external_lb_vip_address }}:{{ ceilometer_service_port }}"
ceilometer_service_publicurl: "{{ ceilometer_service_publicuri }}"
ceilometer_service_internaluri: "{{ ceilometer_service_proto }}://{{ internal_lb_vip_address }}:{{ ceilometer_service_port }}"
ceilometer_service_internalurl: "{{ ceilometer_service_internaluri }}"
ceilometer_service_adminuri: "{{ ceilometer_service_proto }}://{{ internal_lb_vip_address }}:{{ ceilometer_service_port }}"
ceilometer_service_adminurl: "{{ ceilometer_service_adminuri }}"

ceilometer_service_in_ldap: false

## Ceilometer config
# If the following variables are unset in user_variables, the value set will be half the number of available VCPUs
# ceilometer_api_workers: 1
# ceilometer_collector_workers: 1
# ceilometer_notification_workers: 1

## Cap the maximum number of threads / workers when a user value is unspecified.
ceilometer_api_threads_max: 16
ceilometer_api_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, ceilometer_api_threads_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: password

# ceilometer packages that must be installed before anything else
  - httplib2
  - python-keystoneclient # Keystoneclient needed to OSA keystone lib
  - virtualenv
  - virtualenv-tools

# Common pip packages
  - ceilometer
  - ceilometermiddleware
  - gnocchiclient
  - libvirt-python
  - pycrypto
  - PyMySQL
  - pymongo
  - python-ceilometerclient
  - python-memcached
  - tooz
  - warlock

ceilometer_agent_init_overrides: {}
ceilometer_collector_init_overrides: {}
ceilometer_polling_init_overrides: {}

## Service Name-Group Mapping
      - ceilometer_collector
    init_config_overrides: "{{ ceilometer_collector_init_overrides }}"
    service_name: ceilometer-collector
      - ceilometer_agent_notification
    init_config_overrides: "{{ ceilometer_agent_init_overrides }}"
    service_name: ceilometer-agent-notification
      - ceilometer_agent_central
      - ceilometer_agent_compute
    init_config_overrides: "{{ ceilometer_polling_init_overrides }}"
    service_name: ceilometer-polling

  - memcached_encryption_key
  - ceilometer_telemetry_secret
  - ceilometer_rabbitmq_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 overrides
ceilometer_policy_overrides: {}
ceilometer_rootwrap_conf_overrides: {}
ceilometer_ceilometer_conf_overrides: {}
ceilometer_api_paste_ini_overrides: {}
ceilometer_event_definitions_yaml_overrides: {}
ceilometer_event_pipeline_yaml_overrides: {}
ceilometer_pipeline_yaml_overrides: {}
# The incorrectly spelled "ceilometer_gnocci_resources_yaml_overrides" is deprecated and
# will be removed in Pike.
ceilometer_gnocci_resources_yaml_overrides: {}
ceilometer_gnocchi_resources_yaml_overrides: "{{ ceilometer_gnocci_resources_yaml_overrides }}"
ceilometer_osprofiler_event_definitions_yaml_overrides: {}
ceilometer_loadbalancer_v2_meter_definitions_yaml_overrides: {}
ceilometer_polling_yaml_overrides: {}

Example playbook

- name: Install ceilometer server
  hosts: ceilometer_all
  user: root
    - { role: "os_ceilometer", tags: [ "ceilometer-config", "ceilometer-install" ] }


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.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.