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