Merge "Move Neutron core and service plugin to base"
authorJenkins <jenkins@review.openstack.org>
Tue, 14 Jun 2016 08:49:44 +0000 (08:49 +0000)
committerGerrit Code Review <review@openstack.org>
Tue, 14 Jun 2016 08:49:44 +0000 (08:49 +0000)
environments/puppet-pacemaker.yaml
overcloud-resource-registry-puppet.yaml
overcloud.yaml
puppet/controller.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp
puppet/services/database/mongodb-base.yaml [new file with mode: 0644]
puppet/services/database/mongodb.yaml [new file with mode: 0644]
puppet/services/pacemaker/database/mongodb.yaml [new file with mode: 0644]

index b139fc8..00e14fd 100644 (file)
@@ -30,3 +30,4 @@ resource_registry:
   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
+  OS::TripleO::Services::MongoDb: ../puppet/services/pacemaker/database/mongodb.yaml
index f140383..3abd1c6 100644 (file)
@@ -147,6 +147,7 @@ resource_registry:
   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
+  OS::TripleO::Services::MongoDb: puppet/services/database/mongodb.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index dc37b2e..5f0ad7d 100644 (file)
@@ -225,14 +225,6 @@ parameters:
     default: ''
     description: Comma-separated list of ntp servers
     type: comma_delimited_list
-  MongoDbNoJournal:
-    default: false
-    description: Should MongoDb journaling be disabled
-    type: boolean
-  MongoDbIPv6:
-    default: false
-    description: Enable IPv6 if MongoDB VIP is IPv6
-    type: boolean
   PublicVirtualFixedIPs:
     default: []
     description: >
@@ -597,6 +589,7 @@ parameters:
       - OS::TripleO::Services::SwiftProxy
       - OS::TripleO::Services::Redis
       - OS::TripleO::Services::NovaConductor
+      - OS::TripleO::Services::MongoDb
     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.
@@ -870,8 +863,6 @@ resources:
           NovaIPv6: {get_param: NovaIPv6}
           NovaPassword: {get_param: NovaPassword}
           NtpServer: {get_param: NtpServer}
-          MongoDbNoJournal: {get_param: MongoDbNoJournal}
-          MongoDbIPv6: {get_param: MongoDbIPv6}
           PcsdPassword: {get_resource: PcsdPassword}
           PublicVirtualInterface: {get_param: PublicVirtualInterface}
           RabbitPassword: {get_param: RabbitPassword}
index cb8c5bc..7ccd7e7 100644 (file)
@@ -288,14 +288,6 @@ parameters:
     default: 0
     description: Number of workers for Nova service.
     type: number
-  MongoDbNoJournal:
-    default: false
-    description: Should MongoDb journaling be disabled
-    type: boolean
-  MongoDbIPv6:
-    default: false
-    description: Enable IPv6 if Mongo DB VIP is IPv6
-    type: boolean
   NtpServer:
     default: ''
     description: Comma-separated list of ntp servers
@@ -750,8 +742,6 @@ resources:
         rabbit_cookie: {get_param: RabbitCookie}
         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
         rabbit_client_port: {get_param: RabbitClientPort}
-        mongodb_no_journal: {get_param: MongoDbNoJournal}
-        mongodb_ipv6: {get_param: MongoDbIPv6}
         ntp_servers: {get_param: NtpServer}
         timezone: {get_param: TimeZone}
         control_virtual_interface: {get_param: ControlVirtualInterface}
@@ -918,10 +908,10 @@ resources:
                 keystone::public_bind_host: {get_input: keystone_public_api_network}
                 keystone::wsgi::apache::bind_host: {get_input: keystone_public_api_network}
                 keystone::wsgi::apache::admin_bind_host: {get_input: keystone_admin_api_network}
+
                 # MongoDB
                 mongodb::server::bind_ip: {get_input: mongo_db_network}
-                mongodb::server::nojournal: {get_input: mongodb_no_journal}
-                mongodb::server::ipv6: {get_input: mongodb_ipv6}
+
                 # MySQL
                 admin_password: {get_input: admin_password}
                 enable_galera: {get_input: enable_galera}
index ba0ad5c..c6a8066 100644 (file)
@@ -36,9 +36,6 @@ if hiera('step') >= 2 {
 
   # MongoDB
   if downcase(hiera('ceilometer_backend')) == 'mongodb' {
-    include ::mongodb::globals
-    include ::mongodb::client
-    include ::mongodb::server
     # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port and
     # without the brackets as 'members' argument for the 'mongodb_replset'
     # resource.
@@ -54,11 +51,6 @@ if hiera('step') >= 2 {
 
     $mongodb_replset = hiera('mongodb::server::replset')
     $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
-    if downcase(hiera('bootstrap_nodeid')) == $::hostname {
-      mongodb_replset { $mongodb_replset :
-        members => $mongo_node_ips_with_port_nobr,
-      }
-    }
   }
 
   if str2bool(hiera('enable_galera', true)) {
index 81cdb10..d042bda 100644 (file)
@@ -100,11 +100,7 @@ if hiera('step') >= 1 {
   }
 
   if downcase(hiera('ceilometer_backend')) == 'mongodb' {
-    include ::mongodb::globals
-    include ::mongodb::client
-    class { '::mongodb::server' :
-      service_manage => false,
-    }
+    include ::mongodb::params
   }
 
   # Galera
@@ -166,6 +162,7 @@ if hiera('step') >= 1 {
 
 if hiera('step') >= 2 {
 
+
   # NOTE(gfidente): the following vars are needed on all nodes so they
   # need to stay out of pacemaker_master conditional.
   # The addresses mangling will hopefully go away when we'll be able to
@@ -192,24 +189,6 @@ if hiera('step') >= 2 {
       clone_params   => true,
     }
 
-    if downcase(hiera('ceilometer_backend')) == 'mongodb' {
-      pacemaker::resource::service { $::mongodb::params::service_name :
-        op_params    => 'start timeout=370s stop timeout=200s',
-        clone_params => true,
-        require      => Class['::mongodb::server'],
-      }
-      # NOTE (spredzy) : The replset can only be run
-      # once all the nodes have joined the cluster.
-      mongodb_conn_validator { $mongo_node_ips_with_port :
-        timeout => '600',
-        require => Pacemaker::Resource::Service[$::mongodb::params::service_name],
-        before  => Mongodb_replset[$mongodb_replset],
-      }
-      mongodb_replset { $mongodb_replset :
-        members => $mongo_node_ips_with_port_nobr,
-      }
-    }
-
     pacemaker::resource::ocf { 'galera' :
       ocf_agent_name  => 'heartbeat:galera',
       op_params       => 'promote timeout=300s on-fail=block',
diff --git a/puppet/services/database/mongodb-base.yaml b/puppet/services/database/mongodb-base.yaml
new file mode 100644 (file)
index 0000000..ecd1d31
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+  Configuration details for MongoDB service using composable roles
+
+parameters:
+  MongoDbNoJournal:
+    default: false
+    description: Should MongoDb journaling be disabled
+    type: boolean
+  MongoDbIPv6:
+    default: false
+    description: Enable IPv6 if MongoDB VIP is IPv6
+    type: boolean
+  MongoDbReplset:
+    type: string
+    default: "tripleo"
+
+outputs:
+  aux_parameters:
+    description: Additional parameters referenced outside the base file
+    value:
+      rplset_name: {get_param: MongoDbReplset}
+  role_data:
+    description: Role data for the MongoDB base service.
+    value:
+      config_settings:
+        mongodb::server::nojournal: {get_param: MongoDbNoJournal}
+        mongodb::server::ipv6: {get_param: MongoDbIPv6}
+        mongodb::server::replset: {get_param: MongoDbReplset}
\ No newline at end of file
diff --git a/puppet/services/database/mongodb.yaml b/puppet/services/database/mongodb.yaml
new file mode 100644 (file)
index 0000000..c048870
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version: 2016-04-08
+
+description: >
+  MongoDb service deployment using puppet
+
+parameters:
+  #Parameters not used EndpointMap
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+resources:
+  MongoDbBase:
+    type: ./mongodb-base.yaml
+
+outputs:
+  role_data:
+    description: Service mongodb using composable services.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [MongoDbBase, role_data, config_settings]
+          - tripleo::profile::base::database::mongodb::mongodb_replset: {get_attr: [MongoDbBase, aux_parameters, rplset_name]}
+            mongodb::server::service_manage: True
+      step_config: |
+        include ::tripleo::profile::base::database::mongodb
\ No newline at end of file
diff --git a/puppet/services/pacemaker/database/mongodb.yaml b/puppet/services/pacemaker/database/mongodb.yaml
new file mode 100644 (file)
index 0000000..b2e9e0b
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version: 2016-04-08
+
+description: >
+  MongoDb service deployment using puppet
+
+parameters:
+  #Parameters not used EndpointMap
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+resources:
+  MongoDbBase:
+    type: ../../database/mongodb-base.yaml
+
+outputs:
+  role_data:
+    description: Service mongodb using composable services.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [MongoDbBase, role_data, config_settings]
+          - tripleo::profile::pacemaker::database::mongodb::mongodb_replset: {get_attr: [MongoDbBase, aux_parameters, rplset_name]}
+            mongodb::server::service_manage: False
+      step_config: |
+        include ::tripleo::profile::pacemaker::database::mongodb