Merge "Pass enabled and manage_service to Neutron/L3 when Pacemaker"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller.pp
1 # Copyright 2014 Red Hat, Inc.
2 # All Rights Reserved.
3 #
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
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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
14 # under the License.
15
16 include ::tripleo::packages
17 include ::tripleo::firewall
18
19 $enable_load_balancer = hiera('enable_load_balancer', true)
20
21 if hiera('step') >= 1 {
22
23   create_resources(kmod::load, hiera('kernel_modules'), {})
24   create_resources(sysctl::value, hiera('sysctl_settings'), {})
25   Exec <| tag == 'kmod::load' |>  -> Sysctl <| |>
26
27 }
28
29 if hiera('step') >= 2 {
30
31   if count(hiera('ntp::servers')) > 0 {
32     include ::ntp
33   }
34
35   include ::timezone
36
37   # MongoDB
38   if downcase(hiera('ceilometer_backend')) == 'mongodb' {
39     include ::mongodb::globals
40     include ::mongodb::client
41     include ::mongodb::server
42     # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port and
43     # without the brackets as 'members' argument for the 'mongodb_replset'
44     # resource.
45     if str2bool(hiera('mongodb::server::ipv6', false)) {
46       $mongo_node_ips_with_port_prefixed = prefix(hiera('mongo_node_ips'), '[')
47       $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
48       $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
49     } else {
50       $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017')
51       $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
52     }
53     $mongo_node_string = join($mongo_node_ips_with_port, ',')
54
55     $mongodb_replset = hiera('mongodb::server::replset')
56     $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
57     if downcase(hiera('bootstrap_nodeid')) == $::hostname {
58       mongodb_replset { $mongodb_replset :
59         members => $mongo_node_ips_with_port_nobr,
60       }
61     }
62   }
63
64   # Redis
65   $redis_node_ips = hiera('redis_node_ips')
66   $redis_master_hostname = downcase(hiera('bootstrap_nodeid'))
67
68   if $redis_master_hostname == $::hostname {
69     $slaveof = undef
70   } else {
71     $slaveof = "${redis_master_hostname} 6379"
72   }
73   class {'::redis' :
74     slaveof => $slaveof,
75   }
76
77   if count($redis_node_ips) > 1 {
78     Class['::tripleo::redis_notification'] -> Service['redis-sentinel']
79     include ::redis::sentinel
80     include ::tripleo::redis_notification
81   }
82
83   if str2bool(hiera('enable_galera', true)) {
84     $mysql_config_file = '/etc/my.cnf.d/galera.cnf'
85   } else {
86     $mysql_config_file = '/etc/my.cnf.d/server.cnf'
87   }
88   # TODO Galara
89   # FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we
90   # set bind-address to a hostname instead of an ip address; to move Mysql
91   # from internal_api on another network we'll have to customize both
92   # MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap
93   class { '::mysql::server':
94     config_file             => $mysql_config_file,
95     override_options        => {
96       'mysqld' => {
97         'bind-address'     => $::hostname,
98         'max_connections'  => hiera('mysql_max_connections'),
99         'open_files_limit' => '-1',
100       },
101     },
102     remove_default_accounts => true,
103   }
104
105   # FIXME: this should only occur on the bootstrap host (ditto for db syncs)
106   # Create all the database schemas
107   include ::nova::db::mysql
108   include ::nova::db::mysql_api
109   include ::neutron::db::mysql
110   include ::cinder::db::mysql
111   include ::sahara::db::mysql
112   if downcase(hiera('gnocchi_indexer_backend')) == 'mysql' {
113     include ::gnocchi::db::mysql
114   }
115   if downcase(hiera('ceilometer_backend')) == 'mysql' {
116     include ::ceilometer::db::mysql
117     include ::aodh::db::mysql
118   }
119
120   # pre-install swift here so we can build rings
121   include ::swift
122
123   $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
124
125   if $enable_ceph {
126     $mon_initial_members = downcase(hiera('ceph_mon_initial_members'))
127     if str2bool(hiera('ceph_ipv6', false)) {
128       $mon_host = hiera('ceph_mon_host_v6')
129     } else {
130       $mon_host = hiera('ceph_mon_host')
131     }
132     class { '::ceph::profile::params':
133       mon_initial_members => $mon_initial_members,
134       mon_host            => $mon_host,
135     }
136     include ::ceph::conf
137     include ::ceph::profile::mon
138   }
139
140   if str2bool(hiera('enable_ceph_storage', false)) {
141     if str2bool(hiera('ceph_osd_selinux_permissive', true)) {
142       exec { 'set selinux to permissive on boot':
143         command => "sed -ie 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config",
144         onlyif  => "test -f /etc/selinux/config && ! grep '^SELINUX=permissive' /etc/selinux/config",
145         path    => ['/usr/bin', '/usr/sbin'],
146       }
147
148       exec { 'set selinux to permissive':
149         command => 'setenforce 0',
150         onlyif  => "which setenforce && getenforce | grep -i 'enforcing'",
151         path    => ['/usr/bin', '/usr/sbin'],
152       } -> Class['ceph::profile::osd']
153     }
154
155     include ::ceph::conf
156     include ::ceph::profile::osd
157   }
158
159   if str2bool(hiera('enable_external_ceph', false)) {
160     if str2bool(hiera('ceph_ipv6', false)) {
161       $mon_host = hiera('ceph_mon_host_v6')
162     } else {
163       $mon_host = hiera('ceph_mon_host')
164     }
165     class { '::ceph::profile::params':
166       mon_host            => $mon_host,
167     }
168     include ::ceph::conf
169     include ::ceph::profile::client
170   }
171
172 } #END STEP 2
173
174 if hiera('step') >= 4 {
175
176   $nova_ipv6 = hiera('nova::use_ipv6', false)
177   if $nova_ipv6 {
178     $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
179   } else {
180     $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
181   }
182
183   class { '::nova' :
184     memcached_servers => $memcached_servers
185   }
186   include ::nova::config
187   include ::nova::api
188   include ::nova::cert
189   include ::nova::conductor
190   include ::nova::consoleauth
191   include ::nova::network::neutron
192   include ::nova::vncproxy
193   include ::nova::scheduler
194   include ::nova::scheduler::filter
195
196   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
197
198     # TODO(devvesa) provide non-controller ips for these services
199     $zookeeper_node_ips = hiera('neutron_api_node_ips')
200     $cassandra_node_ips = hiera('neutron_api_node_ips')
201
202     # Run zookeeper in the controller if configured
203     if hiera('enable_zookeeper_on_controller') {
204       class {'::tripleo::cluster::zookeeper':
205         zookeeper_server_ips => $zookeeper_node_ips,
206         # TODO: create a 'bind' hiera key for zookeeper
207         zookeeper_client_ip  => hiera('neutron::bind_host'),
208         zookeeper_hostnames  => hiera('controller_node_names')
209       }
210     }
211
212     # Run cassandra in the controller if configured
213     if hiera('enable_cassandra_on_controller') {
214       class {'::tripleo::cluster::cassandra':
215         cassandra_servers => $cassandra_node_ips,
216         # TODO: create a 'bind' hiera key for cassandra
217         cassandra_ip      => hiera('neutron::bind_host'),
218       }
219     }
220
221     class {'::tripleo::network::midonet::agent':
222       zookeeper_servers => $zookeeper_node_ips,
223       cassandra_seeds   => $cassandra_node_ips
224     }
225
226     class {'::tripleo::network::midonet::api':
227       zookeeper_servers    => $zookeeper_node_ips,
228       vip                  => hiera('tripleo::loadbalancer::public_virtual_ip'),
229       keystone_ip          => hiera('tripleo::loadbalancer::public_virtual_ip'),
230       keystone_admin_token => hiera('keystone::admin_token'),
231       # TODO: create a 'bind' hiera key for api
232       bind_address         => hiera('neutron::bind_host'),
233       admin_password       => hiera('admin_password')
234     }
235
236     # TODO: find a way to get an empty list from hiera
237     class {'::neutron':
238       service_plugins => []
239     }
240
241   }
242   else {
243
244     # ML2 plugin
245     include ::neutron
246   }
247
248   include ::neutron::config
249   include ::neutron::server
250   include ::neutron::server::notifications
251
252   # If the value of core plugin is set to 'nuage' or'opencontrail' or 'plumgrid',
253   # include nuage or opencontrail or plumgrid core plugins
254   # else use the default value of 'ml2'
255   if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
256     include ::neutron::plugins::nuage
257   } elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' {
258     include ::neutron::plugins::opencontrail
259   }
260   elsif hiera('neutron::core_plugin') == 'networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2' {
261     class { '::neutron::plugins::plumgrid' :
262       connection                   => hiera('neutron::server::database_connection'),
263       controller_priv_host         => hiera('keystone_admin_api_vip'),
264       admin_password               => hiera('admin_password'),
265       metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
266     }
267   } else {
268
269     # If the value of core plugin is set to 'midonet',
270     # skip all the ML2 configuration
271     if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
272
273       class {'::neutron::plugins::midonet':
274         midonet_api_ip    => hiera('tripleo::loadbalancer::public_virtual_ip'),
275         keystone_tenant   => hiera('neutron::server::auth_tenant'),
276         keystone_password => hiera('neutron::server::auth_password')
277       }
278     } else {
279
280       include ::neutron::plugins::ml2
281       include ::neutron::agents::ml2::ovs
282
283       if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
284         include ::neutron::plugins::ml2::cisco::nexus1000v
285
286         class { '::neutron::agents::n1kv_vem':
287           n1kv_source  => hiera('n1kv_vem_source', undef),
288           n1kv_version => hiera('n1kv_vem_version', undef),
289         }
290
291         class { '::n1k_vsm':
292           n1kv_source       => hiera('n1kv_vsm_source', undef),
293           n1kv_version      => hiera('n1kv_vsm_version', undef),
294           pacemaker_control => false,
295         }
296       }
297
298       if 'cisco_ucsm' in hiera('neutron::plugins::ml2::mechanism_drivers') {
299         include ::neutron::plugins::ml2::cisco::ucsm
300       }
301       if 'cisco_nexus' in hiera('neutron::plugins::ml2::mechanism_drivers') {
302         include ::neutron::plugins::ml2::cisco::nexus
303         include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
304       }
305
306       if 'bsn_ml2' in hiera('neutron::plugins::ml2::mechanism_drivers') {
307         include ::neutron::plugins::ml2::bigswitch::restproxy
308         include ::neutron::agents::bigswitch
309       }
310       Service['neutron-server'] -> Service['neutron-ovs-agent-service']
311     }
312
313     Service['neutron-server'] -> Service['neutron-metadata']
314   }
315
316   include ::cinder
317   include ::cinder::config
318   include ::cinder::api
319   include ::cinder::glance
320   include ::cinder::scheduler
321   include ::cinder::volume
322   include ::cinder::ceilometer
323   class { '::cinder::setup_test_volume':
324     size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
325   }
326
327   $cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true)
328   if $cinder_enable_iscsi {
329     $cinder_iscsi_backend = 'tripleo_iscsi'
330
331     cinder::backend::iscsi { $cinder_iscsi_backend :
332       iscsi_ip_address => hiera('cinder_iscsi_ip_address'),
333       iscsi_helper     => hiera('cinder_iscsi_helper'),
334     }
335   }
336
337   if $enable_ceph {
338
339     $ceph_pools = hiera('ceph_pools')
340     ceph::pool { $ceph_pools :
341       pg_num  => hiera('ceph::profile::params::osd_pool_default_pg_num'),
342       pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
343       size    => hiera('ceph::profile::params::osd_pool_default_size'),
344     }
345
346     $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
347
348   } else {
349     $cinder_pool_requires = []
350   }
351
352   if hiera('cinder_enable_rbd_backend', false) {
353     $cinder_rbd_backend = 'tripleo_ceph'
354
355     cinder::backend::rbd { $cinder_rbd_backend :
356       backend_host    => hiera('cinder::host'),
357       rbd_pool        => hiera('cinder_rbd_pool_name'),
358       rbd_user        => hiera('ceph_client_user_name'),
359       rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
360       require         => $cinder_pool_requires,
361     }
362   }
363
364   if hiera('cinder_enable_eqlx_backend', false) {
365     $cinder_eqlx_backend = hiera('cinder::backend::eqlx::volume_backend_name')
366
367     cinder::backend::eqlx { $cinder_eqlx_backend :
368       volume_backend_name => hiera('cinder::backend::eqlx::volume_backend_name', undef),
369       san_ip              => hiera('cinder::backend::eqlx::san_ip', undef),
370       san_login           => hiera('cinder::backend::eqlx::san_login', undef),
371       san_password        => hiera('cinder::backend::eqlx::san_password', undef),
372       san_thin_provision  => hiera('cinder::backend::eqlx::san_thin_provision', undef),
373       eqlx_group_name     => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
374       eqlx_pool           => hiera('cinder::backend::eqlx::eqlx_pool', undef),
375       eqlx_use_chap       => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
376       eqlx_chap_login     => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
377       eqlx_chap_password  => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
378     }
379   }
380
381   if hiera('cinder_enable_dellsc_backend', false) {
382     $cinder_dellsc_backend = hiera('cinder::backend::dellsc_iscsi::volume_backend_name')
383
384     cinder::backend::dellsc_iscsi{ $cinder_dellsc_backend :
385       volume_backend_name   => hiera('cinder::backend::dellsc_iscsi::volume_backend_name', undef),
386       san_ip                => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
387       san_login             => hiera('cinder::backend::dellsc_iscsi::san_login', undef),
388       san_password          => hiera('cinder::backend::dellsc_iscsi::san_password', undef),
389       dell_sc_ssn           => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
390       iscsi_ip_address      => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
391       iscsi_port            => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
392       dell_sc_api_port      => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
393       dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
394       dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
395     }
396   }
397
398   if hiera('cinder_enable_netapp_backend', false) {
399     $cinder_netapp_backend = hiera('cinder::backend::netapp::title')
400
401     if hiera('cinder::backend::netapp::nfs_shares', undef) {
402       $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
403     }
404
405     cinder::backend::netapp { $cinder_netapp_backend :
406       netapp_login                 => hiera('cinder::backend::netapp::netapp_login', undef),
407       netapp_password              => hiera('cinder::backend::netapp::netapp_password', undef),
408       netapp_server_hostname       => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
409       netapp_server_port           => hiera('cinder::backend::netapp::netapp_server_port', undef),
410       netapp_size_multiplier       => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
411       netapp_storage_family        => hiera('cinder::backend::netapp::netapp_storage_family', undef),
412       netapp_storage_protocol      => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
413       netapp_transport_type        => hiera('cinder::backend::netapp::netapp_transport_type', undef),
414       netapp_vfiler                => hiera('cinder::backend::netapp::netapp_vfiler', undef),
415       netapp_volume_list           => hiera('cinder::backend::netapp::netapp_volume_list', undef),
416       netapp_vserver               => hiera('cinder::backend::netapp::netapp_vserver', undef),
417       netapp_partner_backend_name  => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
418       nfs_shares                   => $cinder_netapp_nfs_shares,
419       nfs_shares_config            => hiera('cinder::backend::netapp::nfs_shares_config', undef),
420       netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
421       netapp_controller_ips        => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
422       netapp_sa_password           => hiera('cinder::backend::netapp::netapp_sa_password', undef),
423       netapp_storage_pools         => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
424       netapp_eseries_host_type     => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
425       netapp_webservice_path       => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
426     }
427   }
428
429   if hiera('cinder_enable_nfs_backend', false) {
430     $cinder_nfs_backend = 'tripleo_nfs'
431
432     if str2bool($::selinux) {
433       selboolean { 'virt_use_nfs':
434         value      => on,
435         persistent => true,
436       } -> Package['nfs-utils']
437     }
438
439     package {'nfs-utils': } ->
440     cinder::backend::nfs { $cinder_nfs_backend :
441       nfs_servers       => hiera('cinder_nfs_servers'),
442       nfs_mount_options => hiera('cinder_nfs_mount_options',''),
443       nfs_shares_config => '/etc/cinder/shares-nfs.conf',
444     }
445   }
446
447   $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend])
448   class { '::cinder::backends' :
449     enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')),
450   }
451
452   # swift proxy
453   include ::swift::proxy
454   include ::swift::proxy::proxy_logging
455   include ::swift::proxy::healthcheck
456   include ::swift::proxy::cache
457   include ::swift::proxy::keystone
458   include ::swift::proxy::authtoken
459   include ::swift::proxy::staticweb
460   include ::swift::proxy::ratelimit
461   include ::swift::proxy::catch_errors
462   include ::swift::proxy::tempurl
463   include ::swift::proxy::formpost
464
465   # swift storage
466   if str2bool(hiera('enable_swift_storage', true)) {
467     class { '::swift::storage::all':
468       mount_check => str2bool(hiera('swift_mount_check')),
469     }
470     if(!defined(File['/srv/node'])) {
471       file { '/srv/node':
472         ensure  => directory,
473         owner   => 'swift',
474         group   => 'swift',
475         require => Package['openstack-swift'],
476       }
477     }
478     $swift_components = ['account', 'container', 'object']
479     swift::storage::filter::recon { $swift_components : }
480     swift::storage::filter::healthcheck { $swift_components : }
481   }
482
483   # Ceilometer
484   $ceilometer_backend = downcase(hiera('ceilometer_backend'))
485   case $ceilometer_backend {
486     /mysql/ : {
487       $ceilometer_database_connection = hiera('ceilometer_mysql_conn_string')
488     }
489     default : {
490       $ceilometer_database_connection = $ceilometer_mongodb_conn_string
491     }
492   }
493   include ::ceilometer
494   include ::ceilometer::config
495   include ::ceilometer::api
496   include ::ceilometer::agent::notification
497   include ::ceilometer::agent::central
498   include ::ceilometer::expirer
499   include ::ceilometer::collector
500   include ::ceilometer::agent::auth
501   include ::ceilometer::dispatcher::gnocchi
502   class { '::ceilometer::db' :
503     database_connection => $ceilometer_database_connection,
504   }
505
506   Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
507
508   # Aodh
509   class { '::aodh' :
510     database_connection => $ceilometer_database_connection,
511   }
512   include ::aodh::db::sync
513   # To manage the upgrade:
514   Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
515   include ::aodh::auth
516   include ::aodh::api
517   include ::aodh::wsgi::apache
518   include ::aodh::evaluator
519   include ::aodh::notifier
520   include ::aodh::listener
521   include ::aodh::client
522
523   # Sahara
524   include ::sahara
525   include ::sahara::service::api
526   include ::sahara::service::engine
527
528   # Horizon
529   include ::apache::mod::remoteip
530   if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
531     $_profile_support = 'cisco'
532   } else {
533     $_profile_support = 'None'
534   }
535   $neutron_options   = {'profile_support' => $_profile_support }
536
537   $memcached_ipv6 = hiera('memcached_ipv6', false)
538   if $memcached_ipv6 {
539     $horizon_memcached_servers = hiera('memcache_node_ips_v6', '[::1]')
540   } else {
541     $horizon_memcached_servers = hiera('memcache_node_ips', '127.0.0.1')
542   }
543
544   class { '::horizon':
545     cache_server_ip => $horizon_memcached_servers,
546     neutron_options => $neutron_options,
547   }
548
549   # Gnocchi
550   $gnocchi_database_connection = hiera('gnocchi_mysql_conn_string')
551   class { '::gnocchi':
552     database_connection => $gnocchi_database_connection,
553   }
554   include ::gnocchi::api
555   include ::gnocchi::wsgi::apache
556   include ::gnocchi::client
557   include ::gnocchi::db::sync
558   include ::gnocchi::storage
559   include ::gnocchi::metricd
560   include ::gnocchi::statsd
561   $gnocchi_backend = downcase(hiera('gnocchi_backend', 'swift'))
562   case $gnocchi_backend {
563       'swift': { include ::gnocchi::storage::swift }
564       'file': { include ::gnocchi::storage::file }
565       'rbd': { include ::gnocchi::storage::ceph }
566       default: { fail('Unrecognized gnocchi_backend parameter.') }
567   }
568
569   $snmpd_user = hiera('snmpd_readonly_user_name')
570   snmp::snmpv3_user { $snmpd_user:
571     authtype => 'MD5',
572     authpass => hiera('snmpd_readonly_user_password'),
573   }
574   class { '::snmp':
575     agentaddress => ['udp:161','udp6:[::1]:161'],
576     snmpd_config => [ join(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc  cron', 'includeAllDisks  10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
577   }
578
579   hiera_include('controller_classes')
580
581 } #END STEP 4
582
583 if hiera('step') >= 5 {
584   $nova_enable_db_purge = hiera('nova_enable_db_purge', true)
585   $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
586
587   if $nova_enable_db_purge {
588     include ::nova::cron::archive_deleted_rows
589   }
590   if $cinder_enable_db_purge {
591     include ::cinder::cron::db_purge
592   }
593 } #END STEP 5
594
595 $package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')])
596 package_manifest{$package_manifest_name: ensure => present}