nova: manage migration bits in a composable way
authorEmilien Macchi <emilien@redhat.com>
Wed, 29 Jun 2016 15:12:17 +0000 (11:12 -0400)
committerEmilien Macchi <emilien@redhat.com>
Wed, 29 Jun 2016 20:02:18 +0000 (20:02 +0000)
Allow to enable/disable migration bits from a single place, and select
which services are running on a node.
The use case here is to allow container deployements where libvirt &
nova-compute are separated.
Also support collocation for backward compatibility.

Change-Id: I0b765f8cb08633005c1fc5a5a2a8e5658ff44302

manifests/profile/base/nova.pp

index 66f0d7d..52a4c73 100644 (file)
 #   (Optional) The current step of the deployment
 #   Defaults to hiera('step')
 #
+# [*manage_migration*]
+#   (Optional) Whether or not manage Nova Live migration
+#   Defaults to false
+#
+# [*libvirt_enabled*]
+#   (Optional) Whether or not Libvirt is enabled.
+#   Defaults to false
+#
+# [*nova_compute_enabled*]
+#   (Optional) Whether or not nova-compute is enabled.
+#   Defaults to false
+#
 class tripleo::profile::base::nova (
-  $step = hiera('step'),
+  $step                 = hiera('step'),
+  $manage_migration     = false,
+  $libvirt_enabled      = false,
+  $nova_compute_enabled = false,
 ) {
 
   if hiera('nova::use_ipv6', false) {
@@ -41,4 +56,14 @@ class tripleo::profile::base::nova (
     }
     include ::nova::config
   }
+
+  if $step >= 4 {
+    if $manage_migration {
+      class { '::nova::migration::libvirt':
+        configure_libvirt => $libvirt_enabled,
+        configure_nova    => $nova_compute_enabled,
+      }
+    }
+  }
+
 }