Merge "Enable use of coordination_url in ceilometer"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_compute.pp
index 0d2790b..00bab7f 100644 (file)
@@ -24,20 +24,26 @@ if !str2bool(hiera('enable_package_install', 'false')) {
   }
 }
 
+create_resources(sysctl::value, hiera('sysctl_settings'), {})
+
 if count(hiera('ntp::servers')) > 0 {
   include ::ntp
 }
 
-class { 'nova':
-  glance_api_servers => join([hiera('glance_protocol'), '://', hiera('glance_host'), ':', hiera('glance_port')]),
-}
-
 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'],
+}
 
+include ::nova
 include ::nova::compute
 
 nova_config {
@@ -45,19 +51,23 @@ nova_config {
   'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
 }
 
-include ::nova::compute::libvirt
+$nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false)
+if $nova_enable_rbd_backend {
+  include ::ceph::profile::client
 
-class { 'nova::network::neutron':
-  neutron_admin_auth_url => join(['http://', hiera('neutron_host'), ':35357/v2.0']),
-  neutron_url            => join(['http://', hiera('neutron_host'), ':9696']),
+  $client_keys = hiera('ceph::profile::params::client_keys')
+  class { '::nova::compute::rbd':
+    libvirt_rbd_secret_key => $client_keys['client.openstack']['secret'],
+  }
 }
 
+include ::nova::compute::libvirt
+include ::nova::network::neutron
 include ::neutron
 
 class { 'neutron::plugins::ml2':
   flat_networks        => split(hiera('neutron_flat_networks'), ','),
   tenant_network_types => [hiera('neutron_tenant_network_type')],
-  type_drivers         => [hiera('neutron_tenant_network_type')],
 }
 
 class { 'neutron::agents::ml2::ovs':
@@ -67,10 +77,7 @@ class { 'neutron::agents::ml2::ovs':
 
 include ::ceilometer
 include ::ceilometer::agent::compute
-
-class { 'ceilometer::agent::auth':
-  auth_url => join(['http://', hiera('keystone_host'), ':5000/v2.0']),
-}
+include ::ceilometer::agent::auth
 
 $snmpd_user = hiera('snmpd_readonly_user_name')
 snmp::snmpv3_user { $snmpd_user: