Przeglądaj źródła

Add NoSQL support for metering.

When NoSQL is used, ceilometer db sync is not required.

Change-Id: I568baf73d95311d895cbd59119688495a0b879dc
Implements: blueprint metering-nosql-support
tags/eol-havana
ericzhou 5 lat temu
rodzic
commit
dc647a3283
5 zmienionych plików z 17 dodań i 5 usunięć
  1. 4
    0
      CHANGELOG.md
  2. 1
    1
      README.md
  3. 2
    2
      metadata.rb
  4. 4
    2
      recipes/collector.rb
  5. 6
    0
      spec/collector_spec.rb

+ 4
- 0
CHANGELOG.md Wyświetl plik

@@ -2,6 +2,10 @@ openstack-metering Cookbook CHANGELOG
==============================
This file is used to list changes made in each version of the openstack-metering cookbook.

## 8.2.0
### Blueprint
* Add NoSQL support for metering.

## 8.1.0
* Add client recipe


+ 1
- 1
README.md Wyświetl plik

@@ -34,7 +34,7 @@ client

collector
----
- Installs nova network service.
- Installs collector package and service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.

common
----

+ 2
- 2
metadata.rb Wyświetl plik

@@ -4,13 +4,13 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
license 'Apache 2.0'
description 'The OpenStack Metering service Ceilometer.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '8.1.0'
version '8.2.0'

recipe 'openstack-metering::agent-central', 'Installs agent central service.'
recipe 'openstack-metering::agent-compute', 'Installs agent compute service.'
recipe 'openstack-metering::api', 'Installs API service.'
recipe 'openstack-metering::client', 'Installs client.'
recipe 'openstack-metering::collector', 'Installs nova network service.'
recipe 'openstack-metering::collector', 'Installs collector service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.'
recipe 'openstack-metering::common', 'Common metering configuration.'
recipe 'openstack-metering::identity_registration', 'Registers the endpoints with Keystone'


+ 4
- 2
recipes/collector.rb Wyświetl plik

@@ -24,8 +24,10 @@ include_recipe 'openstack-metering::common'

conf_switch = "--config-file #{node["openstack"]["metering"]["conf"]}"

execute 'database migration' do
command "ceilometer-dbsync #{conf_switch}"
unless node['openstack']['db']['metering']['nosql']['used']
execute 'database migration' do
command "ceilometer-dbsync #{conf_switch}"
end
end

platform = node['openstack']['metering']['platform']

+ 6
- 0
spec/collector_spec.rb Wyświetl plik

@@ -16,6 +16,12 @@ describe 'openstack-metering::collector' do
expect(@chef_run).to run_execute command
end

it 'does not execute ceilometer dbsync when nosql database is used' do
@chef_run.node.set['openstack']['db']['metering']['nosql']['used'] = true
resource = 'execute[database migration]'
expect(@chef_run).not_to run_execute resource
end

it 'installs python-mysqldb', A: true do
expect(@chef_run).to install_package 'python-mysqldb'
end

Ładowanie…
Anuluj
Zapisz