Skip to content
Snippets Groups Projects
compute.pp 1.71 KiB
Newer Older
  • Learn to ignore specific revisions
  •   $admin_interface = hiera('iaas::admin_interface', undef),
    
    
      $neutron_password = hiera('iaas::profile::neutron::password', undef),
      $cinder_secret = hiera('iaas::profile::cinder::secret', undef),
    
      $region = hiera('iaas::region', undef),
    
    
    #VIP1
      $endpoint_main = hiera('iaas::main_address', undef),
    #VIP2
      $endpoint_admin = hiera('iaas::admin_address', undef),
    
    
      $libvirt_type = hiera('iaas::profile::nova::compute::libvirt_type', 'kvm'),
    
      if $endpoint_admin == '' {
        $real_endpoint_admin = $endpoint_main
      }else{
        $real_endpoint_admin = $endpoint_admin
      }
    
    
      sysctl::value { "net.ipv4.ip_forward": value => "1" }
      sysctl::value { "net.ipv4.conf.all.rp_filter": value => "0" }
      sysctl::value { "net.ipv4.conf.default.rp_filter": value => "0" }
    
      class { 'ceph::profile::client': } ->
      class { 'ceph::keys': }
    
      class { '::nova::compute':
    
        enabled => true,
        vnc_enabled => true,
        vncserver_proxyclient_address => $::facts["ipaddress_${admin_interface}"],
    
      }
    
      class { '::nova::compute::neutron': }
    
      class { '::nova::compute::libvirt':
    
    #    libvirt_virt_type => 'kvm',
        libvirt_virt_type => $libvirt_type,
    
        vncserver_listen => '0.0.0.0',
        migration_support => true,
      }
    
      class {'nova::compute::rbd':
        libvirt_rbd_user => 'cinder',
        libvirt_images_rbd_pool => 'vms',
        libvirt_rbd_secret_uuid => $cinder_secret,
    
      }
    
      nova_config {
        'libvirt/libvirt_live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST';