Changes for configuring Nuage

Added ExtraConfig templates and environment files for Nuage specific parameters.
Modified overcloud_compute.pp and overcloud_controller.pp to conditionally
include Nuage plugin and agents.

Change-Id: I95510c753b0a262c73566481f9e94279970f4a4f
This commit is contained in:
Lokesh Jain 2015-10-01 15:57:57 -04:00
parent fdc2359e45
commit ee9b8f3a5d
8 changed files with 227 additions and 62 deletions

View File

@ -0,0 +1,14 @@
# A Heat environment file which can be used to enable a
# a Neutron Nuage backend on the controller, configured via puppet
resource_registry:
OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-nuage.yaml
parameter_defaults:
NeutronNuageOSControllerIp: '0.0.0.0'
NeutronNuageNetPartitionName: 'default_name'
NeutronNuageVSDIp: '0.0.0.0:0'
NeutronNuageVSDUsername: 'username'
NeutronNuageVSDPassword: 'password'
NeutronNuageVSDOrganization: 'organization'
NeutronNuageBaseURIVersion: 'default_uri_version'
NeutronNuageCMSId: ''

View File

@ -0,0 +1,8 @@
# A Heat environment file which can be used to enable
# Nuage backend on the compute, configured via puppet
resource_registry:
OS::TripleO::ComputeExtraConfigPre: ../puppet/extraconfig/pre_deploy/compute/nova-nuage.yaml
parameter_defaults:
NuageActiveController: '0.0.0.0'
NuageStandbyController: '0.0.0.0'

View File

@ -375,6 +375,7 @@ resources:
- '"%{::osfamily}"' - '"%{::osfamily}"'
- common - common
- cisco_n1kv_data # Optionally provided by ComputeExtraConfigPre - cisco_n1kv_data # Optionally provided by ComputeExtraConfigPre
- nova_nuage_data # Optionally provided by ComputeExtraConfigPre
datafiles: datafiles:
compute_extraconfig: compute_extraconfig:
mapped_data: {get_param: NovaComputeExtraConfig} mapped_data: {get_param: NovaComputeExtraConfig}

View File

@ -1035,6 +1035,7 @@ resources:
- neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre - neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre
- neutron_cisco_data # Optionally provided by ControllerExtraConfigPre - neutron_cisco_data # Optionally provided by ControllerExtraConfigPre
- cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre - cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre
- neutron_nuage_data # Optionally provided by ControllerExtraConfigPre
datafiles: datafiles:
controller_extraconfig: controller_extraconfig:
mapped_data: {get_param: ControllerExtraConfig} mapped_data: {get_param: ControllerExtraConfig}

View File

@ -0,0 +1,42 @@
heat_template_version: 2015-04-30
description: Configure hieradata for Nuage configuration on the Compute
parameters:
server:
description: ID of the compute node to apply this config to
type: string
NuageActiveController:
description: IP address of the Active Virtualized Services Controller (VSC)
type: string
NuageStandbyController:
description: IP address of the Standby Virtualized Services Controller (VSC)
type: string
resources:
NovaNuageConfig:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
hiera:
datafiles:
nova_nuage_data:
mapped_data:
nuage::vrs::active_controller: {get_input: ActiveController}
nuage::vrs::standby_controller: {get_input: StandbyController}
NovaNuageDeployment:
type: OS::Heat::StructuredDeployment
properties:
config: {get_resource: NovaNuageConfig}
server: {get_param: server}
input_values:
ActiveController: {get_param: NuageActiveController}
StandbyController: {get_param: NuageStandbyController}
outputs:
deploy_stdout:
description: Deployment reference, used to trigger puppet apply on changes
value: {get_attr: [NovaNuageDeployment, deploy_stdout]}

View File

@ -0,0 +1,83 @@
heat_template_version: 2015-04-30
description: Configure hieradata for Nuage configuration on the Controller
parameters:
server:
description: ID of the controller node to apply this config to
type: string
# Config specific parameters, to be provided via parameter_defaults
NeutronNuageOSControllerIp:
description: IP address of the OpenStack Controller
type: string
NeutronNuageNetPartitionName:
description: Specifies the title that you will see on the VSD
type: string
default: 'default_name'
NeutronNuageVSDIp:
description: IP address and port of the Virtual Services Directory
type: string
NeutronNuageVSDUsername:
description: Username to be used to log into VSD
type: string
NeutronNuageVSDPassword:
description: Password to be used to log into VSD
type: string
NeutronNuageVSDOrganization:
description: Organization parameter required to log into VSD
type: string
default: 'organization'
NeutronNuageBaseURIVersion:
description: URI version to be used based on the VSD release
type: string
default: 'default_uri_version'
NeutronNuageCMSId:
description: Cloud Management System ID (CMS ID) to distinguish between OS instances on the same VSD
type: string
resources:
NeutronNuageConfig:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
hiera:
datafiles:
neutron_nuage_data:
mapped_data:
neutron::plugins::nuage::nuage_oscontroller_ip: {get_input: NuageOSControllerIp}
neutron::plugins::nuage::nuage_net_partition_name: {get_input: NuageNetPartitionName}
neutron::plugins::nuage::nuage_vsd_ip: {get_input: NuageVSDIp}
neutron::plugins::nuage::nuage_vsd_username: {get_input: NuageVSDUsername}
neutron::plugins::nuage::nuage_vsd_password: {get_input: NuageVSDPassword}
neutron::plugins::nuage::nuage_vsd_organization: {get_input: NuageVSDOrganization}
neutron::plugins::nuage::nuage_base_uri_version: {get_input: NuageBaseURIVersion}
neutron::plugins::nuage::nuage_cms_id: {get_input: NuageCMSId}
NeutronNuageDeployment:
type: OS::Heat::StructuredDeployment
properties:
config: {get_resource: NeutronNuageConfig}
server: {get_param: server}
input_values:
NuageOSControllerIp: {get_param: NeutronNuageOSControllerIp}
NuageNetPartitionName: {get_param: NeutronNuageNetPartitionName}
NuageVSDIp: {get_param: NeutronNuageVSDIp}
NuageVSDUsername: {get_param: NeutronNuageVSDUsername}
NuageVSDPassword: {get_param: NeutronNuageVSDPassword}
NuageVSDOrganization: {get_param: NeutronNuageVSDOrganization}
NuageBaseURIVersion: {get_param: NeutronNuageBaseURIVersion}
NuageCMSId: {get_param: NeutronNuageCMSId}
outputs:
deploy_stdout:
description: Deployment reference, used to trigger puppet apply on changes
value: {get_attr: [NeutronNuageDeployment, deploy_stdout]}

View File

@ -71,20 +71,28 @@ include ::nova::compute::libvirt
include ::nova::network::neutron include ::nova::network::neutron
include ::neutron include ::neutron
class { '::neutron::plugins::ml2': # If the value of core plugin is set to 'nuage',
flat_networks => split(hiera('neutron_flat_networks'), ','), # include nuage agent,
tenant_network_types => [hiera('neutron_tenant_network_type')], # else use the default value of 'ml2'
} if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
include ::nuage::vrs
include ::nova::compute::neutron
} else {
class { '::neutron::plugins::ml2':
flat_networks => split(hiera('neutron_flat_networks'), ','),
tenant_network_types => [hiera('neutron_tenant_network_type')],
}
class { '::neutron::agents::ml2::ovs': class { '::neutron::agents::ml2::ovs':
bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
tunnel_types => split(hiera('neutron_tunnel_types'), ','), tunnel_types => split(hiera('neutron_tunnel_types'), ','),
} }
if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') { if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
class { '::neutron::agents::n1kv_vem': class { '::neutron::agents::n1kv_vem':
n1kv_source => hiera('n1kv_vem_source', undef), n1kv_source => hiera('n1kv_vem_source', undef),
n1kv_version => hiera('n1kv_vem_version', undef), n1kv_version => hiera('n1kv_vem_version', undef),
}
} }
} }

View File

@ -233,64 +233,72 @@ if hiera('step') >= 3 {
include ::neutron include ::neutron
include ::neutron::server include ::neutron::server
include ::neutron::server::notifications include ::neutron::server::notifications
include ::neutron::agents::l3
include ::neutron::agents::dhcp
include ::neutron::agents::metadata
file { '/etc/neutron/dnsmasq-neutron.conf': # If the value of core plugin is set to 'nuage',
content => hiera('neutron_dnsmasq_options'), # include nuage core plugin,
owner => 'neutron', # else use the default value of 'ml2'
group => 'neutron', if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
notify => Service['neutron-dhcp-service'], include ::neutron::plugins::nuage
require => Package['neutron'], } else {
} include ::neutron::agents::l3
include ::neutron::agents::dhcp
include ::neutron::agents::metadata
class { '::neutron::plugins::ml2': file { '/etc/neutron/dnsmasq-neutron.conf':
flat_networks => split(hiera('neutron_flat_networks'), ','), content => hiera('neutron_dnsmasq_options'),
tenant_network_types => [hiera('neutron_tenant_network_type')], owner => 'neutron',
mechanism_drivers => [hiera('neutron_mechanism_drivers')], group => 'neutron',
} notify => Service['neutron-dhcp-service'],
class { '::neutron::agents::ml2::ovs': require => Package['neutron'],
bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
tunnel_types => split(hiera('neutron_tunnel_types'), ','),
}
if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::nexus1000v
class { '::neutron::agents::n1kv_vem':
n1kv_source => hiera('n1kv_vem_source', undef),
n1kv_version => hiera('n1kv_vem_version', undef),
} }
class { '::n1k_vsm': class { '::neutron::plugins::ml2':
n1kv_source => hiera('n1kv_vsm_source', undef), flat_networks => split(hiera('neutron_flat_networks'), ','),
n1kv_version => hiera('n1kv_vsm_version', undef), tenant_network_types => [hiera('neutron_tenant_network_type')],
pacemaker_control => false, mechanism_drivers => [hiera('neutron_mechanism_drivers')],
} }
} class { '::neutron::agents::ml2::ovs':
bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
tunnel_types => split(hiera('neutron_tunnel_types'), ','),
}
if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::nexus1000v
if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') { class { '::neutron::agents::n1kv_vem':
include ::neutron::plugins::ml2::cisco::ucsm n1kv_source => hiera('n1kv_vem_source', undef),
} n1kv_version => hiera('n1kv_vem_version', undef),
if 'cisco_nexus' in hiera('neutron_mechanism_drivers') { }
include ::neutron::plugins::ml2::cisco::nexus
include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
}
if hiera('neutron_enable_bigswitch_ml2', false) { class { '::n1k_vsm':
include ::neutron::plugins::ml2::bigswitch::restproxy n1kv_source => hiera('n1kv_vsm_source', undef),
} n1kv_version => hiera('n1kv_vsm_version', undef),
neutron_l3_agent_config { pacemaker_control => false,
'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); }
} }
neutron_dhcp_agent_config {
'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
}
Service['neutron-server'] -> Service['neutron-dhcp-service'] if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
Service['neutron-server'] -> Service['neutron-l3'] include ::neutron::plugins::ml2::cisco::ucsm
Service['neutron-server'] -> Service['neutron-ovs-agent-service'] }
Service['neutron-server'] -> Service['neutron-metadata'] if 'cisco_nexus' in hiera('neutron_mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::nexus
include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
}
if hiera('neutron_enable_bigswitch_ml2', false) {
include ::neutron::plugins::ml2::bigswitch::restproxy
}
neutron_l3_agent_config {
'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
}
neutron_dhcp_agent_config {
'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
}
Service['neutron-server'] -> Service['neutron-dhcp-service']
Service['neutron-server'] -> Service['neutron-l3']
Service['neutron-server'] -> Service['neutron-ovs-agent-service']
Service['neutron-server'] -> Service['neutron-metadata']
}
include ::cinder include ::cinder
include ::cinder::api include ::cinder::api