aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrent Eagles <beagles@redhat.com>2016-06-21 11:08:27 -0230
committerBrent Eagles <beagles@redhat.com>2016-08-04 10:59:59 -0230
commitdeb098c29a2f9660bded6c44ba06f210cfde85f8 (patch)
tree406b67ef058cfc637c3837c19dfcdc1be5c2339b
parent70d1950c9476b16d58418d55247f68774b72aac7 (diff)
Add environment file to enable DVR
This patch adds support for conditionally enabling DVR by deploying the L3 and metadata agents on the compute node and setting the proper configuration values throughout. Implements: blueprint neutron-dvr-support Change-Id: I24099795e76ecd520c990ba49d3511288dec7a12
-rw-r--r--environments/neutron-ovs-dvr.yaml24
-rw-r--r--overcloud-resource-registry-puppet.yaml2
-rw-r--r--overcloud.yaml2
-rw-r--r--puppet/services/neutron-l3-compute-dvr.yaml37
-rw-r--r--puppet/services/neutron-l3.yaml10
-rw-r--r--puppet/services/neutron-ovs-agent.yaml6
-rw-r--r--puppet/services/neutron-server.yaml5
7 files changed, 86 insertions, 0 deletions
diff --git a/environments/neutron-ovs-dvr.yaml b/environments/neutron-ovs-dvr.yaml
new file mode 100644
index 00000000..223c2531
--- /dev/null
+++ b/environments/neutron-ovs-dvr.yaml
@@ -0,0 +1,24 @@
+# A Heat environment file that enables DVR in the overcloud.
+# This works by configuring L3 and Metadata agents on the
+# compute nodes.
+resource_registry:
+ OS::TripleO::Services::ComputeNeutronL3Agent: ../puppet/services/neutron-l3-compute-dvr.yaml
+ OS::TripleO::Services::ComputeNeutronMetadataAgent: ../puppet/services/neutron-metadata.yaml
+
+ # With DVR enabled, the Compute nodes also need the br-ex bridge to be
+ # connected to a physical network.
+ OS::TripleO::Compute::Net::SoftwareConfig: ../net-config-bridge.yaml
+
+parameter_defaults:
+
+ # DVR requires that the L2 population feature is enabled
+ NeutronMechanismDrivers: ['openvswitch', 'l2population']
+ NeutronEnableL2Pop: 'True'
+
+ # Setting NeutronEnableDVR enables distributed routing support in the
+ # ML2 plugin and agents that support this feature
+ NeutronEnableDVR: true
+
+ # We also need to set the proper agent mode for the L3 agent. This will only
+ # affect the agent on the controller node.
+ NeutronL3AgentMode: 'dvr_snat'
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index dc74e889..e1b418e0 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -197,6 +197,8 @@ resource_registry:
OS::Tripleo::Services::ManilaApi: OS::Heat::None
OS::Tripleo::Services::ManilaScheduler: OS::Heat::None
OS::Tripleo::Services::ManilaShare: OS::Heat::None
+ OS::TripleO::Services::ComputeNeutronL3Agent: OS::Heat::None
+ OS::TripleO::Services::ComputeNeutronMetadataAgent: OS::Heat::None
parameter_defaults:
EnablePackageInstall: false
diff --git a/overcloud.yaml b/overcloud.yaml
index 630ae21c..57265dbf 100644
--- a/overcloud.yaml
+++ b/overcloud.yaml
@@ -424,6 +424,8 @@ parameters:
- OS::TripleO::Services::ComputeNeutronCorePlugin
- OS::TripleO::Services::ComputeNeutronOvsAgent
- OS::TripleO::Services::ComputeCeilometerAgent
+ - OS::TripleO::Services::ComputeNeutronL3Agent
+ - OS::TripleO::Services::ComputeNeutronMetadataAgent
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 Compute Nodes.
diff --git a/puppet/services/neutron-l3-compute-dvr.yaml b/puppet/services/neutron-l3-compute-dvr.yaml
new file mode 100644
index 00000000..f10b5922
--- /dev/null
+++ b/puppet/services/neutron-l3-compute-dvr.yaml
@@ -0,0 +1,37 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Neutron L3 agent for DVR enabled compute nodes
+ configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ Debug:
+ type: string
+ default: ''
+ NeutronExternalNetworkBridge:
+ description: Name of bridge used for external network traffic.
+ type: string
+ default: 'br-ex'
+
+resources:
+
+ NeutronBase:
+ type: ./neutron-base.yaml
+
+outputs:
+ role_data:
+ description: Role data for DVR L3 Agent on Compute Nodes
+ value:
+ service_name: neutron_l3_compute_dvr
+ config_settings:
+ map_merge:
+ - get_attr: [NeutronBase, role_data, config_settings]
+ - neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
+ neutron::agents::l3::agent_mode : 'dvr'
+ step_config: |
+ include tripleo::profile::base::neutron::l3
diff --git a/puppet/services/neutron-l3.yaml b/puppet/services/neutron-l3.yaml
index a7232a39..ede41935 100644
--- a/puppet/services/neutron-l3.yaml
+++ b/puppet/services/neutron-l3.yaml
@@ -16,6 +16,15 @@ parameters:
description: Name of bridge used for external network traffic.
type: string
default: 'br-ex'
+ NeutronL3AgentMode:
+ description: |
+ Agent mode for L3 agent. Must be one of legacy or dvr_snat.
+ default: 'legacy'
+ type: string
+ constraints:
+ - allowed_values:
+ - legacy
+ - dvr_snat
resources:
@@ -32,5 +41,6 @@ outputs:
- get_attr: [NeutronBase, role_data, config_settings]
- neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
neutron::agents::l3::router_delete_namespaces: True
+ neutron::agents::l3::agent_mode : {get_param: NeutronL3AgentMode}
step_config: |
include tripleo::profile::base::neutron::l3
diff --git a/puppet/services/neutron-ovs-agent.yaml b/puppet/services/neutron-ovs-agent.yaml
index d8679f2e..7a97cd84 100644
--- a/puppet/services/neutron-ovs-agent.yaml
+++ b/puppet/services/neutron-ovs-agent.yaml
@@ -37,6 +37,11 @@ parameters:
description: |
Comma-separated list of extensions enabled for the Neutron agents.
type: comma_delimited_list
+ NeutronEnableDVR:
+ default: False
+ description: |
+ Enable support for distributed routing in the OVS Agent.
+ type: boolean
resources:
@@ -53,6 +58,7 @@ outputs:
- get_attr: [NeutronBase, role_data, config_settings]
neutron::agents::ml2::ovs::enable_tunneling: {get_param: NeutronEnableTunnelling}
neutron::agents::ml2::ovs::l2_population: {get_param: NeutronEnableL2Pop}
+ neutron::agents::ml2::ovs::enable_distributed_routing: {get_param: NeutronEnableDVR}
neutron::agents::ml2::ovs::bridge_mappings:
str_replace:
template: MAPPINGS
diff --git a/puppet/services/neutron-server.yaml b/puppet/services/neutron-server.yaml
index 1c7cef49..d64fd66d 100644
--- a/puppet/services/neutron-server.yaml
+++ b/puppet/services/neutron-server.yaml
@@ -29,6 +29,10 @@ parameters:
description: The password for the nova service and db account, used by nova-api.
type: string
hidden: true
+ NeutronEnableDVR:
+ description: Enable Neutron DVR.
+ default: false
+ type: boolean
resources:
@@ -85,5 +89,6 @@ outputs:
dport: 4789
'106 vrrp':
proto: vrrp
+ neutron::server::router_distributed: {get_param: NeutronEnableDVR}
step_config: |
include tripleo::profile::base::neutron::server