Files
cookbook-openstack-telemetry/recipes/alarm-evaluator.rb
Jan Klare c309a0ae91 Changed the action of all package resources from default to :upgrade
Since no version is specified for any package and usually you do not
want to stick with one unspecific version you get during your first run
the action should be :upgrade.

Change-Id: Idc662737f1b03049de5555c6e1e54fc77532972f
Implements: blueprint allow-package-updates
2014-07-07 11:38:09 +02:00

38 lines
1.1 KiB
Ruby

# 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 do
options platform['package_overrides']
action :upgrade
end
end
service 'ceilometer-agent-evaluator' do
service_name platform['alarm_evaluator_service']
supports status: true, restart: true
subscribes :restart, "template[#{node['openstack']['telemetry']['conf']}]"
action [:enable, :start]
end