Quantum -> Neutron rename

This commit is contained in:
Florian Haas 2013-10-15 14:08:32 +02:00
parent e1450e6865
commit 44f073c766
30 changed files with 292 additions and 292 deletions

View File

@ -22,7 +22,7 @@ Kickstack requires a couple of other modules currently not yet
available on the Puppet Forge. You will have to fetch and install them
from GitHub:
* [`quantum`](https://github.com/stackforge/puppet-quantum), managing
* [`neutron`](https://github.com/stackforge/puppet-neutron), managing
OpenStack Networking,
* [`vswitch`](https://github.com/CiscoSystems/puppet-vswitch),
managing OpenVSwitch

View File

@ -25,7 +25,7 @@ class kickstack::horizon inherits kickstack {
cache_server_ip => '127.0.0.1',
cache_server_port => '11211',
swift => false,
quantum => true,
neutron => true,
keystone_host => $keystone_host,
keystone_default_role => 'Member',
django_debug => $django_debug,

View File

@ -41,20 +41,20 @@ class kickstack (
$cinder_lvm_vg = $kickstack::params::cinder_lvm_vg,
$cinder_rbd_pool = $kickstack::params::cinder_rbd_pool,
$cinder_rbd_user = $kickstack::params::cinder_rbd_user,
$quantum_network_type = $kickstack::params::quantum_network_type,
$quantum_plugin = $kickstack::params::quantum_plugin,
$quantum_physnet = $kickstack::params::quantum_physnet,
$quantum_tenant_network_type = $kickstack::params::quantum_tenant_network_type,
$quantum_network_vlan_ranges = $kickstack::params::quantum_network_vlan_ranges,
$quantum_tunnel_id_ranges = $kickstack::params::quantum_tunnel_id_ranges,
$quantum_integration_bridge = $kickstack::params::quantum_integration_bridge,
$quantum_tunnel_bridge = $kickstack::params::quantum_tunnel_bridge,
$quantum_external_bridge = $kickstack::params::quantum_external_bridge,
$neutron_network_type = $kickstack::params::neutron_network_type,
$neutron_plugin = $kickstack::params::neutron_plugin,
$neutron_physnet = $kickstack::params::neutron_physnet,
$neutron_tenant_network_type = $kickstack::params::neutron_tenant_network_type,
$neutron_network_vlan_ranges = $kickstack::params::neutron_network_vlan_ranges,
$neutron_tunnel_id_ranges = $kickstack::params::neutron_tunnel_id_ranges,
$neutron_integration_bridge = $kickstack::params::neutron_integration_bridge,
$neutron_tunnel_bridge = $kickstack::params::neutron_tunnel_bridge,
$neutron_external_bridge = $kickstack::params::neutron_external_bridge,
$nic_management = $kickstack::params::nic_management,
$nic_data = $kickstack::params::nic_data,
$nic_external = $kickstack::params::nic_external,
$quantum_router_id = $kickstack::params::quantum_router_id,
$quantum_gateway_external_network_id = $kickstack::params::quantum_gateway_external_network_id,
$neutron_router_id = $kickstack::params::neutron_router_id,
$neutron_gateway_external_network_id = $kickstack::params::neutron_gateway_external_network_id,
$nova_compute_driver = $kickstack::params::nova_compute_driver,
$nova_compute_libvirt_type = $kickstack::params::nova_compute_libvirt_type,
$xenapi_connection_url = $kickstack::params::xenapi_connection_url,

View File

@ -0,0 +1,16 @@
class kickstack::neutron::agent::dhcp inherits kickstack {
include kickstack::neutron::config
class { "::neutron::agents::dhcp":
debug => $::kickstack::debug,
interface_driver => $::kickstack::neutron_plugin ? {
'ovs' => 'neutron.agent.linux.interface.OVSInterfaceDriver',
'linuxbridge' => 'neutron.agent.linux.interface.BridgeInterfaceDriver'
},
use_namespaces => $::kickstack::neutron_network_type ? {
'per-tenant-router' => true,
default => false
}
}
}

View File

@ -1,29 +1,29 @@
class kickstack::quantum::agent::l2::compute inherits kickstack {
class kickstack::neutron::agent::l2::compute inherits kickstack {
include kickstack::quantum::config
include kickstack::neutron::config
$tenant_network_type = "$::kickstack::quantum_tenant_network_type"
$tenant_network_type = "$::kickstack::neutron_tenant_network_type"
case "$::kickstack::quantum_plugin" {
case "$::kickstack::neutron_plugin" {
'ovs': {
case $tenant_network_type {
'gre': {
$local_tunnel_ip = getvar("ipaddress_${nic_data}")
class { 'quantum::agents::ovs':
class { 'neutron::agents::ovs':
bridge_mappings => [],
bridge_uplinks => [],
integration_bridge => $::kickstack::quantum_integration_bridge,
integration_bridge => $::kickstack::neutron_integration_bridge,
enable_tunneling => true,
local_ip => $local_tunnel_ip,
tunnel_bridge => $::kickstack::quantum_tunnel_bridge,
tunnel_bridge => $::kickstack::neutron_tunnel_bridge,
}
}
default: {
$bridge_uplinks = ["br-${nic_data}:${nic_data}"]
class { 'quantum::agents::ovs':
bridge_mappings => ["${::kickstack::quantum_physnet}:br-${nic_data}"],
class { 'neutron::agents::ovs':
bridge_mappings => ["${::kickstack::neutron_physnet}:br-${nic_data}"],
bridge_uplinks => $bridge_uplinks,
integration_bridge => $::kickstack::quantum_integration_bridge,
integration_bridge => $::kickstack::neutron_integration_bridge,
enable_tunneling => false,
local_ip => '',
}
@ -31,7 +31,7 @@ class kickstack::quantum::agent::l2::compute inherits kickstack {
}
}
'linuxbridge': {
class { "quantum::agents::linuxbridge":
class { "neutron::agents::linuxbridge":
physical_interface_mappings => "default:$nic_data"
}
}

View File

@ -0,0 +1,49 @@
class kickstack::neutron::agent::l2::network inherits kickstack {
include kickstack::neutron::config
$tenant_network_type = "$::kickstack::neutron_tenant_network_type"
case "$::kickstack::neutron_plugin" {
'ovs': {
case $tenant_network_type {
'gre': {
$local_tunnel_ip = getvar("ipaddress_${nic_data}")
$bridge_uplinks = ["${::kickstack::neutron_external_bridge}:${nic_external}"]
# The neutron module creates bridge_uplinks only when
# bridge_mappings is non-empty. That's bogus for GRE
# configurations, so create the uplink anyway.
::neutron::plugins::ovs::port { "$bridge_uplinks": }
class { 'neutron::agents::ovs':
bridge_mappings => [],
bridge_uplinks => [],
integration_bridge => $::kickstack::neutron_integration_bridge,
enable_tunneling => true,
local_ip => $local_tunnel_ip,
tunnel_bridge => $::kickstack::neutron_tunnel_bridge,
require => Neutron::Plugins::Ovs::Port["$bridge_uplinks"]
}
}
default: {
$bridge_uplinks = ["br-${nic_data}:${nic_data}"]
unless $kickstack::neutron_network_type == 'single-flat' {
$bridge_uplinks += ["${::kickstack::neutron_external_bridge}:${nic_external}"]
}
class { 'neutron::agents::ovs':
bridge_mappings => ["${::kickstack::neutron_physnet}:br-${nic_data}"],
bridge_uplinks => $bridge_uplinks,
integration_bridge => $::kickstack::neutron_integration_bridge,
enable_tunneling => false,
local_ip => '',
}
}
}
}
'linuxbridge': {
class { "neutron::agents::linuxbridge":
physical_interface_mappings => "default:$nic_data"
}
}
}
}

View File

@ -0,0 +1,30 @@
class kickstack::neutron::agent::l3 inherits kickstack {
include kickstack::neutron::config
class { "vswitch::bridge":
name => 'br-ex'
}
class { "::neutron::agents::l3":
debug => $::kickstack::debug,
interface_driver => $::kickstack::neutron_plugin ? {
'ovs' => 'neutron.agent.linux.interface.OVSInterfaceDriver',
'linuxbridge' => 'neutron.agent.linux.interface.BridgeInterfaceDriver'
},
external_network_bridge => $::kickstack::neutron_external_bridge,
use_namespaces => $::kickstack::neutron_network_type ? {
'per-tenant-router' => true,
default => false
},
router_id => $::kickstack::neutron_network_type ? {
'provider-router' => "$::kickstack::neutron_router_id",
default => undef
},
gateway_external_network_id => $::kickstack::neutron_network_type ? {
'provider-router' => "$::kickstack::neutron_gateway_external_network_id",
default => undef
},
require => Class['vswitch::bridge']
}
}

View File

@ -1,19 +1,19 @@
class kickstack::quantum::agent::metadata inherits kickstack {
class kickstack::neutron::agent::metadata inherits kickstack {
include kickstack::quantum::config
include kickstack::neutron::config
$secret = getvar("${fact_prefix}quantum_metadata_shared_secret")
$secret = getvar("${fact_prefix}neutron_metadata_shared_secret")
$service_password = getvar("${fact_prefix}quantum_keystone_password")
$service_password = getvar("${fact_prefix}neutron_keystone_password")
$metadata_ip = getvar("${fact_prefix}nova_metadata_ip")
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
class { '::quantum::agents::metadata':
class { '::neutron::agents::metadata':
shared_secret => $secret,
auth_password => "$service_password",
debug => $kickstack::debug,
auth_tenant => "$kickstack::keystone_service_tenant",
auth_user => 'quantum',
auth_user => 'neutron',
auth_url => "http://${keystone_internal_address}:35357/v2.0",
auth_region => "$kickstack::keystone_region",
metadata_ip => $metadata_ip,

View File

@ -0,0 +1,5 @@
class kickstack::neutron::client inherits kickstack {
kickstack::client { 'neutron': }
}

View File

@ -1,14 +1,14 @@
class kickstack::quantum::config inherits kickstack {
class kickstack::neutron::config inherits kickstack {
$allow_overlapping_ips = "$::kickstack::quantum_network_type" ? {
$allow_overlapping_ips = "$::kickstack::neutron_network_type" ? {
'single-flat' => false,
'provider-router' => false,
'per-tenant-router' => true,
}
$core_plugin = "$::kickstack::quantum_plugin" ? {
'ovs' => 'quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2',
'linuxbridge'=> 'quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2'
$core_plugin = "$::kickstack::neutron_plugin" ? {
'ovs' => 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
'linuxbridge'=> 'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2'
}
case "$::kickstack::rpc" {
@ -16,8 +16,8 @@ class kickstack::quantum::config inherits kickstack {
$rabbit_host = getvar("${fact_prefix}rabbit_host")
$rabbit_password = getvar("${fact_prefix}rabbit_password")
if $rabbit_host and $rabbit_password {
class { 'quantum':
rpc_backend => 'quantum.openstack.common.rpc.impl_kombu',
class { 'neutron':
rpc_backend => 'neutron.openstack.common.rpc.impl_kombu',
rabbit_host => "$rabbit_host",
rabbit_virtual_host => "$::kickstack::rabbit_virtual_host",
rabbit_user => "$::kickstack::rabbit_userid",
@ -29,15 +29,15 @@ class kickstack::quantum::config inherits kickstack {
}
}
else {
warning("Facts ${fact_prefix}rabbit_host or ${fact_prefix}rabbit_password unset, cannot configure quantum")
warning("Facts ${fact_prefix}rabbit_host or ${fact_prefix}rabbit_password unset, cannot configure neutron")
}
}
"qpid": {
$qpid_hostname = getvar("${fact_prefix}qpid_hostname")
$qpid_password = getvar("${fact_prefix}rabbit_password")
if $qpid_hostname and $qpid_password {
class { 'quantum':
rpc_backend => 'quantum.openstack.common.rpc.impl_qpid',
class { 'neutron':
rpc_backend => 'neutron.openstack.common.rpc.impl_qpid',
qpid_hostname => "$qpid_hostname",
qpid_realm => "$::kickstack::qpid_realm",
qpid_username => "$::kickstack::qpid_username",
@ -49,7 +49,7 @@ class kickstack::quantum::config inherits kickstack {
}
}
else {
warning("Facts ${fact_prefix}qpid_hostname or ${fact_prefix}qpid_password unset, cannot configure quantum")
warning("Facts ${fact_prefix}qpid_hostname or ${fact_prefix}qpid_password unset, cannot configure neutron")
}
}
}

5
manifests/neutron/db.pp Normal file
View File

@ -0,0 +1,5 @@
class kickstack::neutron::db inherits kickstack {
kickstack::db { 'neutron': }
}

View File

@ -0,0 +1,39 @@
class kickstack::neutron::plugin inherits kickstack {
include kickstack::neutron::config
$sql_conn = getvar("${fact_prefix}neutron_sql_connection")
$tenant_network_type = "$::kickstack::neutron_tenant_network_type"
$network_vlan_ranges = $tenant_network_type ? {
'gre' => '',
default => "${::kickstack::neutron_physnet}:${::kickstack::neutron_network_vlan_ranges}",
}
$tunnel_id_ranges = $tenant_network_type ? {
'gre' => $::kickstack::neutron_tunnel_id_ranges,
default => '',
}
case "$::kickstack::neutron_plugin" {
'ovs': {
class { "neutron::plugins::ovs":
sql_connection => $sql_conn,
tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges,
tunnel_id_ranges => $tunnel_id_ranges
}
# This needs to be set for the plugin, not the agent
# (the latter is what the Neutron module assumes)
neutron_plugin_ovs { 'SECURITYGROUP/firewall_driver':
value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
require => Class['neutron::plugins::ovs']
}
}
'linuxbridge': {
class { "neutron::plugins::linuxbridge":
sql_connection => $sql_conn,
tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges,
}
}
}
}

View File

@ -0,0 +1,27 @@
class kickstack::neutron::server inherits kickstack {
include kickstack::neutron::config
include pwgen
$service_password = pick(getvar("${fact_prefix}neutron_keystone_password"),pwgen())
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
class { '::neutron::server':
auth_tenant => $kickstack::keystone_service_tenant,
auth_user => 'neutron',
auth_password => $service_password,
auth_host => $keystone_internal_address,
}
kickstack::endpoint { 'neutron':
service_password => $service_password,
require => Class['::neutron::server']
}
kickstack::exportfact::export { "neutron_host":
value => "${hostname}",
tag => 'neutron',
require => Class['::neutron::server']
}
}

View File

@ -3,7 +3,7 @@ class kickstack::node::api inherits kickstack {
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
$glance_sql_conn = getvar("${fact_prefix}glance_sql_connection")
$cinder_sql_conn = getvar("${fact_prefix}cinder_sql_connection")
$quantum_sql_conn = getvar("${fact_prefix}quantum_sql_connection")
$neutron_sql_conn = getvar("${fact_prefix}neutron_sql_connection")
$nova_sql_conn = getvar("${fact_prefix}nova_sql_connection")
@ -27,9 +27,9 @@ class kickstack::node::api inherits kickstack {
}
if $keystone_internal_address and $amqp_host and $amqp_password {
include kickstack::quantum::server
if $quantum_sql_conn {
include kickstack::quantum::plugin
include kickstack::neutron::server
if $neutron_sql_conn {
include kickstack::neutron::plugin
}
}
@ -37,11 +37,11 @@ class kickstack::node::api inherits kickstack {
include kickstack::nova::api
# This looks a bit silly, but is currently necessary: in order to configure nova-api
# as a Quantum client, we first need to install nova-api and quantum-server in one
# run, and then fix up Nova with the Quantum configuration in the next run.
$quantum_keystone_password = getvar("${::kickstack::fact_prefix}quantum_keystone_password")
if $quantum_keystone_password {
include kickstack::nova::quantumclient
# as a Neutron client, we first need to install nova-api and neutron-server in one
# run, and then fix up Nova with the Neutron configuration in the next run.
$neutron_keystone_password = getvar("${::kickstack::fact_prefix}neutron_keystone_password")
if $neutron_keystone_password {
include kickstack::nova::neutronclient
}
}
}

View File

@ -17,16 +17,16 @@ class kickstack::node::compute inherits kickstack {
$nova_sql_conn = getvar("${::kickstack::fact_prefix}nova_sql_connection")
$nova_keystone_password = getvar("${::kickstack::fact_prefix}nova_keystone_password")
$quantum_keystone_password = getvar("${::kickstack::fact_prefix}quantum_keystone_password")
$neutron_keystone_password = getvar("${::kickstack::fact_prefix}neutron_keystone_password")
$glance_api_host = getvar("${::kickstack::fact_prefix}glance_api_host")
if $amqp_host and $amqp_password {
include kickstack::quantum::agent::l2::compute
include kickstack::neutron::agent::l2::compute
if $nova_sql_conn and $nova_keystone_password and $glance_api_host {
include kickstack::nova::compute
}
if $quantum_keystone_password {
include kickstack::nova::quantumclient
if $neutron_keystone_password {
include kickstack::nova::neutronclient
}
}
}

View File

@ -7,8 +7,8 @@ class kickstack::node::controller inherits kickstack {
$cinder_keystone_password = getvar("${fact_prefix}cinder_keystone_password")
$nova_sql_conn = getvar("${fact_prefix}nova_sql_connection")
$nova_keystone_password = getvar("${fact_prefix}nova_keystone_password")
$quantum_sql_conn = getvar("${fact_prefix}quantum_sql_connection")
$quantum_keystone_password = getvar("${fact_prefix}quantum_keystone_password")
$neutron_sql_conn = getvar("${fact_prefix}neutron_sql_connection")
$neutron_keystone_password = getvar("${fact_prefix}neutron_keystone_password")
case $::kickstack::rpc {
'rabbitmq': {

View File

@ -6,7 +6,7 @@ class kickstack::node::infrastructure inherits kickstack {
include kickstack::keystone::db
include kickstack::glance::db
include kickstack::cinder::db
include kickstack::quantum::db
include kickstack::neutron::db
include kickstack::nova::db
}

View File

@ -1,6 +1,6 @@
class kickstack::node::network inherits kickstack {
# Network nodes require a quantum Keystone endpoint.
# Network nodes require a neutron Keystone endpoint.
# The L2 agents need an SQL connection.
# The metadata agent also requires the shared secret set by Nova API.
@ -18,18 +18,18 @@ class kickstack::node::network inherits kickstack {
}
}
$quantum_sql_conn = getvar("${::kickstack::fact_prefix}quantum_sql_connection")
$quantum_keystone_password = getvar("${::kickstack::fact_prefix}quantum_keystone_password")
$quantum_metadata_shared_secret = getvar("${::kickstack::fact_prefix}quantum_metadata_shared_secret")
$neutron_sql_conn = getvar("${::kickstack::fact_prefix}neutron_sql_connection")
$neutron_keystone_password = getvar("${::kickstack::fact_prefix}neutron_keystone_password")
$neutron_metadata_shared_secret = getvar("${::kickstack::fact_prefix}neutron_metadata_shared_secret")
if $amqp_host and $amqp_password and $quantum_keystone_password {
include kickstack::quantum::agent::dhcp
include kickstack::quantum::agent::l3
if $quantum_sql_conn {
include kickstack::quantum::agent::l2::network
if $amqp_host and $amqp_password and $neutron_keystone_password {
include kickstack::neutron::agent::dhcp
include kickstack::neutron::agent::l3
if $neutron_sql_conn {
include kickstack::neutron::agent::l2::network
}
if $quantum_metadata_shared_secret {
include kickstack::quantum::agent::metadata
if $neutron_metadata_shared_secret {
include kickstack::neutron::agent::metadata
}
}
}

View File

@ -7,7 +7,7 @@ class kickstack::nova::api inherits kickstack {
# Keystone accordingly. If no fact has been set, generate a password.
$admin_password = pick(getvar("${fact_prefix}nova_keystone_password"),pwgen())
$auth_host = getvar("${fact_prefix}keystone_internal_address")
$quantum_secret = pick(getvar("${fact_prefix}quantum_metadata_shared_secret"),pwgen())
$neutron_secret = pick(getvar("${fact_prefix}neutron_metadata_shared_secret"),pwgen())
# Stupid hack: Grizzly packages in Ubuntu Cloud Archive
# require python-eventlet > 0.9, but the python-nova
@ -24,7 +24,7 @@ class kickstack::nova::api inherits kickstack {
admin_user => 'nova',
admin_password => $admin_password,
enabled_apis => 'ec2,osapi_compute,metadata',
quantum_metadata_proxy_shared_secret => $quantum_secret
neutron_metadata_proxy_shared_secret => $neutron_secret
}
kickstack::endpoint { 'nova':
@ -33,14 +33,14 @@ class kickstack::nova::api inherits kickstack {
}
# Export the metadata API IP address and shared secret, to be picked up
# by the Quantum metadata proxy agent on the network node
# by the Neutron metadata proxy agent on the network node
kickstack::exportfact::export { "nova_metadata_ip":
value => getvar("ipaddress_${nic_management}"),
tag => "nova",
require => Class['::nova::api']
}
kickstack::exportfact::export { "quantum_metadata_shared_secret":
value => $quantum_secret,
kickstack::exportfact::export { "neutron_metadata_shared_secret":
value => $neutron_secret,
tag => 'nova',
require => Class['::nova::api']
}

View File

@ -3,8 +3,8 @@ class kickstack::nova::compute inherits kickstack {
include kickstack::nova::config
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
$quantum_admin_password = getvar("${fact_prefix}quantum_keystone_password")
$quantum_host = getvar("${fact_prefix}quantum_host")
$neutron_admin_password = getvar("${fact_prefix}neutron_keystone_password")
$neutron_host = getvar("${fact_prefix}neutron_host")
$vncproxy_host = getvar("${fact_prefix}vncproxy_host")
$vncserver_listen_address = getvar("ipaddress_${::kickstack::nic_management}")

View File

@ -0,0 +1,19 @@
class kickstack::nova::neutronclient inherits kickstack {
include kickstack::nova::config
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
$neutron_admin_password = getvar("${fact_prefix}neutron_keystone_password")
$neutron_host = getvar("${fact_prefix}neutron_host")
class { '::nova::network::neutron':
neutron_admin_password => $neutron_admin_password,
neutron_auth_strategy => 'keystone',
neutron_url => "http://${neutron_host}:9696",
neutron_admin_tenant_name => "$::kickstack::keystone_service_tenant",
neutron_region_name => "$::kickstack::keystone_region",
neutron_admin_username => 'neutron',
neutron_admin_auth_url => "http://${keystone_internal_address}:35357/v2.0",
security_group_api => 'neutron',
}
}

View File

@ -1,19 +0,0 @@
class kickstack::nova::quantumclient inherits kickstack {
include kickstack::nova::config
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
$quantum_admin_password = getvar("${fact_prefix}quantum_keystone_password")
$quantum_host = getvar("${fact_prefix}quantum_host")
class { '::nova::network::quantum':
quantum_admin_password => $quantum_admin_password,
quantum_auth_strategy => 'keystone',
quantum_url => "http://${quantum_host}:9696",
quantum_admin_tenant_name => "$::kickstack::keystone_service_tenant",
quantum_region_name => "$::kickstack::keystone_region",
quantum_admin_username => 'quantum',
quantum_admin_auth_url => "http://${keystone_internal_address}:35357/v2.0",
security_group_api => 'quantum',
}
}

View File

@ -131,57 +131,57 @@ class kickstack::params {
$cinder_rbd_user = pick(getvar("::${variable_prefix}cinder_rbd_pool"),
'cinder')
# The network type to configure for Quantum. See
# The network type to configure for Neutron. See
# http://docs.openstack.org/grizzly/openstack-network/admin/content/use_cases.html
# Supported:
# single-flat
# provider-router
# per-tenant-router (default)
$quantum_network_type = pick(getvar("::${variable_prefix}quantum_network_type"),
$neutron_network_type = pick(getvar("::${variable_prefix}neutron_network_type"),
'per-tenant-router')
# The plugin to use with Quantum.
# The plugin to use with Neutron.
# Supported:
# linuxbridge
# ovs (default)
$quantum_plugin = pick(getvar("::${variable_prefix}quantum_plugin"),
$neutron_plugin = pick(getvar("::${variable_prefix}neutron_plugin"),
'ovs')
# The tenant network type to use with the Quantum ovs and linuxbridge plugins
# The tenant network type to use with the Neutron ovs and linuxbridge plugins
# Supported: gre (default), flat, vlan
$quantum_tenant_network_type = pick(getvar("::${variable_prefix}quantum_tenant_network_type"),
$neutron_tenant_network_type = pick(getvar("::${variable_prefix}neutron_tenant_network_type"),
'gre')
# The Quantum physical network name to define (ignored if
# The Neutron physical network name to define (ignored if
# tenant_network_type=='gre'
$quantum_physnet = pick(getvar("::${variable_prefix}quantum_physnet"),
$neutron_physnet = pick(getvar("::${variable_prefix}neutron_physnet"),
'physnet1')
# The network VLAN ranges to use with the Quantum ovs and
# linuxbridge plugins (ignored unless quantum_tenant_network_type ==
# The network VLAN ranges to use with the Neutron ovs and
# linuxbridge plugins (ignored unless neutron_tenant_network_type ==
# 'vlan')
$quantum_network_vlan_ranges = pick(getvar("::${variable_prefix}quantum_network_vlan_ranges"),
$neutron_network_vlan_ranges = pick(getvar("::${variable_prefix}neutron_network_vlan_ranges"),
'2000:3999')
# The tunnel ID ranges to use with the Quantum ovs plugin, when in gre mode
# (ignored unless quantum_tenant_network_type == 'gre')
$quantum_tunnel_id_ranges = pick(getvar("::${variable_prefix}quantum_tunnel_id_ranges"),
# The tunnel ID ranges to use with the Neutron ovs plugin, when in gre mode
# (ignored unless neutron_tenant_network_type == 'gre')
$neutron_tunnel_id_ranges = pick(getvar("::${variable_prefix}neutron_tunnel_id_ranges"),
'1:1000')
# The Quantum integration bridge
# The Neutron integration bridge
# Default: br-int (normally doesn't need to be changed)
$quantum_integration_bridge = pick(getvar("::${variable_prefix}quantum_integration_bridge"),
$neutron_integration_bridge = pick(getvar("::${variable_prefix}neutron_integration_bridge"),
'br-int')
# The Quantum tunnel bridge (irrelevant unless
# $quantum_tenant_network_type=='gre')
# The Neutron tunnel bridge (irrelevant unless
# $neutron_tenant_network_type=='gre')
# Default: br-tun (normally doesn't need to be changed)
$quantum_tunnel_bridge = pick(getvar("::${variable_prefix}quantum_tunnel_bridge"),
$neutron_tunnel_bridge = pick(getvar("::${variable_prefix}neutron_tunnel_bridge"),
'br-tun')
# The Quantum external bridge
# The Neutron external bridge
# Default: br-ex (normally doesn't need to be changed)
$quantum_external_bridge = pick(getvar("::${variable_prefix}quantum_external_bridge"),
$neutron_external_bridge = pick(getvar("::${variable_prefix}neutron_external_bridge"),
'br-ex')
# The interface over which to run your nodes' management network traffic.
@ -202,13 +202,13 @@ class kickstack::params {
$nic_external = pick(getvar("::${variable_prefix}nic_external"),
'eth2')
# The Quantum router uuid (irrelevant unless
# $quantum_network_type=='provider_router')
$quantum_router_id = getvar("::${variable_prefix}quantum_router_id")
# The Neutron router uuid (irrelevant unless
# $neutron_network_type=='provider_router')
$neutron_router_id = getvar("::${variable_prefix}neutron_router_id")
# The Quantum external network uuid (irrelevant unless
# $quantum_network_type=='provider_router')
$quantum_gateway_external_network_id = getvar("::${variable_prefix}gateway_external_network_id")
# The Neutron external network uuid (irrelevant unless
# $neutron_network_type=='provider_router')
$neutron_gateway_external_network_id = getvar("::${variable_prefix}gateway_external_network_id")
# The nova-compute backend driver.
# Supported: libvirt (default), xenserver

View File

@ -1,16 +0,0 @@
class kickstack::quantum::agent::dhcp inherits kickstack {
include kickstack::quantum::config
class { "::quantum::agents::dhcp":
debug => $::kickstack::debug,
interface_driver => $::kickstack::quantum_plugin ? {
'ovs' => 'quantum.agent.linux.interface.OVSInterfaceDriver',
'linuxbridge' => 'quantum.agent.linux.interface.BridgeInterfaceDriver'
},
use_namespaces => $::kickstack::quantum_network_type ? {
'per-tenant-router' => true,
default => false
}
}
}

View File

@ -1,49 +0,0 @@
class kickstack::quantum::agent::l2::network inherits kickstack {
include kickstack::quantum::config
$tenant_network_type = "$::kickstack::quantum_tenant_network_type"
case "$::kickstack::quantum_plugin" {
'ovs': {
case $tenant_network_type {
'gre': {
$local_tunnel_ip = getvar("ipaddress_${nic_data}")
$bridge_uplinks = ["${::kickstack::quantum_external_bridge}:${nic_external}"]
# The quantum module creates bridge_uplinks only when
# bridge_mappings is non-empty. That's bogus for GRE
# configurations, so create the uplink anyway.
::quantum::plugins::ovs::port { "$bridge_uplinks": }
class { 'quantum::agents::ovs':
bridge_mappings => [],
bridge_uplinks => [],
integration_bridge => $::kickstack::quantum_integration_bridge,
enable_tunneling => true,
local_ip => $local_tunnel_ip,
tunnel_bridge => $::kickstack::quantum_tunnel_bridge,
require => Quantum::Plugins::Ovs::Port["$bridge_uplinks"]
}
}
default: {
$bridge_uplinks = ["br-${nic_data}:${nic_data}"]
unless $kickstack::quantum_network_type == 'single-flat' {
$bridge_uplinks += ["${::kickstack::quantum_external_bridge}:${nic_external}"]
}
class { 'quantum::agents::ovs':
bridge_mappings => ["${::kickstack::quantum_physnet}:br-${nic_data}"],
bridge_uplinks => $bridge_uplinks,
integration_bridge => $::kickstack::quantum_integration_bridge,
enable_tunneling => false,
local_ip => '',
}
}
}
}
'linuxbridge': {
class { "quantum::agents::linuxbridge":
physical_interface_mappings => "default:$nic_data"
}
}
}
}

View File

@ -1,30 +0,0 @@
class kickstack::quantum::agent::l3 inherits kickstack {
include kickstack::quantum::config
class { "vswitch::bridge":
name => 'br-ex'
}
class { "::quantum::agents::l3":
debug => $::kickstack::debug,
interface_driver => $::kickstack::quantum_plugin ? {
'ovs' => 'quantum.agent.linux.interface.OVSInterfaceDriver',
'linuxbridge' => 'quantum.agent.linux.interface.BridgeInterfaceDriver'
},
external_network_bridge => $::kickstack::quantum_external_bridge,
use_namespaces => $::kickstack::quantum_network_type ? {
'per-tenant-router' => true,
default => false
},
router_id => $::kickstack::quantum_network_type ? {
'provider-router' => "$::kickstack::quantum_router_id",
default => undef
},
gateway_external_network_id => $::kickstack::quantum_network_type ? {
'provider-router' => "$::kickstack::quantum_gateway_external_network_id",
default => undef
},
require => Class['vswitch::bridge']
}
}

View File

@ -1,5 +0,0 @@
class kickstack::quantum::client inherits kickstack {
kickstack::client { 'quantum': }
}

View File

@ -1,5 +0,0 @@
class kickstack::quantum::db inherits kickstack {
kickstack::db { 'quantum': }
}

View File

@ -1,39 +0,0 @@
class kickstack::quantum::plugin inherits kickstack {
include kickstack::quantum::config
$sql_conn = getvar("${fact_prefix}quantum_sql_connection")
$tenant_network_type = "$::kickstack::quantum_tenant_network_type"
$network_vlan_ranges = $tenant_network_type ? {
'gre' => '',
default => "${::kickstack::quantum_physnet}:${::kickstack::quantum_network_vlan_ranges}",
}
$tunnel_id_ranges = $tenant_network_type ? {
'gre' => $::kickstack::quantum_tunnel_id_ranges,
default => '',
}
case "$::kickstack::quantum_plugin" {
'ovs': {
class { "quantum::plugins::ovs":
sql_connection => $sql_conn,
tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges,
tunnel_id_ranges => $tunnel_id_ranges
}
# This needs to be set for the plugin, not the agent
# (the latter is what the Quantum module assumes)
quantum_plugin_ovs { 'SECURITYGROUP/firewall_driver':
value => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
require => Class['quantum::plugins::ovs']
}
}
'linuxbridge': {
class { "quantum::plugins::linuxbridge":
sql_connection => $sql_conn,
tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges,
}
}
}
}

View File

@ -1,27 +0,0 @@
class kickstack::quantum::server inherits kickstack {
include kickstack::quantum::config
include pwgen
$service_password = pick(getvar("${fact_prefix}quantum_keystone_password"),pwgen())
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
class { '::quantum::server':
auth_tenant => $kickstack::keystone_service_tenant,
auth_user => 'quantum',
auth_password => $service_password,
auth_host => $keystone_internal_address,
}
kickstack::endpoint { 'quantum':
service_password => $service_password,
require => Class['::quantum::server']
}
kickstack::exportfact::export { "quantum_host":
value => "${hostname}",
tag => 'quantum',
require => Class['::quantum::server']
}
}