diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/ceilometer_compute')
7 files changed, 64 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml b/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml new file mode 100644 index 00000000..ee30a5f6 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: restart ceilometer relation service + service: name={{ item }} state=restarted enabled=yes + with_items: ceilometer_services diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml new file mode 100644 index 00000000..4fddd1e6 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- include_vars: "{{ ansible_os_family }}.yml" + +- name: install ceilometer packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + with_items: "{{ ceilometer_packages }}| union(packages_noarch)" + +- name: copy ceilometer configs + template: src={{ item.src}} dest=/opt/os_templates + with_items: "{{ ceilometer_configs_templates }}" + +- name: update ceilometer configs + shell: crudini --merge {{ item.1 }} < /opt/os_templates/{{ item.0.src }} + with_subelements: + - ceilometer_configs_templates + - dest + notify: restart ceilometer relation service diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2 b/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2 new file mode 100644 index 00000000..d3ee52ab --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2 @@ -0,0 +1,17 @@ +[DEFAULT] +verbose = True +rpc_backend = rabbit +rabbit_host = {{ internal_vip.ip }} +rabbit_password = {{ RABBIT_PASS }} + +[publisher] +metering_secret = {{ metering_secret }} + +[service_credentials] +os_auth_url = http://{{ internal_vip.ip }}:5000/v2.0 +os_username = ceilometer +os_tenant_name = service +os_password = {{ CEILOMETER_PASS }} +os_endpoint_type = internalURL +os_region_name = regionOne + diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/templates/nova.j2 b/deploy/adapters/ansible/roles/ceilometer_compute/templates/nova.j2 new file mode 100644 index 00000000..e7532c85 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/templates/nova.j2 @@ -0,0 +1,5 @@ +[DEFAULT] +instance_usage_audit = True +instance_usage_audit_period = hour +notify_on_state_change = vm_and_task_state +notification_driver = messagingv2 diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/vars/Debian.yml b/deploy/adapters/ansible/roles/ceilometer_compute/vars/Debian.yml new file mode 100644 index 00000000..e767016c --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/vars/Debian.yml @@ -0,0 +1,15 @@ +--- +ceilometer_packages: + - ceilometer-agent-compute + +ceilometer_services: + - ceilometer-agent-compute + - nova-compute + +ceilometer_configs_templates: + - src: ceilometer.j2 + dest: + - /etc/ceilometer/ceilometer.conf + - src: nova.j2 + dest: + - /etc/nova/nova.conf diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml b/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml new file mode 100644 index 00000000..041cf477 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml @@ -0,0 +1,3 @@ +--- +services: [] +packages: [] diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/vars/main.yml b/deploy/adapters/ansible/roles/ceilometer_compute/vars/main.yml new file mode 100644 index 00000000..bb87da65 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceilometer_compute/vars/main.yml @@ -0,0 +1,3 @@ +--- +packages_noarch: [] +metering_secret: 1c5df72079b31fb47747 |