Add ceilometer_ipmi container into ceilometer role

refer to [0]

[0]: https://docs.openstack.org/ceilometer/latest/install/install-compute-rdo.html
Co-Authored-By: zhulingjie <easyzlj@gmail.com>

Change-Id: I4cda336dedb3d807b80d13bcc219268a8d667b4d
This commit is contained in:
caoyuan 2018-04-29 13:15:02 +08:00 committed by cao.yuan
parent ce08b31f5e
commit 16900c2e37
11 changed files with 94 additions and 0 deletions

View File

@ -506,6 +506,7 @@ enable_barbican: "no"
enable_blazar: "no"
enable_cadf_notifications: "no"
enable_ceilometer: "no"
enable_ceilometer_ipmi: "no"
enable_central_logging: "no"
enable_ceph: "no"
enable_ceph_mds: "no"

View File

@ -580,6 +580,9 @@ ceilometer
[ceilometer-compute:children]
compute
[ceilometer-ipmi:children]
compute
# Congress
[congress-api:children]
congress

View File

@ -562,6 +562,9 @@ ceilometer
[ceilometer-compute:children]
compute
[ceilometer-ipmi:children]
compute
# Aodh
[aodh-api:children]
aodh

View File

@ -40,6 +40,18 @@ ceilometer_services:
- "nova_libvirt:/var/lib/libvirt"
- "{{ kolla_dev_repos_directory ~ '/ceilometer/ceilometer:/var/lib/kolla/venv/lib/python2.7/site-packages/ceilometer' if ceilometer_dev_mode | bool else '' }}"
dimensions: "{{ ceilometer_compute_dimensions }}"
ceilometer-ipmi:
container_name: ceilometer_ipmi
group: ceilometer-ipmi
enabled: "{{ enable_ceilometer_ipmi }}"
image: "{{ ceilometer_ipmi_image_full }}"
volumes:
- "{{ node_config_directory }}/ceilometer-ipmi/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "ceilometer:/var/lib/ceilometer/"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/ceilometer/ceilometer:/var/lib/kolla/venv/lib/python2.7/site-packages/ceilometer' if ceilometer_dev_mode | bool else '' }}"
dimensions: "{{ ceilometer_ipmi_dimensions }}"
####################
@ -60,9 +72,15 @@ ceilometer_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }
ceilometer_compute_tag: "{{ ceilometer_tag }}"
ceilometer_compute_image_full: "{{ ceilometer_compute_image }}:{{ ceilometer_compute_tag }}"
ceilometer_ipmi_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-ipmi"
ceilometer_ipmi_tag: "{{ ceilometer_tag }}"
ceilometer_ipmi_image_full: "{{ ceilometer_ipmi_image }}:{{ ceilometer_ipmi_tag }}"
ceilometer_notification_dimensions: "{{ default_container_dimensions }}"
ceilometer_central_dimensions: "{{ default_container_dimensions }}"
ceilometer_compute_dimensions: "{{ default_container_dimensions }}"
ceilometer_ipmi_dimensions: "{{ default_container_dimensions }}"
####################
# OpenStack

View File

@ -87,3 +87,29 @@
or policy_overwriting.changed | bool
or vcenter_ca_file.changed | bool
or ceilometer_compute_container.changed | bool
- name: Restart ceilometer-ipmi container
vars:
service_name: "ceilometer-ipmi"
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 }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_ipmi_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 }}"
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or policy_overwriting.changed | bool
or ceilometer_ipmi_container.changed | bool

View File

@ -70,6 +70,7 @@
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- name: Copying over ceilometer.conf
vars:
@ -93,6 +94,7 @@
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- name: Copying over event yaml for notification service
vars:
@ -186,6 +188,7 @@
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
# check whether the containers parameter is changed. If yes, trigger the handler.
- name: Check ceilometer containers
@ -208,3 +211,4 @@
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container

View File

@ -0,0 +1,30 @@
{
"command": "ceilometer-polling --polling-namespaces ipmi",
"config_files": [
{
"source": "{{ container_config_directory }}/ceilometer.conf",
"dest": "/etc/ceilometer/ceilometer.conf",
"owner": "ceilometer",
"perm": "0600"
}{% if ceilometer_polling_file_path is defined %},
{
"source": "{{ container_config_directory }}/polling.yaml",
"dest": "/etc/ceilometer/polling.yaml",
"owner": "ceilometer",
"perm": "0600"
}{% endif %}{% if ceilometer_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ ceilometer_policy_file }}",
"dest": "/etc/ceilometer/{{ ceilometer_policy_file }}",
"owner": "ceilometer",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/log/kolla/ceilometer",
"owner": "ceilometer:ceilometer",
"recurse": true
}
]
}

View File

@ -913,6 +913,7 @@
- ceilometer-central
- ceilometer-notification
- ceilometer-compute
- ceilometer-ipmi
- '&enable_ceilometer_True'
serial: '{{ kolla_serial|default("0") }}'
roles:

View File

@ -189,6 +189,7 @@ kolla_internal_vip_address: "10.10.10.254"
#enable_barbican: "no"
#enable_blazar: "no"
#enable_ceilometer: "no"
#enable_ceilometer_ipmi: "no"
#enable_central_logging: "no"
#enable_ceph: "no"
#enable_ceph_mds: "no"

View File

@ -0,0 +1,4 @@
---
features:
- |
Add ceilometer_ipmi into ceilometer role.

View File

@ -523,6 +523,9 @@ ceilometer
[ceilometer-compute:children]
compute
[ceilometer-ipmi:children]
compute
# Congress
[congress-api:children]
congress