diff options
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 9 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 18 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 190 |
3 files changed, 158 insertions, 59 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 18b18c5a..0d6a2389 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -222,13 +222,14 @@ 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': known_stores => $glance_store, } include ::glance::registry + include ::glance::notify::rabbitmq include join(['::glance::backend::', $glance_backend]) class { '::nova' : @@ -300,11 +301,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 +383,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']), } @@ -565,7 +569,9 @@ if hiera('step') >= 3 { Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" } # Heat - include ::heat + class { '::heat' : + notification_driver => 'messaging', + } include ::heat::config include ::heat::api include ::heat::api_cfn @@ -608,6 +614,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 +625,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 dc58289a..2bb081aa 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -62,6 +62,12 @@ if hiera('step') >= 1 { } $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G')) + $corosync_ipv6 = str2bool(hiera('corosync_ipv6', false)) + if $corosync_ipv6 { + $cluster_setup_extras = { '--ipv6' => '' } + } else { + $cluster_setup_extras = {} + } user { 'hacluster': ensure => present, } -> @@ -69,8 +75,9 @@ if hiera('step') >= 1 { hacluster_pwd => hiera('hacluster_pwd'), } -> class { '::pacemaker::corosync': - cluster_members => $pacemaker_cluster_members, - setup_cluster => $pacemaker_master, + cluster_members => $pacemaker_cluster_members, + setup_cluster => $pacemaker_master, + cluster_setup_extras => $cluster_setup_extras, } class { '::pacemaker::stonith': disable => !$enable_fencing, @@ -195,6 +202,11 @@ if hiera('step') >= 2 { include ::pacemaker::resource_defaults + # Create an openstack-core dummy resource. See RHBZ 1290121 + pacemaker::resource::ocf { 'openstack-core': + ocf_agent_name => 'heartbeat:Dummy', + clone_params => true, + } # FIXME: we should not have to access tripleo::loadbalancer class # parameters here to configure pacemaker VIPs. The configuration # of pacemaker VIPs could move into puppet-tripleo or we should @@ -204,8 +216,14 @@ if hiera('step') >= 2 { } $control_vip = hiera('tripleo::loadbalancer::controller_virtual_ip') + if is_ipv6_address($control_vip) { + $control_vip_netmask = '64' + } else { + $control_vip_netmask = '32' + } pacemaker::resource::ip { 'control_vip': - ip_address => $control_vip, + ip_address => $control_vip, + cidr_netmask => $control_vip_netmask, } pacemaker::constraint::base { 'control_vip-then-haproxy': constraint_type => 'order', @@ -226,9 +244,15 @@ if hiera('step') >= 2 { } $public_vip = hiera('tripleo::loadbalancer::public_virtual_ip') + if is_ipv6_address($public_vip) { + $public_vip_netmask = '64' + } else { + $public_vip_netmask = '32' + } if $public_vip and $public_vip != $control_vip { pacemaker::resource::ip { 'public_vip': - ip_address => $public_vip, + ip_address => $public_vip, + cidr_netmask => $public_vip_netmask, } pacemaker::constraint::base { 'public_vip-then-haproxy': constraint_type => 'order', @@ -250,9 +274,15 @@ if hiera('step') >= 2 { } $redis_vip = hiera('redis_vip') + if is_ipv6_address($redis_vip) { + $redis_vip_netmask = '64' + } else { + $redis_vip_netmask = '32' + } if $redis_vip and $redis_vip != $control_vip { pacemaker::resource::ip { 'redis_vip': - ip_address => $redis_vip, + ip_address => $redis_vip, + cidr_netmask => $redis_vip_netmask, } pacemaker::constraint::base { 'redis_vip-then-haproxy': constraint_type => 'order', @@ -274,9 +304,15 @@ if hiera('step') >= 2 { } $internal_api_vip = hiera('tripleo::loadbalancer::internal_api_virtual_ip') + if is_ipv6_address($internal_api_vip) { + $internal_api_vip_netmask = '64' + } else { + $internal_api_vip_netmask = '32' + } if $internal_api_vip and $internal_api_vip != $control_vip { pacemaker::resource::ip { 'internal_api_vip': - ip_address => $internal_api_vip, + ip_address => $internal_api_vip, + cidr_netmask => $internal_api_vip_netmask, } pacemaker::constraint::base { 'internal_api_vip-then-haproxy': constraint_type => 'order', @@ -298,9 +334,15 @@ if hiera('step') >= 2 { } $storage_vip = hiera('tripleo::loadbalancer::storage_virtual_ip') + if is_ipv6_address($storage_vip) { + $storage_vip_netmask = '64' + } else { + $storage_vip_netmask = '32' + } if $storage_vip and $storage_vip != $control_vip { pacemaker::resource::ip { 'storage_vip': - ip_address => $storage_vip, + ip_address => $storage_vip, + cidr_netmask => $storage_vip_netmask, } pacemaker::constraint::base { 'storage_vip-then-haproxy': constraint_type => 'order', @@ -322,9 +364,15 @@ if hiera('step') >= 2 { } $storage_mgmt_vip = hiera('tripleo::loadbalancer::storage_mgmt_virtual_ip') + if is_ipv6_address($storage_mgmt_vip) { + $storage_mgmt_vip_netmask = '64' + } else { + $storage_mgmt_vip_netmask = '32' + } if $storage_mgmt_vip and $storage_mgmt_vip != $control_vip { pacemaker::resource::ip { 'storage_mgmt_vip': - ip_address => $storage_mgmt_vip, + ip_address => $storage_mgmt_vip, + cidr_netmask => $storage_mgmt_vip_netmask, } pacemaker::constraint::base { 'storage_mgmt_vip-then-haproxy': constraint_type => 'order', @@ -356,6 +404,7 @@ if hiera('step') >= 2 { ocf_agent_name => 'heartbeat:rabbitmq-cluster', resource_params => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'', clone_params => 'ordered=true interleave=true', + meta_params => 'notify=true', require => Class['::rabbitmq'], } @@ -505,9 +554,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 @@ -575,10 +625,18 @@ if hiera('step') >= 3 { manage_service => false, enabled => false, } + include ::glance::notify::rabbitmq include join(['::glance::backend::', $glance_backend]) + $nova_ipv6 = hiera('nova::use_ipv6', false) + if $nova_ipv6 { + $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211') + } else { + $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211') + } + class { '::nova' : - memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'), + memcached_servers => $memcached_servers } include ::nova::config @@ -673,6 +731,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'), @@ -742,6 +803,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 @@ -760,6 +824,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']), } @@ -986,7 +1051,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, @@ -1042,6 +1108,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 @@ -1052,6 +1119,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 { @@ -1059,45 +1129,55 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'haproxy-then-keystone-constraint': constraint_type => 'order', first_resource => 'haproxy-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service['haproxy'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } } + + pacemaker::constraint::base { 'openstack-core-then-httpd-constraint': + constraint_type => 'order', + first_resource => 'openstack-core-clone', + second_resource => "${::apache::params::service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::apache::params::service_name], + Pacemaker::Resource::Ocf['openstack-core']], + } pacemaker::constraint::base { 'rabbitmq-then-keystone-constraint': constraint_type => 'order', first_resource => 'rabbitmq-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Ocf['rabbitmq'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } - pacemaker::constraint::base { 'memcached-then-keystone-constraint': + pacemaker::constraint::base { 'memcached-then-openstack-core-constraint': constraint_type => 'order', first_resource => 'memcached-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service['memcached'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } - pacemaker::constraint::base { 'galera-then-keystone-constraint': + pacemaker::constraint::base { 'galera-then-openstack-core-constraint': constraint_type => 'order', first_resource => 'galera-master', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'promote', second_action => 'start', require => [Pacemaker::Resource::Ocf['galera'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } # Cinder pacemaker::resource::service { $::cinder::params::api_service : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::cinder::params::scheduler_service : clone_params => 'interleave=true', @@ -1106,12 +1186,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-cinder-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::cinder::params::api_service}-clone", first_action => 'start', second_action => 'start', - require => [Pacemaker::Resource::Service[$::cinder::params::api_service], - Pacemaker::Resource::Service[$::apache::params::service_name]], + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::cinder::params::api_service]], } pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': constraint_type => 'order', @@ -1149,25 +1229,25 @@ if hiera('step') >= 4 { # Sahara pacemaker::resource::service { $::sahara::params::api_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::sahara::params::engine_service_name : clone_params => 'interleave=true', } pacemaker::constraint::base { 'keystone-then-sahara-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::sahara::params::api_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::sahara::params::api_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } # Glance pacemaker::resource::service { $::glance::params::registry_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::glance::params::api_service_name : clone_params => 'interleave=true', @@ -1175,12 +1255,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-glance-registry-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::glance::params::registry_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'glance-registry-then-glance-api-constraint': constraint_type => 'order', @@ -1218,12 +1298,12 @@ if hiera('step') >= 4 { } -> pacemaker::resource::service { $::neutron::params::server_service: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name] + require => Pacemaker::Resource::Ocf['openstack-core'] } } else { pacemaker::resource::service { $::neutron::params::server_service: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name] + require => Pacemaker::Resource::Ocf['openstack-core'] } } if hiera('neutron::enable_l3_agent', true) { @@ -1296,14 +1376,14 @@ if hiera('step') >= 4 { } } pacemaker::constraint::base { 'keystone-to-neutron-server-constraint': - constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", - second_resource => "${::neutron::params::server_service}-clone", - first_action => 'start', - second_action => 'start', - require => [Pacemaker::Resource::Service[$::apache::params::service_name], - Pacemaker::Resource::Service[$::neutron::params::server_service]], - } + constraint_type => 'order', + first_resource => 'openstack-core-clone', + second_resource => "${::neutron::params::server_service}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::neutron::params::server_service]], + } if hiera('neutron::enable_ovs_agent',true) { pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint': constraint_type => 'order', @@ -1417,7 +1497,7 @@ if hiera('step') >= 4 { } pacemaker::resource::service { $::nova::params::consoleauth_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::nova::params::vncproxy_service_name : clone_params => 'interleave=true', @@ -1428,12 +1508,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::nova::params::consoleauth_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'nova-consoleauth-then-nova-vncproxy-constraint': constraint_type => 'order', @@ -1503,16 +1583,16 @@ if hiera('step') >= 4 { # Ceilometer case downcase(hiera('ceilometer_backend')) { /mysql/: { - pacemaker::resource::service { $::ceilometer::params::agent_central_service_name : + pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } } default: { - pacemaker::resource::service { $::ceilometer::params::agent_central_service_name : + pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: clone_params => 'interleave=true', - require => [Pacemaker::Resource::Service[$::apache::params::service_name], - Pacemaker::Resource::Service[$::mongodb::params::service_name]], + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::mongodb::params::service_name]], } } } @@ -1548,12 +1628,12 @@ if hiera('step') >= 4 { } pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::ceilometer::params::agent_central_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'ceilometer-central-then-ceilometer-collector-constraint': constraint_type => 'order', @@ -1623,12 +1703,12 @@ if hiera('step') >= 4 { } pacemaker::constraint::base { 'keystone-then-heat-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::heat::params::api_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::heat::params::api_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'heat-api-then-heat-api-cfn-constraint': constraint_type => 'order', |