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