1 # Copyright 2015 Red Hat, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
16 # This puppet manifest is to be used only during a Mitaka->Newton upgrade
17 # It configures ceilometer to be run under httpd but it makes sure to not
18 # restart any services. This snippet needs to be called before init as a
19 # pre upgrade migration.
22 tag == 'ceilometer-service'
25 restart => '/bin/true',
30 if $::hostname == downcase(hiera('bootstrap_nodeid')) {
31 $pacemaker_master = true
34 $pacemaker_master = false
38 include ::tripleo::packages
41 if str2bool(hiera('mongodb::server::ipv6', false)) {
42 $mongo_node_ips_with_port_prefixed = prefix(hiera('mongodb_node_ips'), '[')
43 $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
45 $mongo_node_ips_with_port = suffix(hiera('mongodb_node_ips'), ':27017')
47 $mongodb_replset = hiera('mongodb::server::replset')
48 $mongo_node_string = join($mongo_node_ips_with_port, ',')
49 $database_connection = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
51 $rabbit_hosts = hiera('rabbitmq_node_ips', undef)
52 $rabbit_port = hiera('ceilometer::rabbit_port', 5672)
53 $rabbit_endpoints = suffix(any2array(normalize_ip_for_uri($rabbit_hosts)), ":${rabbit_port}")
55 class { '::ceilometer' :
56 rabbit_hosts => $rabbit_endpoints,
59 class {'::ceilometer::db':
60 database_connection => $database_connection,
64 include ::ceilometer::db::sync
67 include ::ceilometer::config
69 class { '::ceilometer::api':
71 service_name => 'httpd',
72 keystone_password => hiera('ceilometer::keystone::auth::password'),
73 identity_uri => hiera('ceilometer::keystone::authtoken::auth_url'),
74 auth_uri => hiera('ceilometer::keystone::authtoken::auth_uri'),
75 keystone_tenant => hiera('ceilometer::keystone::authtoken::project_name'),
79 service_enable => false,
80 service_manage => true,
81 service_restart => '/bin/true',
82 purge_configs => false,
83 purge_vhost_dir => false,
86 # To ensure existing ports are not overridden
87 class { '::aodh::wsgi::apache':
88 servername => $::hostname,
91 class { '::gnocchi::wsgi::apache':
92 servername => $::hostname,
96 class { '::keystone::wsgi::apache':
97 servername => $::hostname,
100 class { '::ceilometer::wsgi::apache':
101 servername => $::hostname,