1 # Copyright 2014 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 include ::tripleo::packages
17 include ::tripleo::firewall
19 $enable_load_balancer = hiera('enable_load_balancer', true)
21 if hiera('step') >= 2 {
22 if str2bool(hiera('enable_galera', true)) {
23 $mysql_config_file = '/etc/my.cnf.d/galera.cnf'
25 $mysql_config_file = '/etc/my.cnf.d/server.cnf'
28 # FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we
29 # set bind-address to a hostname instead of an ip address; to move Mysql
30 # from internal_api on another network we'll have to customize both
31 # MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap
32 class { '::mysql::server':
33 config_file => $mysql_config_file,
36 'bind-address' => $::hostname,
37 'max_connections' => hiera('mysql_max_connections'),
38 'open_files_limit' => '-1',
41 remove_default_accounts => true,
44 # FIXME: this should only occur on the bootstrap host (ditto for db syncs)
45 # Create all the database schemas
46 if downcase(hiera('gnocchi_indexer_backend')) == 'mysql' {
47 include ::gnocchi::db::mysql
49 include ::aodh::db::mysql
53 if hiera('step') >= 4 {
55 $nova_ipv6 = hiera('nova::use_ipv6', false)
57 $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
59 $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
63 memcached_servers => $memcached_servers
65 include ::nova::config
69 database_connection => hiera('aodh_mysql_conn_string'),
71 include ::aodh::db::sync
74 include ::aodh::wsgi::apache
75 include ::aodh::evaluator
76 include ::aodh::notifier
77 include ::aodh::listener
78 include ::aodh::client
81 include ::apache::mod::remoteip
82 if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
83 $_profile_support = 'cisco'
85 $_profile_support = 'None'
87 $neutron_options = merge({'profile_support' => $_profile_support },hiera('horizon::neutron_options',undef))
89 $memcached_ipv6 = hiera('memcached_ipv6', false)
91 $horizon_memcached_servers = hiera('memcache_node_ips_v6', '[::1]')
93 $horizon_memcached_servers = hiera('memcache_node_ips', '127.0.0.1')
97 cache_server_ip => $horizon_memcached_servers,
98 neutron_options => $neutron_options,
102 $gnocchi_database_connection = hiera('gnocchi_mysql_conn_string')
104 database_connection => $gnocchi_database_connection,
106 include ::gnocchi::api
107 include ::gnocchi::wsgi::apache
108 include ::gnocchi::client
109 include ::gnocchi::db::sync
110 include ::gnocchi::storage
111 include ::gnocchi::metricd
112 include ::gnocchi::statsd
113 $gnocchi_backend = downcase(hiera('gnocchi_backend', 'swift'))
114 case $gnocchi_backend {
115 'swift': { include ::gnocchi::storage::swift }
116 'file': { include ::gnocchi::storage::file }
117 'rbd': { include ::gnocchi::storage::ceph }
118 default: { fail('Unrecognized gnocchi_backend parameter.') }
121 hiera_include('controller_classes')
125 if hiera('step') >= 5 {
126 $nova_enable_db_purge = hiera('nova_enable_db_purge', true)
128 if $nova_enable_db_purge {
129 include ::nova::cron::archive_deleted_rows
133 $package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')])
134 package_manifest{$package_manifest_name: ensure => present}