Merge "PLUMgrid Neutron integration"

This commit is contained in:
Jenkins 2016-03-29 19:19:41 +00:00 committed by Gerrit Code Review
commit e47ac07d4f
6 changed files with 176 additions and 3 deletions

View File

@ -0,0 +1,29 @@
# A Heat environment file which can be used to enable PLUMgrid
# extensions, configured via puppet
resource_registry:
OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-plumgrid.yaml
parameter_defaults:
NeutronCorePlugin: networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2
PLUMgridDirectorServer: 127.0.0.1
PLUMgridDirectorServerPort: 443
PLUMgridUsername: username
PLUMgridPassword: password
PLUMgridServerTimeOut: 99
PLUMgridNovaMetadataIP: 169.254.169.254
PLUMgridNovaMetadataPort: 8775
PLUMgridL2GatewayVendor: vendor
PLUMgridL2GatewayUsername: username
PLUMgridL2GatewayPassword: password
PLUMgridIdentityVersion: v2.0
PLUMgridConnectorType: distributed
#Optional Parameters
#PLUMgridNeutronPluginVersion: present
#PLUMgridPlumlibVersion: present
# PLUMgrid doesn't require dhcp, l3, ovs and metadata agents
NeutronEnableDHCPAgent: false
NeutronEnableL3Agent: false
NeutronEnableMetadataAgent: false
NeutronEnableOVSAgent: false

View File

@ -1314,6 +1314,7 @@ resources:
- neutron_nuage_data # Optionally provided by ControllerExtraConfigPre
- midonet_data #Optionally provided by AllNodesExtraConfig
- neutron_opencontrail_data # Optionally provided by ControllerExtraConfigPre
- neutron_plumgrid_data # Optionally provided by ControllerExtraConfigPre
datafiles:
controller_extraconfig:
mapped_data: {get_param: ControllerExtraConfig}

View File

@ -0,0 +1,113 @@
heat_template_version: 2015-04-30
description: Controller hieradata for Neutron PLUMgrid configuration
parameters:
server:
description: ID of the controller node to apply this config to
type: string
PLUMgridDirectorServer:
description: IP address of the PLUMgrid Director Server
type: string
default: 127.0.0.1
PLUMgridDirectorServerPort:
description: Port of the PLUMgrid Director Server
type: string
default: 443
PLUMgridUsername:
description: Username for PLUMgrid platform
type: string
PLUMgridPassword:
description: Password for PLUMgrid platform
type: string
hidden: true
PLUMgridServerTimeOut:
description: Request timeout duration (seconds) to PLUMgrid platform
type: string
default: 99
PLUMgridNovaMetadataIP:
description: IP address of Nova Metadata
type: string
default: 169.254.169.254
PLUMgridNovaMetadataPort:
description: Port of Nova Metadata
type: string
default: 8775
PLUMgridL2GatewayVendor:
description: Vendor for L2 Gateway Switch
type: string
default: vendor
PLUMgridL2GatewayUsername:
description: Username for L2 Gateway Switch
type: string
default: username
PLUMgridL2GatewayPassword:
description: Password for L2 Gateway Switch
type: string
hidden: true
PLUMgridIdentityVersion:
description: Keystone Identity version
type: string
default: v2.0
PLUMgridConnectorType:
description: Neutron Network Connector Type
type: string
default: distributed
PLUMgridNeutronPluginVersion:
description: PLUMgrid Neutron Plugin version
type: string
default: present
PLUMgridPlumlibVersion:
description: PLUMgrid Plumlib version
type: string
default: present
resources:
ControllerPLUMgridConfig:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
hiera:
datafiles:
neutron_plumgrid_data:
mapped_data:
neutron::plugins::plumgrid::director_server: {get_input: plumgrid_director_server}
neutron::plugins::plumgrid::director_server_port: {get_input: plumgrid_director_server_port}
neutron::plugins::plumgrid::username: {get_input: plumgrid_username}
neutron::plugins::plumgrid::password: {get_input: plumgrid_password}
neutron::plugins::plumgrid::nova_metadata_ip: {get_input: plumgrid_nova_metadata_ip}
neutron::plugins::plumgrid::nova_metadata_port: {get_input: plumgrid_nova_metadata_port}
neutron::plugins::plumgrid::l2gateway_vendor: {get_input: plumgrid_l2gateway_vendor}
neutron::plugins::plumgrid::l2gateway_sw_username: {get_input: plumgrid_l2gateway_sw_username}
neutron::plugins::plumgrid::l2gateway_sw_password: {get_input: plumgrid_l2gateway_sw_password}
neutron::plugins::plumgrid::connector_type: {get_input: plumgrid_connector_type}
neutron::plugins::plumgrid::identity_version: {get_input: plumgrid_identity_version}
neutron::plugins::plumgrid::package_ensure: {get_input: plumgrid_neutron_plugin_version}
neutron::plugins::plumgrid::plumlib_package_ensure: {get_input: plumgrid_plumlib_version}
ControllerPLUMgridDeployment:
type: OS::Heat::StructuredDeployment
properties:
config: {get_resource: ControllerPLUMgridConfig}
server: {get_param: server}
input_values:
plumgrid_director_server: {get_param: PLUMgridDirectorServer}
plumgrid_director_server_port: {get_param: PLUMgridDirectorServerPort}
plumgrid_username: {get_param: PLUMgridUsername}
plumgrid_password: {get_param: PLUMgridPassword}
plumgrid_nova_metadata_ip: {get_param: PLUMgridNovaMetadataIP}
plumgrid_nova_metadata_port: {get_param: PLUMgridNovaMetadataPort}
plumgrid_l2gateway_vendor: {get_param: PLUMgridL2GatewayVendor}
plumgrid_l2gateway_sw_username: {get_param: PLUMgridL2GatewayUsername}
plumgrid_l2gateway_sw_password: {get_param: PLUMgridL2GatewayPassword}
plumgrid_identity_version: {get_param: PLUMgridIdentityVersion}
plumgrid_connector_type: {get_param: PLUMgridConnectorType}
plumgrid_neutron_plugin_version: {get_param: PLUMgridNeutronPluginVersion}
plumgrid_plumlib_version: {get_param: PLUMgridPlumlibVersion}
outputs:
deploy_stdout:
description: Deployment reference, used to trigger puppet apply on changes
value: {get_attr: [ControllerPLUMgridDeployment, deploy_stdout]}

View File

@ -152,6 +152,20 @@ elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencont
# require => Class['contrail::vrouter'],
#}
}
elsif hiera('neutron::core_plugin') == 'networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2' {
# forward all ipv4 traffic
# this is required for the vms to pass through the gateways public interface
sysctl::value { 'net.ipv4.ip_forward': value => '1' }
# ifc_ctl_pp needs to be invoked by root as part of the vif.py when a VM is powered on
file { '/etc/sudoers.d/ifc_ctl_sudoers':
ensure => file,
owner => root,
group => root,
mode => '0440',
content => "nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *\n",
}
}
else {
include ::neutron::plugins::ml2

View File

@ -344,13 +344,21 @@ if hiera('step') >= 4 {
include ::neutron::server
include ::neutron::server::notifications
# If the value of core plugin is set to 'nuage' or 'opencontrail',
# include nuage or opencontrail core plugins, and it does not
# need the l3, dhcp and metadata agents
# If the value of core plugin is set to 'nuage' or'opencontrail' or 'plumgrid',
# include nuage or opencontrail or plumgrid core plugins
# else use the default value of 'ml2'
if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
include ::neutron::plugins::nuage
} elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' {
include ::neutron::plugins::opencontrail
}
elsif hiera('neutron::core_plugin') == 'networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2' {
class { '::neutron::plugins::plumgrid' :
connection => hiera('neutron::server::database_connection'),
controller_priv_host => hiera('keystone_admin_api_vip'),
admin_password => hiera('admin_password'),
metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
}
} else {
include ::neutron::agents::l3
include ::neutron::agents::dhcp

View File

@ -792,6 +792,14 @@ if hiera('step') >= 4 {
keystone_password => hiera('neutron::server::auth_password')
}
}
if hiera('neutron::core_plugin') == 'networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2' {
class { '::neutron::plugins::plumgrid' :
connection => hiera('neutron::server::database_connection'),
controller_priv_host => hiera('keystone_admin_api_vip'),
admin_password => hiera('admin_password'),
metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
}
}
if hiera('neutron::enable_dhcp_agent',true) {
class { '::neutron::agents::dhcp' :
manage_service => false,