Merge "horizon/keystone api should use internal_api NW"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_compute.pp
index 0c870c3..caca89a 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 {
@@ -48,22 +54,15 @@ nova_config {
 $nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false)
 if $nova_enable_rbd_backend {
   include ::ceph::profile::client
-  include ::nova::compute::rbd
-  ceph::key { 'client.openstack' :
-    secret  => hiera('ceph::profile::params::mon_key'),
-    cap_mon => hiera('ceph_openstack_default_cap_mon'),
-    cap_osd => hiera('ceph_openstack_default_cap_osd'),
-    user    => 'nova',
+
+  $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
-
-class { 'nova::network::neutron':
-  neutron_admin_auth_url => join(['http://', hiera('neutron_host'), ':35357/v2.0']),
-  neutron_url            => join(['http://', hiera('neutron_host'), ':9696']),
-}
-
+include ::nova::network::neutron
 include ::neutron
 
 class { 'neutron::plugins::ml2':
@@ -79,10 +78,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: