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