composable neutron server
authorDan Prince <dprince@redhat.com>
Wed, 11 May 2016 15:34:57 +0000 (11:34 -0400)
committerDan Prince <dprince@redhat.com>
Thu, 9 Jun 2016 14:44:58 +0000 (10:44 -0400)
Adds new puppet and puppet pacemaker specific services for
the Neutron server configuration.

Depends-On: I52815f45a04bf3e39940b9cb116261730580a3e2

Partially-implements: blueprint composable-services-within-roles

Change-Id: I1680d4b7044f16d672e99ca356d954b6734af287

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/neutron-server.yaml [new file with mode: 0644]
puppet/services/pacemaker/neutron-server.yaml [new file with mode: 0644]

index e632645..3e24f98 100644 (file)
@@ -22,6 +22,7 @@ resource_registry:
   OS::TripleO::Services::NeutronDhcpAgent: ../puppet/services/pacemaker/neutron-dhcp.yaml
   OS::TripleO::Services::NeutronL3Agent: ../puppet/services/pacemaker/neutron-l3.yaml
   OS::TripleO::Services::NeutronMetadataAgent: ../puppet/services/pacemaker/neutron-metadata.yaml
+  OS::TripleO::Services::NeutronServer: ../puppet/services/pacemaker/neutron-server.yaml
   OS::TripleO::Services::RabbitMQ: ../puppet/services/pacemaker/rabbitmq.yaml
   OS::TripleO::Services::HAproxy: ../puppet/services/pacemaker/haproxy.yaml
   OS::TripleO::Services::Memcached: ../puppet/services/pacemaker/memcached.yaml
index 2fd48dd..c5c50e3 100644 (file)
@@ -135,6 +135,7 @@ resource_registry:
   OS::TripleO::Services::NeutronDhcpAgent: puppet/services/neutron-dhcp.yaml
   OS::TripleO::Services::NeutronL3Agent: puppet/services/neutron-l3.yaml
   OS::TripleO::Services::NeutronMetadataAgent: puppet/services/neutron-metadata.yaml
+  OS::TripleO::Services::NeutronServer: puppet/services/neutron-server.yaml
   OS::TripleO::Services::RabbitMQ: puppet/services/rabbitmq.yaml
   OS::TripleO::Services::HAproxy: puppet/services/haproxy.yaml
   OS::TripleO::Services::Keepalived: puppet/services/keepalived.yaml
index 85f344a..73f4a2b 100644 (file)
@@ -636,6 +636,7 @@ parameters:
       - OS::TripleO::Services::NeutronDhcpAgent
       - OS::TripleO::Services::NeutronL3Agent
       - OS::TripleO::Services::NeutronMetadataAgent
+      - OS::TripleO::Services::NeutronServer
       - OS::TripleO::Services::RabbitMQ
       - OS::TripleO::Services::HAproxy
       - OS::TripleO::Services::Keepalived
@@ -929,8 +930,6 @@ resources:
           NeutronMechanismDrivers: {get_param: NeutronMechanismDrivers}
           NeutronPluginExtensions: {get_param: NeutronPluginExtensions}
           NeutronAgentExtensions: {get_param: NeutronAgentExtensions}
-          NeutronAllowL3AgentFailover: {get_param: NeutronAllowL3AgentFailover}
-          NeutronL3HA: {get_param: NeutronL3HA}
           NeutronNetworkType: {get_param: NeutronNetworkType}
           NeutronTunnelTypes: {get_param: NeutronTunnelTypes}
           NovaIPv6: {get_param: NovaIPv6}
index 074cb6f..ccaa8d2 100644 (file)
@@ -265,10 +265,6 @@ parameters:
     default: 'dvr_snat'
     description: Agent mode for the neutron-l3-agent on the controller hosts
     type: string
-  NeutronL3HA:
-    default: 'False'
-    description: Whether to enable l3-agent HA
-    type: string
   NeutronDVR:
     default: 'False'
     description: Whether to configure Neutron Distributed Virtual Routers
@@ -299,10 +295,6 @@ parameters:
     description: |
         The mechanism drivers for the Neutron tenant network.
     type: comma_delimited_list
-  NeutronAllowL3AgentFailover:
-    default: 'True'
-    description: Allow automatic l3-agent failover
-    type: string
   NeutronEnableTunnelling:
     type: string
     default: "True"
@@ -315,10 +307,6 @@ parameters:
     type: comma_delimited_list
     default: 'datacentre'
     description: If set, flat networks to configure in neutron plugins.
-  NeutronL3HA:
-    default: 'False'
-    description: Whether to enable l3-agent HA
-    type: string
   NeutronNetworkType:
     default: 'vxlan'
     description: The tenant network type for Neutron.
@@ -399,10 +387,6 @@ parameters:
   NovaApiVirtualIP:
     type: string
     default: ''
-  NeutronWorkers:
-    default: 0
-    description: Number of workers for Neutron service.
-    type: number
   NovaEnableDBPurge:
     default: true
     description: |
@@ -760,7 +744,6 @@ resources:
         bootstack_nodeid: {get_attr: [Controller, name]}
         ceilometer_workers: {get_param: CeilometerWorkers}
         nova_workers: {get_param: NovaWorkers}
-        neutron_workers: {get_param: NeutronWorkers}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
         neutron_enable_l2pop: {get_param: NeutronEnableL2Pop}
         haproxy_log_address: {get_param: HAProxySyslogAddress}
@@ -822,8 +805,6 @@ resources:
             template: MECHANISMS
             params:
               MECHANISMS: {get_param: NeutronMechanismDrivers}
-        neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
-        neutron_l3_ha: {get_param: NeutronL3HA}
         neutron_network_vlan_ranges:
           str_replace:
             template: RANGES
@@ -870,15 +851,6 @@ resources:
               AGENT_EXTENSIONS: {get_param: NeutronAgentExtensions}
         neutron_password: {get_param: NeutronPassword}
         neutron_tenant_mtu: {get_param: NeutronTenantMtu}
-        neutron_dsn:
-          list_join:
-            - ''
-            - - {get_param: [EndpointMap, MysqlInternal, protocol]}
-              - '://neutron:'
-              - {get_param: NeutronPassword}
-              - '@'
-              - {get_param: [EndpointMap, MysqlInternal, host]}
-              - '/ovs_neutron?charset=utf8'
         neutron_internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] }
         neutron_public_url: { get_param: [ EndpointMap, NeutronPublic, uri ] }
         neutron_admin_url: { get_param: [ EndpointMap, NeutronAdmin, uri ] }
@@ -1152,10 +1124,6 @@ resources:
 
                 # Neutron
                 neutron::bind_host: {get_input: neutron_api_network}
-                neutron::server::auth_uri: {get_input: keystone_auth_uri}
-                neutron::server::auth_url: {get_input: keystone_identity_uri}
-                neutron::server::database_connection: {get_input: neutron_dsn}
-                neutron::server::api_workers: {get_input: neutron_workers}
                 neutron::network_device_mtu: {get_input: neutron_tenant_mtu}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
                 neutron::agents::ml2::ovs::l2_population: {get_input: neutron_enable_l2pop}
@@ -1170,8 +1138,6 @@ resources:
                 neutron::plugins::ml2::type_drivers: {get_input: neutron_type_drivers}
                 neutron::plugins::ml2::mechanism_drivers: {get_input: neutron_mechanism_drivers}
                 neutron::plugins::ml2::extension_drivers: {get_input: neutron_plugin_extensions}
-                neutron::server::allow_automatic_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
-                neutron::server::l3_ha: {get_input: neutron_l3_ha}
                 neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
                 neutron::plugins::ml2::tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges}
                 neutron::plugins::ml2::vni_ranges: {get_input: neutron_vni_ranges}
@@ -1183,18 +1149,11 @@ resources:
                 neutron::plugins::ml2::tenant_network_types: {get_input: neutron_tenant_network_types}
                 neutron::agents::ml2::ovs::tunnel_types: {get_input: neutron_tunnel_types}
                 neutron::agents::ml2::ovs::extensions: {get_input: neutron_agent_extensions}
-                neutron::server::password: {get_input: neutron_password}
-                neutron_dsn: {get_input: neutron_dsn}
-                neutron::db::mysql::password: {get_input: neutron_password}
                 neutron::keystone::auth::public_url: {get_input: neutron_public_url }
                 neutron::keystone::auth::internal_url: {get_input: neutron_internal_url }
                 neutron::keystone::auth::admin_url: {get_input: neutron_admin_url }
                 neutron::keystone::auth::password: {get_input: neutron_password }
                 neutron::keystone::auth::region: {get_input: keystone_region}
-                neutron::server::notifications::auth_url: {get_input: neutron_auth_url}
-                neutron::server::notifications::tenant_name: 'service'
-                neutron::server::notifications::project_name: 'service'
-                neutron::server::notifications::password: {get_input: nova_password}
 
                 # Ceilometer
                 ceilometer_backend: {get_input: ceilometer_backend}
index 89569ae..bd54e2a 100644 (file)
@@ -87,7 +87,6 @@ if hiera('step') >= 2 {
   # Create all the database schemas
   include ::nova::db::mysql
   include ::nova::db::mysql_api
-  include ::neutron::db::mysql
   if downcase(hiera('gnocchi_indexer_backend')) == 'mysql' {
     include ::gnocchi::db::mysql
   }
@@ -221,8 +220,6 @@ if hiera('step') >= 4 {
   }
 
   include ::neutron::config
-  include ::neutron::server
-  include ::neutron::server::notifications
 
   # If the value of core plugin is set to 'nuage' or'opencontrail' or 'plumgrid',
   # include nuage or opencontrail or plumgrid core plugins
index 10f0398..a2322be 100644 (file)
@@ -278,9 +278,6 @@ if hiera('step') >= 2 {
     class { '::nova::db::mysql_api':
       require => Exec['galera-ready'],
     }
-    class { '::neutron::db::mysql':
-      require => Exec['galera-ready'],
-    }
 
     if downcase(hiera('ceilometer_backend')) == 'mysql' {
       class { '::ceilometer::db::mysql':
@@ -451,12 +448,6 @@ MYSQL_HOST=localhost\n",
   }
 
   include ::neutron::config
-  class { '::neutron::server' :
-    sync_db        => $sync_db,
-    manage_service => false,
-    enabled        => false,
-  }
-  include ::neutron::server::notifications
   if  hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
     include ::neutron::plugins::nuage
   }
diff --git a/puppet/services/neutron-server.yaml b/puppet/services/neutron-server.yaml
new file mode 100644 (file)
index 0000000..6299c39
--- /dev/null
@@ -0,0 +1,70 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Neutron Server configured with Puppet
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  NeutronWorkers:
+    default: 0
+    description: Number of workers for Neutron service.
+    type: number
+  NeutronPassword:
+    description: The password for the neutron service and db account, used by neutron agents.
+    type: string
+    hidden: true
+  NeutronAllowL3AgentFailover:
+    default: 'True'
+    description: Allow automatic l3-agent failover
+    type: string
+  NeutronL3HA:
+    default: 'False'
+    description: Whether to enable l3-agent HA
+    type: string
+  NovaPassword:
+    description: The password for the nova service and db account, used by nova-api.
+    type: string
+    hidden: true
+
+resources:
+
+  NeutronBase:
+    type: ./neutron-base.yaml
+
+outputs:
+  role_data:
+    description: Role data for the Neutron Server agent service.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+            neutron_dsn: &neutron_dsn
+              list_join:
+                - ''
+                - - {get_param: [EndpointMap, MysqlInternal, protocol]}
+                  - '://neutron:'
+                  - {get_param: NeutronPassword}
+                  - '@'
+                  - {get_param: [EndpointMap, MysqlInternal, host]}
+                  - '/ovs_neutron?charset=utf8'
+            neutron::server::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
+            neutron::server::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
+            neutron::server::identity_uri: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
+            neutron::server::database_connection: *neutron_dsn
+            neutron::server::api_workers: {get_param: NeutronWorkers}
+            neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
+            neutron::server::l3_ha: {get_param: NeutronL3HA}
+            neutron::server::auth_password: {get_param: NeutronPassword}
+
+            neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
+            neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
+            neutron::server::notifications::tenant_name: 'service'
+            neutron::server::notifications::project_name: 'service'
+            neutron::server::notifications::password: {get_param: NovaPassword}
+            neutron::db::mysql::password: {get_param: NeutronPassword}
+      step_config: |
+        include tripleo::profile::base::neutron::server
diff --git a/puppet/services/pacemaker/neutron-server.yaml b/puppet/services/pacemaker/neutron-server.yaml
new file mode 100644 (file)
index 0000000..60599e7
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Neutron Server 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:
+
+  NeutronServerBase:
+    type: ../neutron-server.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron Server.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronServerBase, role_data, config_settings]
+          - neutron::server::enabled: false
+            neutron::server::manage_service: false
+      step_config: |
+        include ::tripleo::profile::pacemaker::neutron::server