diff options
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 9 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 37 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 119 |
3 files changed, 156 insertions, 9 deletions
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index 0f1318c3..7925f50a 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -120,6 +120,15 @@ elsif hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV cassandra_seeds => $cassandra_node_ips } } +elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' { + + include ::contrail::vrouter + # NOTE: it's not possible to use this class without a functional + # contrail controller up and running + #class {'::contrail::vrouter::provision_vrouter': + # require => Class['contrail::vrouter'], + #} +} else { include ::neutron::plugins::ml2 diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 14dde157..10a64e45 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -113,6 +113,7 @@ if hiera('step') >= 2 { include ::sahara::db::mysql if downcase(hiera('ceilometer_backend')) == 'mysql' { include ::ceilometer::db::mysql + include ::aodh::db::mysql } $rabbit_nodes = hiera('rabbit_node_ips') @@ -222,7 +223,7 @@ if hiera('step') >= 3 { $http_store = ['glance.store.http.Store'] $glance_store = concat($http_store, $backend_store) - # TODO: notifications, scrubber, etc. + # TODO: scrubber and other additional optional features include ::glance include ::glance::config class { '::glance::api': @@ -230,6 +231,10 @@ if hiera('step') >= 3 { } include ::glance::registry include join(['::glance::backend::', $glance_backend]) + $rabbit_port = hiera('rabbitmq::port') + class { '::glance::notify::rabbitmq': + rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"), + } class { '::nova' : memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'), @@ -300,11 +305,13 @@ if hiera('step') >= 3 { include ::neutron::server include ::neutron::server::notifications - # If the value of core plugin is set to 'nuage', - # include nuage core plugin, and it does not + # If the value of core plugin is set to 'nuage' or 'opencontrail', + # include nuage or opencontrail core plugins, and it does not # need the l3, dhcp and metadata agents if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' { include ::neutron::plugins::nuage + } elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' { + include ::neutron::plugins::opencontrail } else { include ::neutron::agents::l3 include ::neutron::agents::dhcp @@ -380,6 +387,7 @@ if hiera('step') >= 3 { include ::cinder::glance include ::cinder::scheduler include ::cinder::volume + include ::cinder::ceilometer class { '::cinder::setup_test_volume': size => join([hiera('cinder_lvm_loop_device_size'), 'M']), } @@ -564,8 +572,25 @@ if hiera('step') >= 3 { Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" } + # Aodh + class { '::aodh' : + database_connection => $ceilometer_database_connection, + } + include ::aodh::db::sync + # To manage the upgrade: + Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync'] + include ::aodh::auth + include ::aodh::api + include ::aodh::wsgi::apache + include ::aodh::evaluator + include ::aodh::notifier + include ::aodh::listener + include ::aodh::client + # Heat - include ::heat + class { '::heat' : + notification_driver => 'messaging', + } include ::heat::config include ::heat::api include ::heat::api_cfn @@ -608,6 +633,7 @@ if hiera('step') >= 4 { $keystone_enable_db_purge = hiera('keystone_enable_db_purge', true) $nova_enable_db_purge = hiera('nova_enable_db_purge', true) $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true) + $heat_enable_db_purge = hiera('heat_enable_db_purge', true) if $keystone_enable_db_purge { include ::keystone::cron::token_flush @@ -618,6 +644,9 @@ if hiera('step') >= 4 { if $cinder_enable_db_purge { include ::cinder::cron::db_purge } + if $heat_enable_db_purge { + include ::heat::cron::purge_deleted + } } #END STEP 4 $package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')]) diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 21011812..fb36893d 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -506,9 +506,10 @@ MYSQL_HOST=localhost\n", if hiera('step') >= 3 { class { '::keystone': - sync_db => $sync_db, - manage_service => false, - enabled => false, + sync_db => $sync_db, + manage_service => false, + enabled => false, + enable_bootstrap => $pacemaker_master, } include ::keystone::config @@ -577,6 +578,10 @@ if hiera('step') >= 3 { enabled => false, } include join(['::glance::backend::', $glance_backend]) + $rabbit_port = hiera('rabbitmq::port') + class { '::glance::notify::rabbitmq': + rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"), + } class { '::nova' : memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'), @@ -674,6 +679,9 @@ if hiera('step') >= 3 { if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' { include ::neutron::plugins::nuage } + if hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' { + include ::neutron::plugins::opencontrail + } if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' { class {'::neutron::plugins::midonet': midonet_api_ip => hiera('tripleo::loadbalancer::public_virtual_ip'), @@ -743,6 +751,9 @@ if hiera('step') >= 3 { neutron_dhcp_agent_config { 'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); } + neutron_config { + 'DEFAULT/notification_driver': value => 'messaging'; + } include ::cinder include ::cinder::config @@ -761,6 +772,7 @@ if hiera('step') >= 3 { enabled => false, } include ::cinder::glance + include ::cinder::ceilometer class { '::cinder::setup_test_volume': size => join([hiera('cinder_lvm_loop_device_size'), 'M']), } @@ -987,7 +999,8 @@ if hiera('step') >= 3 { # Heat include ::heat::config class { '::heat' : - sync_db => $sync_db, + sync_db => $sync_db, + notification_driver => 'messaging', } class { '::heat::api' : manage_service => false, @@ -1025,6 +1038,32 @@ if hiera('step') >= 3 { neutron_options => $neutron_options, } + # Aodh + class { '::aodh' : + database_connection => $ceilometer_database_connection, + } + include ::aodh::config + include ::aodh::auth + include ::aodh::client + include ::aodh::wsgi::apache + class { '::aodh::api': + manage_service => false, + enabled => false, + service_name => 'httpd', + } + class { '::aodh::evaluator': + manage_service => false, + enabled => false, + } + class { '::aodh::notifier': + manage_service => false, + enabled => false, + } + class { '::aodh::listener': + manage_service => false, + enabled => false, + } + $snmpd_user = hiera('snmpd_readonly_user_name') snmp::snmpv3_user { $snmpd_user: authtype => 'MD5', @@ -1043,6 +1082,7 @@ if hiera('step') >= 4 { $keystone_enable_db_purge = hiera('keystone_enable_db_purge', true) $nova_enable_db_purge = hiera('nova_enable_db_purge', true) $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true) + $heat_enable_db_purge = hiera('heat_enable_db_purge', true) if $keystone_enable_db_purge { include ::keystone::cron::token_flush @@ -1053,6 +1093,9 @@ if hiera('step') >= 4 { if $cinder_enable_db_purge { include ::cinder::cron::db_purge } + if $heat_enable_db_purge { + include ::heat::cron::purge_deleted + } if $pacemaker_master { @@ -1501,7 +1544,7 @@ if hiera('step') >= 4 { Pacemaker::Resource::Service[$::nova::params::conductor_service_name]], } - # Ceilometer + # Ceilometer and Aodh case downcase(hiera('ceilometer_backend')) { /mysql/: { pacemaker::resource::service { $::ceilometer::params::agent_central_service_name : @@ -1534,8 +1577,10 @@ if hiera('step') >= 4 { # Fedora doesn't know `require-all` parameter for constraints yet if $::operatingsystem == 'Fedora' { $redis_ceilometer_constraint_params = undef + $redis_aodh_constraint_params = undef } else { $redis_ceilometer_constraint_params = 'require-all=false' + $redis_aodh_constraint_params = 'require-all=false' } pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint': constraint_type => 'order', @@ -1547,6 +1592,16 @@ if hiera('step') >= 4 { require => [Pacemaker::Resource::Ocf['redis'], Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]], } + pacemaker::constraint::base { 'redis-then-aodh-evaluator-constraint': + constraint_type => 'order', + first_resource => 'redis-master', + second_resource => "${::aodh::params::evaluator_service_name}-clone", + first_action => 'promote', + second_action => 'start', + constraint_params => $redis_aodh_constraint_params, + require => [Pacemaker::Resource::Ocf['redis'], + Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name]], + } pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint': constraint_type => 'order', first_resource => "${::apache::params::service_name}-clone", @@ -1597,6 +1652,60 @@ if hiera('step') >= 4 { require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name], Pacemaker::Resource::Ocf['delay']], } + # Aodh + pacemaker::resource::service { $::aodh::params::api_service_name : + clone_params => 'interleave=true', + } + pacemaker::resource::service { $::aodh::params::evaluator_service_name : + clone_params => 'interleave=true', + } + pacemaker::resource::service { $::aodh::params::notifier_service_name : + clone_params => 'interleave=true', + } + pacemaker::resource::service { $::aodh::params::listener_service_name : + clone_params => 'interleave=true', + } + pacemaker::constraint::base { 'keystone-then-aodh-api-constraint': + constraint_type => 'order', + first_resource => "${::apache::params::service_name}-clone", + second_resource => "${::aodh::params::api_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::aodh::params::api_service_name], + Pacemaker::Resource::Service[$::apache::params::service_name]], + } + pacemaker::constraint::base { 'aodh-delay-then-aodh-evaluator-constraint': + constraint_type => 'order', + first_resource => 'delay-clone', + second_resource => "${::aodh::params::evaluator_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Ocf['delay']], + } + pacemaker::constraint::colocation { 'aodh-evaluator-with-aodh-delay-colocation': + source => "${::aodh::params::evaluator_service_name}-clone", + target => 'delay-clone', + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::horizon::params::http_service], + Pacemaker::Resource::Ocf['delay']], + } + pacemaker::constraint::base { 'aodh-evaluator-then-aodh-notifier-constraint': + constraint_type => 'order', + first_resource => "${::aodh::params::evaluator_service_name}-clone", + second_resource => "${::aodh::params::notifier_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]], + } + pacemaker::constraint::colocation { 'aodh-notifier-with-aodh-evaluator-colocation': + source => "${::aodh::params::notifier_service_name}-clone", + target => "${::aodh::params::evaluator_service_name}-clone", + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]], + } if downcase(hiera('ceilometer_backend')) == 'mongodb' { pacemaker::constraint::base { 'mongodb-then-ceilometer-central-constraint': constraint_type => 'order', |