Re-Add bigswitch agent support
authorAlex Schultz <aschultz@redhat.com>
Wed, 15 Mar 2017 15:55:05 +0000 (09:55 -0600)
committerAlex Schultz <aschultz@redhat.com>
Fri, 17 Mar 2017 21:10:39 +0000 (15:10 -0600)
The agent configuration was lost in newton during the puppet-tripleo and
THT role conversion. This change adds support for including the bigswitch
agent service for composable roles.

Change-Id: I46896389e48cdbe2864bf5b609a786f1c84ef908
Closes-Bug: #1673126

environments/neutron-ml2-bigswitch.yaml
puppet/extraconfig/pre_deploy/compute/neutron-ml2-bigswitch.yaml
puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml
puppet/services/neutron-bigswitch-agent.yaml [new file with mode: 0644]
releasenotes/notes/big-switch-agent-4c743a2112251234.yaml [new file with mode: 0644]

index 750d3c4..8a4a144 100644 (file)
@@ -3,12 +3,17 @@
 resource_registry:
   OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml
   OS::TripleO::ComputeExtraConfigPre: ../puppet/extraconfig/pre_deploy/compute/neutron-ml2-bigswitch.yaml
+  OS::TripleO::NeutronBigswitchAgent: ../puppet/services/neutron-bigswitch-agent.yaml
+  OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
 
 parameter_defaults:
   # Required to fill in:
   NeutronBigswitchRestproxyServers:
   NeutronBigswitchRestproxyServerAuth:
-  NeutronMechanismDrivers: bsn_ml2
+  NeutronMechanismDrivers: openvswitch,bsn_ml2
+  NeutronServicePlugins: bsn_l3,bsn_service_plugin
+  KeystoneNotificationDriver: messaging
 
   # Optional:
   # NeutronBigswitchRestproxyAutoSyncOnFailure:
@@ -19,3 +24,9 @@ parameter_defaults:
   # NeutronBigswitchAgentEnabled:
   # NeutronBigswitchLLDPEnabled:
 
+  ControllerExtraConfig:
+    neutron::agents::l3::enabled: false
+    neutron::agents::dhcp::enable_force_metadata: true
+    neutron::agents::dhcp::enable_isolated_metadata: true
+    neutron::agents::dhcp::enable_metadata_network: false
+    neutron::server::l3_ha: false
index 533c0ee..e3f4cce 100644 (file)
@@ -27,6 +27,15 @@ resources:
             mapped_data:
               neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
               neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
+              # NOTE(aschultz): required for the puppet module but we don't
+              # actually want them defined on the compute nodes so we're
+              # relying on the puppet  module's handling of <SERVICE DEFAULT>
+              # to just not set these but still accept that they were defined.
+              # This will should be fixed in puppet-neutron and removed here,
+              # but for backportability, we need to define something.
+              neutron::plugins::ml2::bigswitch::restproxy::servers: '<SERVICE DEFAULT>'
+              neutron::plugins::ml2::bigswitch::restproxy::server_auth: '<SERVICE DEFAULT>'
+
 
   NeutronBigswitchDeployment:
     type: OS::Heat::StructuredDeployment
index 1456337..e7d0b83 100644 (file)
@@ -6,6 +6,14 @@ parameters:
   server:
     description: ID of the controller node to apply this config to
     type: string
+  NeutronBigswitchAgentEnabled:
+    description: The state of the neutron-bsn-agent service.
+    type: boolean
+    default: true
+  NeutronBigswitchLLDPEnabled:
+    description: The state of the neutron-bsn-lldp service.
+    type: boolean
+    default: false
   NeutronBigswitchRestproxyServers:
     description: 'Big Switch controllers ("IP:port,IP:port")'
     type: string
@@ -43,6 +51,8 @@ resources:
         datafiles:
           neutron_bigswitch_data:
             mapped_data:
+              neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
+              neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
               neutron::plugins::ml2::bigswitch::restproxy::servers: {get_input: restproxy_servers}
               neutron::plugins::ml2::bigswitch::restproxy::server_auth: {get_input: restproxy_server_auth}
               neutron::plugins::ml2::bigswitch::restproxy::auto_sync_on_failure: {get_input: restproxy_auto_sync_on_failure}
@@ -58,6 +68,8 @@ resources:
       config: {get_resource: NeutronBigswitchConfig}
       server: {get_param: server}
       input_values:
+        neutron_enable_bigswitch_agent: {get_param: NeutronBigswitchAgentEnabled}
+        neutron_enable_bigswitch_lldp: {get_param: NeutronBigswitchLLDPEnabled}
         restproxy_servers: {get_param: NeutronBigswitchRestproxyServers}
         restproxy_server_auth: {get_param: NeutronBigswitchRestproxyServerAuth }
         restproxy_auto_sync_on_failure: {get_param: NeutronBigswitchRestproxyAutoSyncOnFailure}
diff --git a/puppet/services/neutron-bigswitch-agent.yaml b/puppet/services/neutron-bigswitch-agent.yaml
new file mode 100644 (file)
index 0000000..845f0da
--- /dev/null
@@ -0,0 +1,31 @@
+heat_template_version: ocata
+
+description: >
+  Installs bigswitch agent and enables the services
+
+parameters:
+  ServiceNetMap:
+    default: {}
+    description: Mapping of service_name -> network name. Typically set
+                 via parameter_defaults in the resource registry.  This
+                 mapping overrides those in ServiceNetMapDefaults.
+    type: json
+  DefaultPasswords:
+    default: {}
+    type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+
+outputs:
+  role_data:
+    description: Configure the bigswitch agent services
+    value:
+      service_name: neutron_bigswitch_agent
+      step_config: |
+        if hiera('step') >= 4 {
+          include ::neutron::agents::bigswitch
+        }
diff --git a/releasenotes/notes/big-switch-agent-4c743a2112251234.yaml b/releasenotes/notes/big-switch-agent-4c743a2112251234.yaml
new file mode 100644 (file)
index 0000000..49ede20
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Updated bigswitch environment file to include the bigswitch agent
+    installation and correct support for the restproxy configuration.