From 8c52d2b68d656aef61baf8d092e40024f397c5ed Mon Sep 17 00:00:00 2001 From: wutianwei Date: Fri, 19 Jan 2018 17:07:41 +0800 Subject: Change gnocchi storage and increase the capacity of ceph 1. Change the gnocchi storage to ceph. 2. Change the size of loopback to 500GB 3. Change the ceilometer polling yaml 4. Run ceilometer-upgrade command and restart ceilometer service Change-Id: I8948c7b7e340c11e5d05c06a7d54c0e1b807620c Signed-off-by: wutianwei --- .../roles/post-osa/tasks/ceilometer-upgrade.yml | 28 ++++++++++++++++++++++ .../adapters/ansible/roles/post-osa/tasks/main.yml | 4 ++++ 2 files changed, 32 insertions(+) create mode 100755 deploy/adapters/ansible/roles/post-osa/tasks/ceilometer-upgrade.yml (limited to 'deploy/adapters/ansible/roles/post-osa/tasks') diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/ceilometer-upgrade.yml b/deploy/adapters/ansible/roles/post-osa/tasks/ceilometer-upgrade.yml new file mode 100755 index 00000000..3d991b74 --- /dev/null +++ b/deploy/adapters/ansible/roles/post-osa/tasks/ceilometer-upgrade.yml @@ -0,0 +1,28 @@ +############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- name: check for gnocchi resource file + stat: + path: "/etc/ceilometer/gnocchi_resources.yaml" + register: gnocchi_resource_file + +- name: get the path of ceilometer-upgrade + shell: "find / -name ceilometer-upgrade 2>/dev/null || true" + register: ceilometer_upgrade_path + +- name: Initialize Gnocchi database by creating ceilometer resources + command: "{{ ceilometer_upgrade_path.stdout }} --skip-metering-database" + become: "yes" + when: gnocchi_resource_file.stat.exists + register: _upgrade + until: _upgrade | success + retries: 10 + delay: 2 + notify: + - Restart ceilometer services diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml index bd83b50f..205f3392 100644 --- a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml @@ -23,3 +23,7 @@ when: - ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7' - inventory_hostname in groups['compute'] + +- include: ceilometer-upgrade.yml + when: + - inventory_hostname in groups['ceilometer_all'] -- cgit 1.2.3-korg