This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The telemetry cookbook currently lacks recipes for the alarm and the agent notification services. This patch adds them as well as their corresponding specs and documentation. Implements blueprint alarm-sevices Change-Id: I2896db6e95f52f4488ec8bb9bcb88c697cb712b6
- Loading branch information
Luis A. Garcia
committed
Apr 3, 2014
1 parent
8417ede
commit fc302f9
Showing
16 changed files
with
328 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# encoding: UTF-8 | ||
# | ||
# Cookbook Name:: openstack-telemetry | ||
# Recipe:: agent-notification | ||
# | ||
# Copyright 2014, IBM Corp. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
include_recipe 'openstack-telemetry::common' | ||
|
||
platform = node['openstack']['telemetry']['platform'] | ||
platform['agent_notification_packages'].each do |pkg| | ||
package pkg | ||
end | ||
|
||
service platform['agent_notification_service'] do | ||
supports status: true, restart: true | ||
action :start | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# encoding: UTF-8 | ||
# | ||
# Cookbook Name:: openstack-telemetry | ||
# Recipe:: alarm-evaluator | ||
# | ||
# Copyright 2014, IBM Corp. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
include_recipe 'openstack-telemetry::common' | ||
|
||
platform = node['openstack']['telemetry']['platform'] | ||
platform['alarm_evaluator_packages'].each do |pkg| | ||
package pkg | ||
end | ||
|
||
service platform['alarm_evaluator_service'] do | ||
supports status: true, restart: true | ||
action :start | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# encoding: UTF-8 | ||
# | ||
# Cookbook Name:: openstack-telemetry | ||
# Recipe:: alarm-notifier | ||
# | ||
# Copyright 2014, IBM Corp. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
include_recipe 'openstack-telemetry::common' | ||
|
||
platform = node['openstack']['telemetry']['platform'] | ||
platform['alarm_notifier_packages'].each do |pkg| | ||
package pkg | ||
end | ||
|
||
service platform['alarm_notifier_service'] do | ||
supports status: true, restart: true | ||
action :start | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::agent-notification' do | ||
describe 'rhel' do | ||
let(:runner) { ChefSpec::Runner.new(REDHAT_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the agent-notification package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-collector' | ||
end | ||
|
||
it 'starts the agent-notification service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-notification' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::agent-notification' do | ||
describe 'suse' do | ||
let(:runner) { ChefSpec::Runner.new(SUSE_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
|
||
it 'installs the agent-notification package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-agent-notification' | ||
end | ||
|
||
it 'starts the agent-notification service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-agent-notification' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::agent-notification' do | ||
describe 'ubuntu' do | ||
let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the agent-notification package' do | ||
expect(chef_run).to install_package 'ceilometer-agent-notification' | ||
end | ||
|
||
it 'starts ceilometer-agent-notification service' do | ||
expect(chef_run).to start_service('ceilometer-agent-notification') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-evaluator' do | ||
describe 'rhel' do | ||
let(:runner) { ChefSpec::Runner.new(REDHAT_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the alarm-evaluator package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-alarm' | ||
end | ||
|
||
it 'starts the alarm-evaluator service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-alarm-evaluator' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-evaluator' do | ||
describe 'suse' do | ||
let(:runner) { ChefSpec::Runner.new(SUSE_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
|
||
it 'installs the alarm-evaluator package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-alarm-evaluator' | ||
end | ||
|
||
it 'starts the alarm-evaluator service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-alarm-evaluator' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-evaluator' do | ||
describe 'ubuntu' do | ||
let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the alarm-evaluator package' do | ||
expect(chef_run).to install_package 'ceilometer-alarm-evaluator' | ||
end | ||
|
||
it 'starts alarm-evaluator service' do | ||
expect(chef_run).to start_service('ceilometer-alarm-evaluator') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-notifier' do | ||
describe 'rhel' do | ||
let(:runner) { ChefSpec::Runner.new(REDHAT_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the alarm-notifier package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-alarm' | ||
end | ||
|
||
it 'starts the alarm-notifier service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-alarm-notifier' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-notifier' do | ||
describe 'suse' do | ||
let(:runner) { ChefSpec::Runner.new(SUSE_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
|
||
it 'installs the alarm-notifier package' do | ||
expect(chef_run).to install_package 'openstack-ceilometer-alarm-notifier' | ||
end | ||
|
||
it 'starts the alarm-notifier service' do | ||
expect(chef_run).to start_service 'openstack-ceilometer-alarm-notifier' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# encoding: UTF-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'openstack-telemetry::alarm-notifier' do | ||
describe 'ubuntu' do | ||
let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) } | ||
let(:node) { runner.node } | ||
let(:chef_run) { runner.converge(described_recipe) } | ||
|
||
include_context 'telemetry-stubs' | ||
include_examples 'expect-runs-common-recipe' | ||
|
||
it 'installs the alarm-notifier package' do | ||
expect(chef_run).to install_package 'ceilometer-alarm-notifier' | ||
end | ||
|
||
it 'starts alarm-notifier service' do | ||
expect(chef_run).to start_service('ceilometer-alarm-notifier') | ||
end | ||
end | ||
end |