Enable nova-conductor as a composable service
authorEmilien Macchi <emilien@redhat.com>
Wed, 1 Jun 2016 20:39:20 +0000 (16:39 -0400)
committerSteven Hardy <shardy@redhat.com>
Mon, 6 Jun 2016 12:47:19 +0000 (12:47 +0000)
Implement NovaConductor service using nova-base for common parameters.

* Move rabbitmq parameters from controller.yaml to nova-base service, as
  an example. More parameters will move in the future.
* Move nova-conductor bits from monolithic manifests to the new service
  using new profiles from puppet-tripleo.

Depends-On: Iaaf3a3c2528d9747e41f360a1fe55f95ed37b2d1
Implements: blueprint composable-services-within-roles

Change-Id: I178f092b74ae12f2cb6f006db7cb00e4d6bddfd8

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

index def047c..7f26159 100644 (file)
@@ -26,3 +26,4 @@ resource_registry:
   OS::TripleO::Services::Loadbalancer: ../puppet/services/pacemaker/loadbalancer.yaml
   OS::TripleO::Services::Memcached: ../puppet/services/pacemaker/memcached.yaml
   OS::TripleO::Services::Redis: ../puppet/services/pacemaker/database/redis.yaml
+  OS::TripleO::Services::NovaConductor: ../puppet/services/pacemaker/nova-conductor.yaml
index 7682ad6..5b6ccbc 100644 (file)
@@ -142,6 +142,7 @@ resource_registry:
   OS::TripleO::Services::SaharaApi: puppet/services/sahara-api.yaml
   OS::TripleO::Services::SaharaEngine: puppet/services/sahara-engine.yaml
   OS::TripleO::Services::Redis: puppet/services/database/redis.yaml
+  OS::TripleO::Services::NovaConductor: puppet/services/nova-conductor.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index cbab395..e302299 100644 (file)
@@ -641,6 +641,7 @@ parameters:
       - OS::TripleO::Services::Memcached
       - OS::TripleO::Services::SwiftProxy
       - OS::TripleO::Services::Redis
+      - OS::TripleO::Services::NovaConductor
     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 80e6b45..074cb6f 100644 (file)
@@ -1272,12 +1272,7 @@ resources:
                 gnocchi::keystone::auth::region: {get_input: keystone_region}
 
                 # Nova
-                nova::rabbit_userid: {get_input: rabbit_username}
-                nova::rabbit_password: {get_input: rabbit_password}
-                nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
-                nova::rabbit_port: {get_input: rabbit_client_port}
                 nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute}
-                nova::debug: {get_input: debug}
                 nova::use_ipv6: {get_input: nova_ipv6}
                 nova::api::auth_uri: {get_input: keystone_auth_uri}
                 nova::api::identity_uri: {get_input: keystone_identity_uri}
index d57f916..3ad0748 100644 (file)
@@ -1,7 +1,6 @@
 # Hiera data here applies to all controller nodes
 
 nova::api::enabled: true
-nova::conductor::enabled: true
 nova::consoleauth::enabled: true
 nova::vncproxy::enabled: true
 nova::scheduler::enabled: true
index 9b4e76c..89569ae 100644 (file)
@@ -162,7 +162,6 @@ if hiera('step') >= 4 {
   include ::nova::config
   include ::nova::api
   include ::nova::cert
-  include ::nova::conductor
   include ::nova::consoleauth
   include ::nova::network::neutron
   include ::nova::vncproxy
index dc53d6d..10f0398 100644 (file)
@@ -384,10 +384,6 @@ MYSQL_HOST=localhost\n",
     manage_service => false,
     enabled        => false,
   }
-  class { '::nova::conductor' :
-    manage_service => false,
-    enabled        => false,
-  }
   class { '::nova::consoleauth' :
     manage_service => false,
     enabled        => false,
@@ -839,9 +835,6 @@ password=\"${mysql_root_password}\"",
     pacemaker::resource::service { $::nova::params::api_service_name :
       clone_params => 'interleave=true',
     }
-    pacemaker::resource::service { $::nova::params::conductor_service_name :
-      clone_params => 'interleave=true',
-    }
     pacemaker::resource::service { $::nova::params::consoleauth_service_name :
       clone_params => 'interleave=true',
       require      => Pacemaker::Resource::Ocf['openstack-core'],
diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml
new file mode 100644 (file)
index 0000000..7de14f6
--- /dev/null
@@ -0,0 +1,39 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Nova base service. Shared for all Nova services.
+
+parameters:
+  RabbitPassword:
+    description: The password for RabbitMQ
+    type: string
+    hidden: true
+  RabbitUserName:
+    default: guest
+    description: The username for RabbitMQ
+    type: string
+  RabbitClientUseSSL:
+    default: false
+    description: >
+        Rabbit client subscriber parameter to specify
+        an SSL connection to the RabbitMQ host.
+    type: string
+  RabbitClientPort:
+    default: 5672
+    description: Set rabbit subscriber port, change this if using SSL
+    type: number
+  Debug:
+    type: string
+    default: ''
+    description: Set to True to enable debugging on all services.
+
+outputs:
+  role_data:
+    description: Role data for the Neutron base service.
+    value:
+      config_settings:
+        nova::rabbit_password: {get_param: RabbitPassword}
+        nova::rabbit_user: {get_param: RabbitUserName}
+        nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
+        nova::rabbit_port: {get_param: RabbitClientPort}
+        nova::debug: {get_param: Debug}
diff --git a/puppet/services/nova-conductor.yaml b/puppet/services/nova-conductor.yaml
new file mode 100644 (file)
index 0000000..412dd27
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Nova Conductor service configured with Puppet
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  NovaWorkers:
+    default: 0
+    description: Number of workers for Nova Conductor service.
+    type: number
+
+resources:
+  NovaBase:
+    type: ./nova-base.yaml
+
+outputs:
+  role_data:
+    description: Role data for the Nova Conductor service.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NovaBase, role_data, config_settings]
+          - nova::conductor::workers: {get_param: NovaWorkers}
+      step_config: |
+        include tripleo::profile::base::nova::conductor
diff --git a/puppet/services/pacemaker/nova-conductor.yaml b/puppet/services/pacemaker/nova-conductor.yaml
new file mode 100644 (file)
index 0000000..a484f0d
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Nova Conductor 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:
+
+  NovaConductorBase:
+    type: ../nova-conductor.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Conductor role.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NovaConductorBase, role_data, config_settings]
+          - nova::conductor::manage_service: false
+            nova::conductor::enabled: false
+      step_config: |
+        include ::tripleo::profile::pacemaker::nova::conductor