Merge "Add Satellite 5 support"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_compute.pp
index 79a6abb..7925f50 100644 (file)
 include ::tripleo::packages
 include ::tripleo::firewall
 
+create_resources(kmod::load, hiera('kernel_modules'), {})
 create_resources(sysctl::value, hiera('sysctl_settings'), {})
+Exec <| tag == 'kmod::load' |>  -> Sysctl <| |>
 
 if count(hiera('ntp::servers')) > 0 {
   include ::ntp
 }
 
+include ::timezone
+
 file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
         '/etc/libvirt/qemu/networks/default.xml']:
   ensure => absent,
@@ -35,6 +39,16 @@ exec { 'libvirt-default-net-destroy':
   before  => Service['libvirt'],
 }
 
+# When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique
+exec { 'reset-iscsi-initiator-name':
+  command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi',
+  onlyif  => '/usr/bin/test ! -f /etc/iscsi/.initiator_reset',
+}->
+
+file { '/etc/iscsi/.initiator_reset':
+  ensure => present,
+}
+
 include ::nova
 include ::nova::config
 include ::nova::compute
@@ -47,6 +61,7 @@ nova_config {
 $rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false)
 $rbd_persistent_storage = hiera('rbd_persistent_storage', false)
 if $rbd_ephemeral_storage or $rbd_persistent_storage {
+  include ::ceph::conf
   include ::ceph::profile::client
 
   $client_keys = hiera('ceph::profile::params::client_keys')
@@ -76,6 +91,7 @@ if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2'
 }
 include ::nova::network::neutron
 include ::neutron
+include ::neutron::config
 
 # If the value of core plugin is set to 'nuage',
 # include nuage agent,
@@ -104,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
@@ -115,6 +140,10 @@ else {
       n1kv_version => hiera('n1kv_vem_version', undef),
     }
   }
+
+  if 'bsn_ml2' in hiera('neutron::plugins::ml2::mechanism_drivers') {
+    include ::neutron::agents::bigswitch
+  }
 }