Enable nova-scheduler as a composable service
authorEmilien Macchi <emilien@redhat.com>
Mon, 6 Jun 2016 18:56:43 +0000 (14:56 -0400)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Tue, 14 Jun 2016 09:00:56 +0000 (12:00 +0300)
Implement NovaScheduler service using nova-base for common parameters.

Depends-On: I5e1c90e3c6dc556f872ced73744c5c74caaa3635
Change-Id: Ie50716a09c53d656835b16991128c94b35cf1ed2
Implements: blueprint composable-services-within-roles

environments/puppet-pacemaker.yaml
overcloud-resource-registry-puppet.yaml
overcloud.yaml
puppet/hieradata/controller.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp
puppet/services/nova-scheduler.yaml [new file with mode: 0644]
puppet/services/pacemaker/nova-scheduler.yaml [new file with mode: 0644]

index a919c3c..131a8b8 100644 (file)
@@ -32,3 +32,4 @@ resource_registry:
   OS::TripleO::Services::NovaConductor: ../puppet/services/pacemaker/nova-conductor.yaml
   OS::TripleO::Services::MongoDb: ../puppet/services/pacemaker/database/mongodb.yaml
   OS::TripleO::Services::NovaApi: ../puppet/services/pacemaker/nova-api.yaml
+  OS::TripleO::Services::NovaScheduler: ../puppet/services/pacemaker/nova-scheduler.yaml
index 60be7dd..9e66232 100644 (file)
@@ -149,6 +149,7 @@ resource_registry:
   OS::TripleO::Services::NovaConductor: puppet/services/nova-conductor.yaml
   OS::TripleO::Services::MongoDb: puppet/services/database/mongodb.yaml
   OS::TripleO::Services::NovaApi: puppet/services/nova-api.yaml
+  OS::TripleO::Services::NovaScheduler: puppet/services/nova-scheduler.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index 2117b30..45571b9 100644 (file)
@@ -591,6 +591,7 @@ parameters:
       - OS::TripleO::Services::NovaConductor
       - OS::TripleO::Services::MongoDb
       - OS::TripleO::Services::NovaApi
+      - OS::TripleO::Services::NovaScheduler
     description: A list of service resources (configured in the Heat
                  resource_registry) which represent nested stacks
                  for each service that should get installed on the Controllers.
index 3ad0748..7724f17 100644 (file)
@@ -3,7 +3,6 @@
 nova::api::enabled: true
 nova::consoleauth::enabled: true
 nova::vncproxy::enabled: true
-nova::scheduler::enabled: true
 
 # gnocchi
 gnocchi::db::sync::extra_opts: '--skip-storage'
@@ -115,7 +114,6 @@ nova::notify_on_state_change: 'vm_and_task_state'
 nova::api::default_floating_pool: 'public'
 nova::api::sync_db_api: true
 nova::api::enable_proxy_headers_parsing: true
-nova::scheduler::filter::ram_allocation_ratio: '1.0'
 nova::cron::archive_deleted_rows::hour: '*/12'
 nova::cron::archive_deleted_rows::destination: '/dev/null'
 nova::notification_driver: messaging
index 7bd9422..366f98c 100644 (file)
@@ -154,8 +154,6 @@ if hiera('step') >= 4 {
   include ::nova::consoleauth
   include ::nova::network::neutron
   include ::nova::vncproxy
-  include ::nova::scheduler
-  include ::nova::scheduler::filter
 
   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
 
index 5510b4f..9162f93 100644 (file)
@@ -358,11 +358,6 @@ MYSQL_HOST=localhost\n",
     manage_service => false,
     enabled        => false,
   }
-  include ::nova::scheduler::filter
-  class { '::nova::scheduler' :
-    manage_service => false,
-    enabled        => false,
-  }
   include ::nova::network::neutron
 
   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
@@ -716,9 +711,6 @@ password=\"${mysql_root_password}\"",
     pacemaker::resource::service { $::nova::params::vncproxy_service_name :
       clone_params => 'interleave=true',
     }
-    pacemaker::resource::service { $::nova::params::scheduler_service_name :
-      clone_params => 'interleave=true',
-    }
 
     pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint':
       constraint_type => 'order',
diff --git a/puppet/services/nova-scheduler.yaml b/puppet/services/nova-scheduler.yaml
new file mode 100644 (file)
index 0000000..65ed664
--- /dev/null
@@ -0,0 +1,26 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Nova Scheduler service configured with Puppet
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+resources:
+  NovaBase:
+    type: ./nova-base.yaml
+
+outputs:
+  role_data:
+    description: Role data for the Nova Scheduler service.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NovaBase, role_data, config_settings]
+          - nova::scheduler::filter::ram_allocation_ratio: '1.0'
+      step_config: |
+        include tripleo::profile::base::nova::scheduler
diff --git a/puppet/services/pacemaker/nova-scheduler.yaml b/puppet/services/pacemaker/nova-scheduler.yaml
new file mode 100644 (file)
index 0000000..0032cbe
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Nova Scheduler service with Pacemaker configured with Puppet.
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+resources:
+
+  NovaSchedulerBase:
+    type: ../nova-scheduler.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Scheduler role.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NovaSchedulerBase, role_data, config_settings]
+          - nova::scheduler::manage_service: false
+            nova::scheduler::enabled: false
+      step_config: |
+        include ::tripleo::profile::pacemaker::nova::scheduler