Remove ceilometer-api and ceilometer-collector services

* remove ceilometer-api and ceilometer-collector service
* use ceilometer-notification to publish message to proper backend
* remove useless ceilometer_database_type and ceilometer_event_type
  variables
* sync event_definitions.yaml, event_pipeline.yaml and pipeline.yaml
  file with upstream

Change-Id: Ib39053cb5f70bd11ee61d3f26d5b28accecd7190
This commit is contained in:
Jeffrey Zhang 2017-06-04 22:32:15 +08:00
parent 2cb46ffbae
commit ddad15c07e
21 changed files with 81 additions and 396 deletions

View File

@ -140,8 +140,6 @@ aodh_api_port: "8042"
barbican_api_port: "9311" barbican_api_port: "9311"
ceilometer_api_port: "8777"
cinder_api_port: "8776" cinder_api_port: "8776"
congress_api_port: "1789" congress_api_port: "1789"
@ -473,16 +471,6 @@ glance_backend_ceph: "{{ enable_ceph }}"
glance_backend_vmware: "no" glance_backend_vmware: "no"
glance_file_datadir_volume: "glance" glance_file_datadir_volume: "glance"
#######################
# Ceilometer options
#######################
# Valid options are [ mongodb, mysql, gnocchi ]
ceilometer_database_type: "mongodb"
# Valid options are [ mongodb, gnocchi, panko ]
ceilometer_event_type: "mongodb"
####################### #######################
# Barbican options # Barbican options
####################### #######################

View File

@ -2,6 +2,7 @@
project_name: "ceilometer" project_name: "ceilometer"
ceilometer_services: ceilometer_services:
# TODO(jeffrey4l): ceilometer_api_image is still required for bootstrap service. Remove this after use ceilometer notification image instead
ceilometer-api: ceilometer-api:
container_name: ceilometer_api container_name: ceilometer_api
group: ceilometer-api group: ceilometer-api
@ -31,16 +32,6 @@ ceilometer_services:
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "ceilometer:/var/lib/ceilometer/" - "ceilometer:/var/lib/ceilometer/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
ceilometer-collector:
container_name: ceilometer_collector
group: ceilometer-collector
enabled: True
image: "{{ ceilometer_collector_image_full }}"
volumes:
- "{{ node_config_directory }}/ceilometer-collector/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "ceilometer:/var/lib/ceilometer/"
- "kolla_logs:/var/log/kolla/"
ceilometer-compute: ceilometer-compute:
container_name: ceilometer_compute container_name: ceilometer_compute
group: ceilometer-compute group: ceilometer-compute
@ -56,17 +47,6 @@ ceilometer_services:
- "nova_libvirt:/var/lib/libvirt" - "nova_libvirt:/var/lib/libvirt"
####################
# Database
####################
ceilometer_database_name: "ceilometer"
ceilometer_database_user: "ceilometer"
ceilometer_database_port: "{{ mongodb_port if ceilometer_database_type == 'mongodb' else database_port }}"
ceilometer_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ceilometer_database_port }}{% if not loop.last %},{% endif %}{% endfor %}"
ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}"
#################### ####################
# Docker # Docker
#################### ####################
@ -77,6 +57,7 @@ ceilometer_notification_image: "{{ docker_registry ~ '/' if docker_registry else
ceilometer_notification_tag: "{{ ceilometer_tag }}" ceilometer_notification_tag: "{{ ceilometer_tag }}"
ceilometer_notification_image_full: "{{ ceilometer_notification_image }}:{{ ceilometer_notification_tag }}" ceilometer_notification_image_full: "{{ ceilometer_notification_image }}:{{ ceilometer_notification_tag }}"
# TODO(jeffrey4l): ceilometer_api_image is still required for bootstrap service. Remove this after use ceilometer notification image instead
ceilometer_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-api" ceilometer_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-api"
ceilometer_api_tag: "{{ ceilometer_tag }}" ceilometer_api_tag: "{{ ceilometer_tag }}"
ceilometer_api_image_full: "{{ ceilometer_api_image }}:{{ ceilometer_api_tag }}" ceilometer_api_image_full: "{{ ceilometer_api_image }}:{{ ceilometer_api_tag }}"
@ -85,10 +66,6 @@ ceilometer_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }
ceilometer_central_tag: "{{ ceilometer_tag }}" ceilometer_central_tag: "{{ ceilometer_tag }}"
ceilometer_central_image_full: "{{ ceilometer_central_image }}:{{ ceilometer_central_tag }}" ceilometer_central_image_full: "{{ ceilometer_central_image }}:{{ ceilometer_central_tag }}"
ceilometer_collector_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-collector"
ceilometer_collector_tag: "{{ ceilometer_tag }}"
ceilometer_collector_image_full: "{{ ceilometer_collector_image }}:{{ ceilometer_collector_tag }}"
ceilometer_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-compute" ceilometer_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-compute"
ceilometer_compute_tag: "{{ ceilometer_tag }}" ceilometer_compute_tag: "{{ ceilometer_tag }}"
ceilometer_compute_image_full: "{{ ceilometer_compute_image }}:{{ ceilometer_compute_tag }}" ceilometer_compute_image_full: "{{ ceilometer_compute_image }}:{{ ceilometer_compute_tag }}"
@ -97,10 +74,6 @@ ceilometer_compute_image_full: "{{ ceilometer_compute_image }}:{{ ceilometer_com
#################### ####################
# OpenStack # OpenStack
#################### ####################
ceilometer_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ ceilometer_api_port }}"
ceilometer_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ ceilometer_api_port }}"
ceilometer_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ ceilometer_api_port }}"
ceilometer_logging_debug: "{{ openstack_logging_debug }}" ceilometer_logging_debug: "{{ openstack_logging_debug }}"
ceilometer_keystone_user: "ceilometer" ceilometer_keystone_user: "ceilometer"

View File

@ -1,28 +1,4 @@
--- ---
- name: Restart ceilometer-api container
vars:
service_name: "ceilometer-api"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_api_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or policy_json.changed | bool
or wsgi_ceilometer_api.changed | bool
or ceilometer_api_container.changed | bool
- name: Restart ceilometer-notification container - name: Restart ceilometer-notification container
vars: vars:
service_name: "ceilometer-notification" service_name: "ceilometer-notification"
@ -72,31 +48,6 @@
or policy_json.changed | bool or policy_json.changed | bool
or ceilometer_central_container.changed | bool or ceilometer_central_container.changed | bool
- name: Restart ceilometer-collector container
vars:
service_name: "ceilometer-collector"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_collector_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_conf: "{{ panko_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or policy_json.changed | bool
or ceilometer_collector_container.changed | bool
or panko_conf.changed | bool
- name: Restart ceilometer-compute container - name: Restart ceilometer-compute container
vars: vars:
service_name: "ceilometer-compute" service_name: "ceilometer-compute"

View File

@ -1,68 +1,3 @@
--- ---
- name: Creating Ceilometer MongoDB database # TODO(Jeffrey4l): fix idempotent
command: docker exec -t mongodb mongo --host {{ ceilometer_database_mongodb_address }} --eval 'db = db.getSiblingDB("{{ ceilometer_database_name }}"); db.createUser({user':' "{{ ceilometer_database_user }}", pwd':' "{{ ceilometer_database_password }}", roles':' [ "readWrite", "dbAdmin" ]})'
register: mongodb_ceilometer_database
run_once: true
changed_when: "{{ 'already' not in mongodb_ceilometer_database.stdout }}"
failed_when: "{{ mongodb_ceilometer_database.stdout.split()[4] != 'connecting' }}"
delegate_to: "{{ groups['mongodb'][0] }}"
when:
- ceilometer_database_type == "mongodb"
- name: Creating external Ceilometer MySQL database by using given credential
kolla_toolbox:
module_name: mysql_db
module_args:
login_host: "{{ ceilometer_database_mysql_address }}"
login_port: "{{ ceilometer_database_port }}"
login_user: "{{ ceilometer_database_user }}"
login_password: "{{ ceilometer_database_password }}"
name: "{{ ceilometer_database_name }}"
register: mysql_access
failed_when: False
changed_when: False
run_once: True
when:
- ceilometer_database_type == "mysql"
- name: Fallback to create internal Ceilometer MySQL database
kolla_toolbox:
module_name: mysql_db
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ database_user }}"
login_password: "{{ database_password }}"
name: "{{ ceilometer_database_name }}"
register: mysql_ceilometer_database
run_once: True
delegate_to: "{{ groups['ceilometer-api'][0] }}"
when:
- ceilometer_database_type == "mysql"
- mysql_access.failed
- name: Creating Ceilometer database user and setting permissions
kolla_toolbox:
module_name: mysql_user
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ database_user }}"
login_password: "{{ database_password }}"
name: "{{ ceilometer_database_user }}"
password: "{{ ceilometer_database_password }}"
host: "%"
priv: "{{ ceilometer_database_name }}.*:ALL"
append_privs: "yes"
run_once: True
delegate_to: "{{ groups['ceilometer-api'][0] }}"
when:
- ceilometer_database_type == "mysql"
- mysql_access.failed
# TODO(Jeffrey4l): fix idempotent when ceilometer_database_type == "gnocchi"
# NOTE(vbel): bootstrapping of mysql db for ceilometer is idempotent
- include: bootstrap_service.yml - include: bootstrap_service.yml
when: ((ceilometer_database_type == "mongodb" and mongodb_ceilometer_database.changed)
or (ceilometer_database_type == "mysql" and mysql_ceilometer_database.changed )
or ceilometer_database_type == "gnocchi")

View File

@ -9,7 +9,7 @@
environment: environment:
KOLLA_BOOTSTRAP: KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
CEILOMETER_DATABASE_TYPE: "{{ ceilometer_database_type }}" CEILOMETER_DATABASE_TYPE: "gnocchi"
image: "{{ ceilometer_api.image }}" image: "{{ ceilometer_api.image }}"
labels: labels:
BOOTSTRAP: BOOTSTRAP:

View File

@ -19,29 +19,10 @@
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ ceilometer_services }}" with_dict: "{{ ceilometer_services }}"
notify: notify:
- Restart ceilometer-api container
- Restart ceilometer-notification container - Restart ceilometer-notification container
- Restart ceilometer-central container - Restart ceilometer-central container
- Restart ceilometer-collector container
- Restart ceilometer-compute container - Restart ceilometer-compute container
- name: Copying over wsgi-ceilometer-api.conf
vars:
service: "{{ ceilometer_services['ceilometer-api'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/ceilometer-api/wsgi-ceilometer-api.conf"
with_first_found:
- "{{ node_custom_config }}/ceilometer/{{ inventory_hostname }}/wsgi-ceilometer-api.conf"
- "{{ node_custom_config }}/ceilometer/wsgi-ceilometer-api.conf"
- "wsgi-ceilometer-api.conf.j2"
register: wsgi_ceilometer_api
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart ceilometer-api container
- name: Copying over ceilometer.conf - name: Copying over ceilometer.conf
vars: vars:
service_name: "{{ item.key }}" service_name: "{{ item.key }}"
@ -61,10 +42,8 @@
- inventory_hostname in groups[item.value.group] - inventory_hostname in groups[item.value.group]
with_dict: "{{ ceilometer_services }}" with_dict: "{{ ceilometer_services }}"
notify: notify:
- Restart ceilometer-api container
- Restart ceilometer-notification container - Restart ceilometer-notification container
- Restart ceilometer-central container - Restart ceilometer-central container
- Restart ceilometer-collector container
- Restart ceilometer-compute container - Restart ceilometer-compute container
- name: Copying over event and pipeline yaml for notification service - name: Copying over event and pipeline yaml for notification service
@ -88,7 +67,6 @@
vars: vars:
service_require_panko_conf: service_require_panko_conf:
- ceilometer-notification - ceilometer-notification
- ceilometer-collector
merge_configs: merge_configs:
sources: sources:
- "{{ role_path }}/../panko/templates/panko.conf.j2" - "{{ role_path }}/../panko/templates/panko.conf.j2"
@ -99,7 +77,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/panko.conf" dest: "{{ node_config_directory }}/{{ item.key }}/panko.conf"
register: panko_confs register: panko_confs
when: when:
- ceilometer_event_type == 'panko' - enable_panko | bool
- item.value.enabled | bool - item.value.enabled | bool
- inventory_hostname in groups[item.value.group] - inventory_hostname in groups[item.value.group]
- item.key in service_require_panko_conf - item.key in service_require_panko_conf
@ -123,10 +101,8 @@
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ ceilometer_services }}" with_dict: "{{ ceilometer_services }}"
notify: notify:
- Restart ceilometer-api container
- Restart ceilometer-notification container - Restart ceilometer-notification container
- Restart ceilometer-central container - Restart ceilometer-central container
- Restart ceilometer-collector container
- Restart ceilometer-compute container - Restart ceilometer-compute container
# check whether the containers parameter is changed. If yes, trigger the handler. # check whether the containers parameter is changed. If yes, trigger the handler.
@ -145,8 +121,6 @@
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ ceilometer_services }}" with_dict: "{{ ceilometer_services }}"
notify: notify:
- Restart ceilometer-api container
- Restart ceilometer-notification container - Restart ceilometer-notification container
- Restart ceilometer-central container - Restart ceilometer-central container
- Restart ceilometer-collector container
- Restart ceilometer-compute container - Restart ceilometer-compute container

View File

@ -1,35 +1,8 @@
--- ---
- name: Get container facts
kolla_container_facts:
name:
- ceilometer_api
register: container_facts
- name: Checking free port for Ceilometer API
wait_for:
host: "{{ api_interface_address }}"
port: "{{ ceilometer_api_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- container_facts['ceilometer_api'] is not defined
- inventory_hostname in groups['ceilometer-api']
- name: Checking mongodb backend for ceilometer
run_once: True
local_action: fail msg="ceilometer_database_type set to 'mongodb' but mongodb is not enabled"
changed_when: false
when:
- enable_ceilometer | bool
- not enable_mongodb | bool
- ceilometer_database_type == "mongodb"
- name: Checking gnocchi backend for ceilometer - name: Checking gnocchi backend for ceilometer
run_once: True run_once: True
local_action: fail msg="ceilometer_database_type or ceilometer_event_type set to 'gnocchi' but gnocchi is not enabled" local_action: fail msg="gnocchi is required but not enabled"
changed_when: false changed_when: false
when: when:
- enable_ceilometer | bool - enable_ceilometer | bool
- not enable_gnocchi | bool - not enable_gnocchi | bool
- (ceilometer_database_type == "gnocchi" or ceilometer_event_type == "gnocchi")

View File

@ -1,24 +1,4 @@
--- ---
- name: Creating the Ceilometer service and endpoint
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
service_name: "ceilometer"
service_type: "metering"
description: "Openstack Telemetry"
endpoint_region: "{{ openstack_region_name }}"
url: "{{ item.url }}"
interface: "{{ item.interface }}"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_ceilometer_auth }}' }}"
module_extra_vars:
openstack_ceilometer_auth: "{{ openstack_ceilometer_auth }}"
run_once: True
with_items:
- {'interface': 'admin', 'url': '{{ ceilometer_admin_endpoint }}'}
- {'interface': 'internal', 'url': '{{ ceilometer_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ ceilometer_public_endpoint }}'}
- name: Creating the Ceilometer project, user, and role - name: Creating the Ceilometer project, user, and role
kolla_toolbox: kolla_toolbox:
module_name: "kolla_keystone_user" module_name: "kolla_keystone_user"

View File

@ -3,5 +3,17 @@
- include: bootstrap_service.yml - include: bootstrap_service.yml
# TODO(jeffrey4l): ceilometer-api and ceilometer-collector are marked as
# deprecated and will be removed already. Upgrade to Pike should remove
# ceilometer-api and ceilometer-collector container. This task should be
# remove in Q cycle.
- name: Containers are being removed
kolla_docker:
name: "{{ item }}"
action: remove_container
with_items:
- ceilometer_api
- ceilometer_collector
- name: Flush handlers - name: Flush handlers
meta: flush_handlers meta: flush_handlers

View File

@ -9,19 +9,6 @@
"dest": "/etc/ceilometer/ceilometer.conf", "dest": "/etc/ceilometer/ceilometer.conf",
"owner": "ceilometer", "owner": "ceilometer",
"perm": "0600" "perm": "0600"
},
{
"source": "{{ container_config_directory }}/wsgi-ceilometer-api.conf",
"dest": "/etc/{{ apache_dir }}/{{ apache_file }}",
"owner": "ceilometer",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/policy.json",
"dest": "/etc/ceilometer/policy.json",
"owner": "ceilometer",
"perm": "0600",
"optional": true
} }
], ],
"permissions": [ "permissions": [

View File

@ -1,32 +0,0 @@
{
"command": "ceilometer-collector",
"config_files": [
{
"source": "{{ container_config_directory }}/ceilometer.conf",
"dest": "/etc/ceilometer/ceilometer.conf",
"owner": "ceilometer",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/policy.json",
"dest": "/etc/ceilometer/policy.json",
"owner": "ceilometer",
"perm": "0600",
"optional": true
},
{
"source": "{{ container_config_directory }}/panko.conf",
"dest": "/etc/panko/panko.conf",
"owner": "ceilometer",
"perm": "0600",
"optional": true
}
],
"permissions": [
{
"path": "/var/log/kolla/ceilometer",
"owner": "ceilometer:ceilometer",
"recurse": true
}
]
}

View File

@ -5,35 +5,6 @@ log_dir = /var/log/kolla/ceilometer
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if ceilometer_event_type == "mongodb" %}
event_dispatchers = database
{% elif ceilometer_event_type == "gnocchi" %}
event_dispatchers = gnocchi
{% elif ceilometer_event_type == "panko" %}
event_dispatchers = panko
{% endif %}
{% if ceilometer_database_type == 'gnocchi' %}
meter_dispatchers = gnocchi
{% else %}
meter_dispatchers = database
{% endif %}
[api]
port = {{ ceilometer_api_port }}
host = {{ api_interface_address }}
[collector]
[database]
{% if ceilometer_database_type == "mongodb" %}
event_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }}
metering_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }}
{% elif ceilometer_database_type == "mysql" %}
event_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }}
metering_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }}
{% endif %}
[keystone_authtoken] [keystone_authtoken]
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
project_domain_name = {{ default_project_domain_name }} project_domain_name = {{ default_project_domain_name }}
@ -59,9 +30,3 @@ project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }} user_domain_id = {{ default_user_domain_id }}
auth_type = password auth_type = password
interface = internal interface = internal
{% if ceilometer_database_type == 'gnocchi' %}
[dispatcher_gnocchi]
filter_service_activity = False
url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}
{% endif %}

View File

@ -1,5 +1,5 @@
--- ---
- event_type: compute.instance.* - event_type: 'compute.instance.*'
traits: &instance_traits traits: &instance_traits
tenant_id: tenant_id:
fields: payload.tenant_id fields: payload.tenant_id
@ -7,6 +7,8 @@
fields: payload.user_id fields: payload.user_id
instance_id: instance_id:
fields: payload.instance_id fields: payload.instance_id
resource_id:
fields: payload.instance_id
host: host:
fields: publisher_id.`split(., 1, 1)` fields: publisher_id.`split(., 1, 1)`
service: service:
@ -45,6 +47,11 @@
deleted_at: deleted_at:
type: datetime type: datetime
fields: payload.deleted_at fields: payload.deleted_at
- event_type: compute.instance.update
traits:
<<: *instance_traits
old_state:
fields: payload.old_state
- event_type: compute.instance.exists - event_type: compute.instance.exists
traits: traits:
<<: *instance_traits <<: *instance_traits
@ -96,7 +103,7 @@
fields: payload.image_id fields: payload.image_id
host: host:
fields: payload.host fields: payload.host
- event_type: ['image.update', 'image.upload', 'image.delete'] - event_type: ['image.create', 'image.update', 'image.upload', 'image.delete']
traits: &glance_crud traits: &glance_crud
project_id: project_id:
fields: payload.owner fields: payload.owner
@ -127,6 +134,7 @@
destination_ip: destination_ip:
fields: payload.destination_ip fields: payload.destination_ip
bytes_sent: bytes_sent:
type: int
fields: payload.bytes_sent fields: payload.bytes_sent
- event_type: orchestration.stack.* - event_type: orchestration.stack.*
traits: &orchestration_crud traits: &orchestration_crud
@ -252,14 +260,6 @@
fields: payload.target.metadata.object fields: payload.target.metadata.object
observer_id: observer_id:
fields: payload.observer.id fields: payload.observer.id
- event_type: magnetodb.table.*
traits: &kv_store
resource_id:
fields: payload.table_uuid
user_id:
fields: _context_user_id
project_id:
fields: _context_tenant
- event_type: ['network.*', 'subnet.*', 'port.*', 'router.*', 'floatingip.*', 'pool.*', 'vip.*', 'member.*', 'health_monitor.*', 'healthmonitor.*', 'listener.*', 'loadbalancer.*', 'firewall.*', 'firewall_policy.*', 'firewall_rule.*', 'vpnservice.*', 'ipsecpolicy.*', 'ikepolicy.*', 'ipsec_site_connection.*'] - event_type: ['network.*', 'subnet.*', 'port.*', 'router.*', 'floatingip.*', 'pool.*', 'vip.*', 'member.*', 'health_monitor.*', 'healthmonitor.*', 'listener.*', 'loadbalancer.*', 'firewall.*', 'firewall_policy.*', 'firewall_rule.*', 'vpnservice.*', 'ipsecpolicy.*', 'ikepolicy.*', 'ipsec_site_connection.*']
traits: &network_traits traits: &network_traits
user_id: user_id:
@ -551,3 +551,35 @@
fields: payload.info.db.statement fields: payload.info.db.statement
db.params: db.params:
fields: payload.info.db.params fields: payload.info.db.params
- event_type: 'magnum.bay.*'
traits: &magnum_bay_crud
id:
fields: payload.id
typeURI:
fields: payload.typeURI
eventType:
fields: payload.eventType
eventTime:
fields: payload.eventTime
action:
fields: payload.action
outcome:
fields: payload.outcome
initiator_id:
fields: payload.initiator.id
initiator_typeURI:
fields: payload.initiator.typeURI
initiator_name:
fields: payload.initiator.name
initiator_host_agent:
fields: payload.initiator.host.agent
initiator_host_address:
fields: payload.initiator.host.address
target_id:
fields: payload.target.id
target_typeURI:
fields: payload.target.typeURI
observer_id:
fields: payload.observer.id
observer_typeURI:
fields: payload.observer.typeURI

View File

@ -8,6 +8,10 @@ sources:
sinks: sinks:
- name: event_sink - name: event_sink
transformers: transformers:
triggers:
publishers: publishers:
- notifier:// {% if enable_gnocchi | bool %}
- gnocchi://
{% endif %}
{% if enable_panko | bool %}
- panko://
{% endif %}

View File

@ -1,20 +1,17 @@
--- ---
sources: sources:
- name: meter_source - name: meter_source
interval: 600
meters: meters:
- "*" - "*"
sinks: sinks:
- meter_sink - meter_sink
- name: cpu_source - name: cpu_source
interval: 600
meters: meters:
- "cpu" - "cpu"
sinks: sinks:
- cpu_sink - cpu_sink
- cpu_delta_sink - cpu_delta_sink
- name: disk_source - name: disk_source
interval: 600
meters: meters:
- "disk.read.bytes" - "disk.read.bytes"
- "disk.read.requests" - "disk.read.requests"
@ -27,7 +24,6 @@ sources:
sinks: sinks:
- disk_sink - disk_sink
- name: network_source - name: network_source
interval: 600
meters: meters:
- "network.incoming.bytes" - "network.incoming.bytes"
- "network.incoming.packets" - "network.incoming.packets"
@ -39,7 +35,7 @@ sinks:
- name: meter_sink - name: meter_sink
transformers: transformers:
publishers: publishers:
- notifier:// - gnocchi://
- name: cpu_sink - name: cpu_sink
transformers: transformers:
- name: "rate_of_change" - name: "rate_of_change"
@ -50,7 +46,7 @@ sinks:
type: "gauge" type: "gauge"
scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))" scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
publishers: publishers:
- notifier:// - gnocchi://
- name: cpu_delta_sink - name: cpu_delta_sink
transformers: transformers:
- name: "delta" - name: "delta"
@ -59,7 +55,7 @@ sinks:
name: "cpu.delta" name: "cpu.delta"
growth_only: True growth_only: True
publishers: publishers:
- notifier:// - gnocchi://
- name: disk_sink - name: disk_sink
transformers: transformers:
- name: "rate_of_change" - name: "rate_of_change"
@ -74,7 +70,7 @@ sinks:
unit: "\\1/s" unit: "\\1/s"
type: "gauge" type: "gauge"
publishers: publishers:
- notifier:// - gnocchi://
- name: network_sink - name: network_sink
transformers: transformers:
- name: "rate_of_change" - name: "rate_of_change"
@ -89,4 +85,4 @@ sinks:
unit: "\\1/s" unit: "\\1/s"
type: "gauge" type: "gauge"
publishers: publishers:
- notifier:// - gnocchi://

View File

@ -1,24 +0,0 @@
{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
Listen {{ api_interface_address }}:{{ ceilometer_api_port }}
<VirtualHost *:{{ ceilometer_api_port }}>
LogLevel info
ErrorLog /var/log/kolla/ceilometer/ceilometer-api.log
CustomLog /var/log/kolla/ceilometer/ceilometer-api-access.log combined
WSGIScriptReloading On
WSGIDaemonProcess ceilometer-api processes={{ openstack_service_workers }} threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup ceilometer-api
WSGIScriptAlias / {{ python_path }}/ceilometer/api/app.wsgi
<Directory "{{ python_path }}/ceilometer/api">
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>

View File

@ -1,7 +1,7 @@
<match kolla.var.log.kolla.*.*.log> <match kolla.var.log.kolla.*.*.log>
@type rewrite_tag_filter @type rewrite_tag_filter
capitalize_regex_backreference yes capitalize_regex_backreference yes
rewriterule1 programname ^(horizon-access|ceilometer-api-access|keystone-apache-admin-access|keystone-apache-public-access|cinder-api-access)$ apache_access rewriterule1 programname ^(horizon-access|keystone-apache-admin-access|keystone-apache-public-access|cinder-api-access)$ apache_access
rewriterule2 programname ^(aodh_wsgi_access | zun_api_wsgi_access)$ wsgi_access rewriterule2 programname ^(aodh_wsgi_access | zun_api_wsgi_access)$ wsgi_access
rewriterule3 programname ^(nova-api|nova-compute|nova-conductor|nova-consoleauth|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|placement-api-access|privsep-helper).* openstack_python rewriterule3 programname ^(nova-api|nova-compute|nova-conductor|nova-consoleauth|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|placement-api-access|privsep-helper).* openstack_python
rewriterule4 programname ^(sahara-api|sahara-engine).* openstack_python rewriterule4 programname ^(sahara-api|sahara-engine).* openstack_python
@ -11,7 +11,7 @@
rewriterule8 programname ^(heat-engine|heat-api|heat-api-cfn).* openstack_python rewriterule8 programname ^(heat-engine|heat-api|heat-api-cfn).* openstack_python
rewriterule9 programname ^(glance-api|glance-registry).* openstack_python rewriterule9 programname ^(glance-api|glance-registry).* openstack_python
rewriterule10 programname ^(cloudkitty-storage-init|cloudkitty-processor|cloudkitty-dbsync|cloudkitty-api).* openstack_python rewriterule10 programname ^(cloudkitty-storage-init|cloudkitty-processor|cloudkitty-dbsync|cloudkitty-api).* openstack_python
rewriterule11 programname ^(ceilometer-polling|ceilometer-collector|ceilometer-agent-notification|loadwsgi).* openstack_python rewriterule11 programname ^(ceilometer-polling|ceilometer-agent-notification).* openstack_python
rewriterule12 programname ^(barbican-worker|barbican-keystone-listener|barbican-db-manage|barbican-api|app).* openstack_python rewriterule12 programname ^(barbican-worker|barbican-keystone-listener|barbican-db-manage|barbican-api|app).* openstack_python
rewriterule13 programname ^(aodh-notifier|aodh-listener|aodh-evaluator|aodh-dbsync).* openstack_python rewriterule13 programname ^(aodh-notifier|aodh-listener|aodh-evaluator|aodh-dbsync).* openstack_python
rewriterule14 programname ^(cinder-api|cinder-scheduler|cinder-manage|cinder-volume|cinder-backup|privsep-helper).* openstack_python rewriterule14 programname ^(cinder-api|cinder-scheduler|cinder-manage|cinder-volume|cinder-backup|privsep-helper).* openstack_python

View File

@ -116,18 +116,6 @@
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- haproxy_stat.find('barbican_api') == -1 - haproxy_stat.find('barbican_api') == -1
- name: Checking free port for Ceilometer API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ ceilometer_api_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- enable_ceilometer | bool
- inventory_hostname in groups['haproxy']
- haproxy_stat.find('ceilometer_api') == -1
- name: Checking free port for Cinder API HAProxy - name: Checking free port for Cinder API HAProxy
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"

View File

@ -710,22 +710,6 @@ listen barbican_api_external
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if enable_ceilometer | bool %}
listen ceilometer_api
bind {{ kolla_internal_vip_address }}:{{ ceilometer_api_port }}
{% for host in groups['ceilometer-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ceilometer_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% if haproxy_enable_external_vip | bool %}
listen ceilometer_api_external
bind {{ kolla_external_vip_address }}:{{ ceilometer_api_port }} {{ tls_bind_info }}
{% for host in groups['ceilometer-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ceilometer_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
{% endif %}
{% if enable_aodh | bool %} {% if enable_aodh | bool %}
listen aodh_api listen aodh_api
bind {{ kolla_internal_vip_address }}:{{ aodh_api_port }} bind {{ kolla_internal_vip_address }}:{{ aodh_api_port }}

View File

@ -249,15 +249,6 @@ kolla_internal_vip_address: "10.10.10.254"
#glance_backend_ceph: "no" #glance_backend_ceph: "no"
#glance_backend_vmware: "no" #glance_backend_vmware: "no"
#######################
# Ceilometer options
#######################
# Valid options are [ mongodb, mysql, gnocchi ]
#ceilometer_database_type: "mongodb"
# Valid options are [ mongodb, gnocchi, panko ]
#ceilometer_event_type: "mongodb"
####################### #######################
# Barbican options # Barbican options

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
ceilometer-api is marked as deprecated and useless now by
Ib88957001de2a61f9625ca5584a2129216647841, it will not be deployed.
ceilometer-notification is marked as deprecated and useless now by
I25a6e0b9221844adb4412f1829d9e290b6e198a3, it will not be deployed.
ceilometer_database_type and ceilometer_event_type variable is ignored.