Add vmware support to ceilometer

Change-Id: I701a26ade57916c9e2ca6899228d4660230b1e0b
Partially-implements: blueprint kolla-ansible-support-vsphere
Depends-On:I0f37e49e09c4f14a64797506007bb55a6f534f0f
This commit is contained in:
guochao 2017-08-16 09:07:13 +08:00
parent 3393054f9b
commit 7b385f9857
4 changed files with 38 additions and 1 deletions

View File

@ -76,4 +76,5 @@
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or policy_json.changed | bool
or vcenter_ca_file.changed | bool
or ceilometer_compute_container.changed | bool

View File

@ -102,6 +102,21 @@
notify:
- "Restart {{ item.key }} container"
- name: Copying VMware vCenter CA file
vars:
service: "{{ ceilometer_services['ceilometer-compute'] }}"
copy:
src: "{{ node_custom_config }}/vmware_ca"
dest: "{{ node_config_directory }}/ceilometer-compute/vmware_ca"
register: vcenter_ca_file
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart ceilometer-compute container
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/ceilometer/policy.json"
run_once: True

View File

@ -19,7 +19,13 @@
"dest": "/etc/ceilometer/pipeline.yaml",
"owner": "ceilometer",
"perm": "0600"
}
}{% if nova_compute_virt_type == "vmware" and not vmware_vcenter_insecure | bool %},
{
"source": "{{ container_config_directory }}/vmware_ca",
"dest": "/etc/ceilometer/vmware_ca",
"owner": "ceilometer",
"perm": "0600"
}{% endif %}
],
"permissions": [
{

View File

@ -9,6 +9,10 @@ transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}
evaluation_interval = 300
{% endif %}
{% if nova_compute_virt_type == 'vmware' %}
hypervisor_inspector = vsphere
{% endif %}
[keystone_authtoken]
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
project_domain_name = {{ default_project_domain_name }}
@ -34,3 +38,14 @@ project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }}
auth_type = password
interface = internal
{% if nova_compute_virt_type == 'vmware' %}
[vmware]
host_ip = {{ vmware_vcenter_host_ip }}
host_username = {{ vmware_vcenter_host_username }}
host_password = {{ vmware_vcenter_host_password }}
insecure = {{ vmware_vcenter_insecure }}
{% if not vmware_vcenter_insecure | bool %}
ca_file = /etc/ceilometer/vmware_ca
{% endif %}
{% endif %}