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}"
53 class {'::ceilometer::db':
54 database_connection => $database_connection,
58 include ::ceilometer::db::sync
61 include ::ceilometer::config
63 class { '::ceilometer::api':
65 service_name => 'httpd',
66 keystone_password => hiera('ceilometer::keystone::auth::password'),
67 identity_uri => hiera('ceilometer::keystone::authtoken::auth_url'),
68 auth_uri => hiera('ceilometer::keystone::authtoken::auth_uri'),
69 keystone_tenant => hiera('ceilometer::keystone::authtoken::project_name'),
73 service_enable => false,
74 service_manage => true,
75 service_restart => '/bin/true',
76 purge_configs => false,
77 purge_vhost_dir => false,
80 # To ensure existing ports are not overridden
81 class { '::aodh::wsgi::apache':
82 servername => $::hostname,
85 class { '::gnocchi::wsgi::apache':
86 servername => $::hostname,
90 class { '::keystone::wsgi::apache':
91 servername => $::hostname,
94 class { '::ceilometer::wsgi::apache':
95 servername => $::hostname,