Merge "Move cinder::db data within service template"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_compute.pp
index 8db39b0..b25d62f 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 <| |>
-
-include ::timezone
-
 if hiera('step') >= 4 {
 
-  file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
-    '/etc/libvirt/qemu/networks/default.xml']:
-    ensure => absent,
-    before => Service['libvirt'],
-  }
-  # in case libvirt has been already running before the Puppet run, make
-  # sure the default network is destroyed
-  exec { 'libvirt-default-net-destroy':
-    command => '/usr/bin/virsh net-destroy default',
-    onlyif  => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"',
-    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',
@@ -47,56 +28,6 @@ if hiera('step') >= 4 {
     ensure => present,
   }
 
-  $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 {
-    if str2bool(hiera('ceph_ipv6', false)) {
-      $mon_host = hiera('ceph_mon_host_v6')
-    } else {
-      $mon_host = hiera('ceph_mon_host')
-    }
-    class { '::ceph::profile::params':
-      mon_host            => $mon_host,
-    }
-    include ::ceph::conf
-    include ::ceph::profile::client
-
-    $client_keys = hiera('ceph::profile::params::client_keys')
-    $client_user = join(['client.', hiera('tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name')])
-    class { '::nova::compute::rbd':
-      libvirt_rbd_secret_key => $client_keys[$client_user]['secret'],
-    }
-  }
-
-  if hiera('cinder_enable_nfs_backend', false) {
-    if str2bool($::selinux) {
-      selboolean { 'virt_use_nfs':
-        value      => on,
-        persistent => true,
-      } -> Package['nfs-utils']
-    }
-
-    package { 'nfs-utils': } -> Service['nova-compute']
-  }
-
-  if str2bool(hiera('nova::use_ipv6', false)) {
-    $vncserver_listen = '::0'
-  } else {
-    $vncserver_listen = '0.0.0.0'
-  }
-
-  if $rbd_ephemeral_storage {
-    class { '::nova::compute::libvirt':
-      libvirt_disk_cachemodes => ['network=writeback'],
-      libvirt_hw_disk_discard => 'unmap',
-      vncserver_listen        => $vncserver_listen,
-    }
-  } else {
-    class { '::nova::compute::libvirt' :
-      vncserver_listen => $vncserver_listen,
-    }
-  }
-
   nova_config {
     'DEFAULT/my_ip': value => $ipaddress;
     'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
@@ -108,7 +39,7 @@ if hiera('step') >= 4 {
       content => hiera('midonet_libvirt_qemu_data')
     }
   }
-  include ::nova::network::neutron
+
   include ::neutron
   include ::neutron::config
 
@@ -194,16 +125,6 @@ if hiera('step') >= 4 {
   include ::ceilometer::agent::compute
   include ::ceilometer::agent::auth
 
-  $snmpd_user = hiera('snmpd_readonly_user_name')
-  snmp::snmpv3_user { $snmpd_user:
-    authtype => 'MD5',
-    authpass => hiera('snmpd_readonly_user_password'),
-  }
-  class { '::snmp':
-    agentaddress => ['udp:161','udp6:[::1]:161'],
-    snmpd_config => [ join(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc  cron', 'includeAllDisks  10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
-  }
-
   hiera_include('compute_classes')
 }