Write package names out to flat files
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller_pacemaker.pp
index 7938f67..0a0ce78 100644 (file)
@@ -177,6 +177,8 @@ if hiera('step') >= 2 {
 
   if $pacemaker_master {
 
+    include pacemaker::resource_defaults
+
     # 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
@@ -438,8 +440,7 @@ MYSQL_HOST=localhost\n",
   include ::swift
 
   # Ceph
-  $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false)
-  $enable_ceph = $cinder_enable_rbd_backend
+  $enable_ceph = hiera('ceph_storage_count', 0) > 0
 
   if $enable_ceph {
     class { 'ceph::profile::params':
@@ -463,10 +464,13 @@ MYSQL_HOST=localhost\n",
       } -> Class['ceph::profile::osd']
     }
 
-    include ::ceph::profile::client
     include ::ceph::profile::osd
   }
 
+  if str2bool(hiera('enable_external_ceph', 'false')) {
+    include ::ceph::profile::client
+  }
+
 
 } #END STEP 2
 
@@ -561,6 +565,7 @@ if hiera('step') >= 3 {
     manage_service => false,
     enabled => false,
   }
+  include ::nova::scheduler::filter
   class { '::nova::scheduler' :
     manage_service => false,
     enabled => false,
@@ -596,6 +601,7 @@ if hiera('step') >= 3 {
   class { 'neutron::plugins::ml2':
     flat_networks   => split(hiera('neutron_flat_networks'), ','),
     tenant_network_types => [hiera('neutron_tenant_network_type')],
+    mechanism_drivers   => [hiera('neutron_mechanism_drivers')],
   }
   class { 'neutron::agents::ml2::ovs':
     manage_service   => false,
@@ -604,6 +610,24 @@ if hiera('step') >= 3 {
     tunnel_types     => split(hiera('neutron_tunnel_types'), ','),
   }
 
+  if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
+    include ::neutron::plugins::ml2::cisco::ucsm
+  }
+  if 'cisco_nexus' in hiera('neutron_mechanism_drivers') {
+    include ::neutron::plugins::ml2::cisco::nexus
+    include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
+  }
+
+  if hiera('neutron_enable_bigswitch_ml2', false) {
+    include neutron::plugins::ml2::bigswitch::restproxy
+  }
+  neutron_l3_agent_config {
+    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
+  }
+  neutron_dhcp_agent_config {
+    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
+  }
+
   include ::cinder
   class { '::cinder::api':
     sync_db => $sync_db,
@@ -643,20 +667,21 @@ if hiera('step') >= 3 {
 
     $ceph_pools = hiera('ceph_pools')
     ceph::pool { $ceph_pools : }
+
+    $cinder_pool_requires = [Ceph::Pool['volumes']]
+
+  } else {
+    $cinder_pool_requires = []
   }
 
-  if $cinder_enable_rbd_backend {
+  if hiera('cinder_enable_rbd_backend', false) {
     $cinder_rbd_backend = 'tripleo_ceph'
 
-    cinder_config {
-      "${cinder_rbd_backend}/host": value => 'hostgroup';
-    }
-
     cinder::backend::rbd { $cinder_rbd_backend :
       rbd_pool        => 'volumes',
       rbd_user        => 'openstack',
       rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
-      require         => Ceph::Pool['volumes'],
+      require         => $cinder_pool_requires,
     }
   }
 
@@ -1171,24 +1196,22 @@ if hiera('step') >= 4 {
       require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
                   Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name]],
     }
-    # FIXME(gfidente): novncproxy will not start unless websockify is updated to 0.6
-    # which is not the case for f20 nor f21; ucomment when it becomes available
-    #pacemaker::constraint::base { 'nova-vncproxy-then-nova-api-constraint':
-    #  constraint_type => "order",
-    #  first_resource  => "${::nova::params::vncproxy_service_name}-clone",
-    #  second_resource => "${::nova::params::api_service_name}-clone",
-    #  first_action    => "start",
-    #  second_action   => "start",
-    #  require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
-    #              Pacemaker::Resource::Service[$::nova::params::api_service_name]],
-    #}
-    #pacemaker::constraint::colocation { 'nova-api-with-nova-vncproxy-colocation':
-    #  source => "${::nova::params::api_service_name}-clone",
-    #  target => "${::nova::params::vncproxy_service_name}-clone",
-    #  score => "INFINITY",
-    #  require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
-    #              Pacemaker::Resource::Service[$::nova::params::api_service_name]],
-    #}
+    pacemaker::constraint::base { 'nova-vncproxy-then-nova-api-constraint':
+      constraint_type => "order",
+      first_resource  => "${::nova::params::vncproxy_service_name}-clone",
+      second_resource => "${::nova::params::api_service_name}-clone",
+      first_action    => "start",
+      second_action   => "start",
+      require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
+                  Pacemaker::Resource::Service[$::nova::params::api_service_name]],
+    }
+    pacemaker::constraint::colocation { 'nova-api-with-nova-vncproxy-colocation':
+      source => "${::nova::params::api_service_name}-clone",
+      target => "${::nova::params::vncproxy_service_name}-clone",
+      score => "INFINITY",
+      require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
+                  Pacemaker::Resource::Service[$::nova::params::api_service_name]],
+    }
     pacemaker::constraint::base { 'nova-api-then-nova-scheduler-constraint':
       constraint_type => "order",
       first_resource  => "${::nova::params::api_service_name}-clone",
@@ -1248,6 +1271,22 @@ if hiera('step') >= 4 {
       clone_params    => 'interleave=true',
       resource_params => 'startdelay=10',
     }
+    # Fedora doesn't know `require-all` parameter for constraints yet
+    if $::operatingsystem == 'Fedora' {
+      $redis_ceilometer_constraint_params = undef
+    } else {
+      $redis_ceilometer_constraint_params = 'require-all=false'
+    }
+    pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
+      constraint_type   => 'order',
+      first_resource    => "redis-master",
+      second_resource   => "${::ceilometer::params::agent_central_service_name}-clone",
+      first_action      => 'promote',
+      second_action     => 'start',
+      constraint_params => $redis_ceilometer_constraint_params,
+      require           => [Pacemaker::Resource::Ocf['redis'],
+                            Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
+    }
     pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
       constraint_type => 'order',
       first_resource  => "${::keystone::params::service_name}-clone",
@@ -1447,3 +1486,6 @@ if hiera('step') >= 4 {
   }
 
 } #END STEP 4
+
+$package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller_pacemaker', hiera('step')])
+package_manifest{$package_manifest_name: ensure => present}