Quantum to Neutron rename

Change-Id: I756615e8ed821e3ab95e23438a394e5c5b3a095d
This commit is contained in:
Terry Wilson
2013-08-06 11:03:31 -05:00
committed by Dan Bode
parent 8840838298
commit 54a15b7685
26 changed files with 378 additions and 378 deletions

View File

@@ -6,7 +6,7 @@ fixtures:
"glance": "git://github.com/stackforge/puppet-glance.git" "glance": "git://github.com/stackforge/puppet-glance.git"
'horizon': 'git://github.com/stackforge/puppet-horizon' 'horizon': 'git://github.com/stackforge/puppet-horizon'
'swift' : 'git://github.com/stackforge/puppet-swift' 'swift' : 'git://github.com/stackforge/puppet-swift'
'quantum': 'git://github.com/stackforge/puppet-quantum' 'neutron': 'git://github.com/stackforge/puppet-quantum'
'ceilometer' : 'git://github.com/stackforge/puppet-ceilometer' 'ceilometer' : 'git://github.com/stackforge/puppet-ceilometer'
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git" "apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"apache": "apache":

View File

@@ -7,7 +7,7 @@ mod 'puppetlabs/horizon', :git => 'git://github.com/stackforge/puppet-horizon'
mod 'puppetlabs/swift', :git => 'git://github.com/stackforge/puppet-swift' mod 'puppetlabs/swift', :git => 'git://github.com/stackforge/puppet-swift'
mod 'puppetlabs/cinder', :git => 'git://github.com/stackforge/puppet-cinder' mod 'puppetlabs/cinder', :git => 'git://github.com/stackforge/puppet-cinder'
mod 'puppetlabs/tempest', :git => 'git://github.com/stackforge/puppet-tempest' mod 'puppetlabs/tempest', :git => 'git://github.com/stackforge/puppet-tempest'
mod 'puppet/quantum', :git => 'git://github.com/stackforge/puppet-quantum/' mod 'stackforge/neutron', :git => 'git://github.com/stackforge/puppet-quantum/'
# openstack middleware # openstack middleware
mod 'puppet/vswitch', :git => 'git://github.com/bodepd/puppet-vswitch' mod 'puppet/vswitch', :git => 'git://github.com/bodepd/puppet-vswitch'
mod 'puppetlabs/rabbitmq', mod 'puppetlabs/rabbitmq',

View File

@@ -153,7 +153,7 @@ class { 'openstack::all':
libvirt_type => 'kvm', libvirt_type => 'kvm',
fixed_range => '10.0.0.0/24', fixed_range => '10.0.0.0/24',
secret_key => '12345', secret_key => '12345',
quantum => false, neutron => false,
} }
``` ```
@@ -199,7 +199,7 @@ class { 'openstack::controller':
rabbit_password => 'rabbit_password', rabbit_password => 'rabbit_password',
rabbit_user => 'rabbit_user', rabbit_user => 'rabbit_user',
secret_key => '12345', secret_key => '12345',
quantum => false, neutron => false,
} }
``` ```
@@ -233,7 +233,7 @@ class { 'openstack::compute':
vncproxy_host => '192.168.101.10', vncproxy_host => '192.168.101.10',
vnc_enabled => true, vnc_enabled => true,
manage_volumes => true, manage_volumes => true,
quantum => false, neutron => false,
} }
``` ```
@@ -539,7 +539,7 @@ Release Notes
**2.0.0** **2.0.0**
* Upstream is now part of stackfoge. * Upstream is now part of stackfoge.
* Initial support for the utilization of the quantum module. * Initial support for the utilization of the neutron module.
* Ability to set vncproxy host. * Ability to set vncproxy host.
* Refactors of db connections for compute. * Refactors of db connections for compute.
* Refactor of glance and cinder related classes. * Refactor of glance and cinder related classes.

View File

@@ -44,20 +44,20 @@
# [cache_server_ip] local memcached instance ip # [cache_server_ip] local memcached instance ip
# [cache_server_port] local memcached instance port # [cache_server_port] local memcached instance port
# [horizon] (bool) is horizon installed. Defaults to: true # [horizon] (bool) is horizon installed. Defaults to: true
# [quantum] (bool) is quantum installed # [neutron] (bool) is neutron installed
# The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps.
# There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose.
# Each app is defined in two parts, the display name, and the URI # Each app is defined in two parts, the display name, and the URI
# [metadata_shared_secret] # [metadata_shared_secret]
# Shared secret used by nova and quantum to authenticate metadata. # Shared secret used by nova and neutron to authenticate metadata.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# [firewall_driver] # [firewall_driver]
# Driver used to implement firewall rules. # Driver used to implement firewall rules.
# (optional) Defaults to 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. # (optional) Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'.
# #
# [quantum_auth_url] # [neutron_auth_url]
# Url used to quantum to contact the authentication service. # Url used to neutron to contact the authentication service.
# (optional) Default to http://127.0.0.1:35357/v2.0. # (optional) Default to http://127.0.0.1:35357/v2.0.
# #
# [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]' # [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]'
@@ -92,8 +92,8 @@
# admin_password => 'changeme', # admin_password => 'changeme',
# rabbit_password => 'changeme', # rabbit_password => 'changeme',
# keystone_admin_token => 'changeme', # keystone_admin_token => 'changeme',
# quantum_user_password => 'changeme', # neutron_user_password => 'changeme',
# quantum_db_password => 'changeme', # neutron_db_password => 'changeme',
# secret_key => 'dummy_secret_key', # secret_key => 'dummy_secret_key',
# bridge_interface => 'eth0', # bridge_interface => 'eth0',
# metadata_shared_secret => 'shared_md_secret', # metadata_shared_secret => 'shared_md_secret',
@@ -116,10 +116,10 @@ class openstack::all (
$nova_user_password, $nova_user_password,
$secret_key, $secret_key,
$mysql_root_password, $mysql_root_password,
# cinder and quantum password are not required b/c they are # cinder and neutron password are not required b/c they are
# optional. Not sure what to do about this. # optional. Not sure what to do about this.
$quantum_user_password = false, $neutron_user_password = false,
$quantum_db_password = false, $neutron_db_password = false,
$cinder_user_password = false, $cinder_user_password = false,
$cinder_db_password = false, $cinder_db_password = false,
# Database # Database
@@ -189,8 +189,8 @@ class openstack::all (
$setup_test_volume = false, $setup_test_volume = false,
$volume_group = 'cinder-volumes', $volume_group = 'cinder-volumes',
$iscsi_ip_address = '127.0.0.1', $iscsi_ip_address = '127.0.0.1',
# Quantum # Neutron
$quantum = true, $neutron = true,
$bridge_interface = undef, $bridge_interface = undef,
$external_bridge_name = 'br-ex', $external_bridge_name = 'br-ex',
$enable_ovs_agent = true, $enable_ovs_agent = true,
@@ -198,11 +198,11 @@ class openstack::all (
$enable_l3_agent = true, $enable_l3_agent = true,
$enable_metadata_agent = true, $enable_metadata_agent = true,
$metadata_shared_secret = false, $metadata_shared_secret = false,
$firewall_driver = 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
$quantum_db_user = 'quantum', $neutron_db_user = 'neutron',
$quantum_db_name = 'quantum', $neutron_db_name = 'neutron',
$quantum_auth_url = 'http://127.0.0.1:35357/v2.0', $neutron_auth_url = 'http://127.0.0.1:35357/v2.0',
$enable_quantum_server = true, $enable_neutron_server = true,
$ovs_local_ip = false, $ovs_local_ip = false,
# General # General
$verbose = false, $verbose = false,
@@ -270,10 +270,10 @@ class openstack::all (
cinder_db_user => $cinder_db_user, cinder_db_user => $cinder_db_user,
cinder_db_password => $cinder_db_password, cinder_db_password => $cinder_db_password,
cinder_db_dbname => $cinder_db_dbname, cinder_db_dbname => $cinder_db_dbname,
quantum => $quantum, neutron => $neutron,
quantum_db_user => $quantum_db_user, neutron_db_user => $neutron_db_user,
quantum_db_password => $quantum_db_password, neutron_db_password => $neutron_db_password,
quantum_db_dbname => $quantum_db_name, neutron_db_dbname => $neutron_db_name,
allowed_hosts => $allowed_hosts, allowed_hosts => $allowed_hosts,
enabled => $enabled, enabled => $enabled,
} }
@@ -301,8 +301,8 @@ class openstack::all (
nova_user_password => $nova_user_password, nova_user_password => $nova_user_password,
cinder => $cinder, cinder => $cinder,
cinder_user_password => $cinder_user_password, cinder_user_password => $cinder_user_password,
quantum => $quantum, neutron => $neutron,
quantum_user_password => $quantum_user_password, neutron_user_password => $neutron_user_password,
enabled => $enabled, enabled => $enabled,
bind_host => $keystone_bind_address, bind_host => $keystone_bind_address,
} }
@@ -367,9 +367,9 @@ class openstack::all (
multi_host => $multi_host, multi_host => $multi_host,
public_interface => $public_interface, public_interface => $public_interface,
private_interface => $private_interface, private_interface => $private_interface,
# Quantum # Neutron
quantum => $quantum, neutron => $neutron,
quantum_user_password => $quantum_user_password, neutron_user_password => $neutron_user_password,
metadata_shared_secret => $metadata_shared_secret, metadata_shared_secret => $metadata_shared_secret,
# Nova # Nova
nova_admin_tenant_name => $nova_admin_tenant_name, nova_admin_tenant_name => $nova_admin_tenant_name,
@@ -393,22 +393,22 @@ class openstack::all (
enabled => $enabled, enabled => $enabled,
} }
######### Quantum Controller Services ######## ######### Neutron Controller Services ########
if ($quantum) { if ($neutron) {
if ! $quantum_user_password { if ! $neutron_user_password {
fail('quantum_user_password must be set when configuring quantum') fail('neutron_user_password must be set when configuring neutron')
} }
if ! $quantum_db_password { if ! $neutron_db_password {
fail('quantum_db_password must be set when configuring quantum') fail('neutron_db_password must be set when configuring neutron')
} }
if ! $bridge_interface { if ! $bridge_interface {
fail('bridge_interface must be set when configuring quantum') fail('bridge_interface must be set when configuring neutron')
} }
class { 'openstack::quantum': class { 'openstack::neutron':
# Database # Database
db_host => $db_host, db_host => $db_host,
# Rabbit # Rabbit
@@ -416,31 +416,31 @@ class openstack::all (
rabbit_user => $rabbit_user, rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
rabbit_virtual_host => $rabbit_virtual_host, rabbit_virtual_host => $rabbit_virtual_host,
# Quantum OVS # Neutron OVS
ovs_local_ip => $ovs_local_ip_real, ovs_local_ip => $ovs_local_ip_real,
bridge_uplinks => ["${external_bridge_name}:${bridge_interface}"], bridge_uplinks => ["${external_bridge_name}:${bridge_interface}"],
bridge_mappings => ["default:${external_bridge_name}"], bridge_mappings => ["default:${external_bridge_name}"],
enable_ovs_agent => $enable_ovs_agent, enable_ovs_agent => $enable_ovs_agent,
firewall_driver => $firewall_driver, firewall_driver => $firewall_driver,
# Database # Database
db_name => $quantum_db_name, db_name => $neutron_db_name,
db_user => $quantum_db_user, db_user => $neutron_db_user,
db_password => $quantum_db_password, db_password => $neutron_db_password,
# Quantum agents # Neutron agents
enable_dhcp_agent => $enable_dhcp_agent, enable_dhcp_agent => $enable_dhcp_agent,
enable_l3_agent => $enable_l3_agent, enable_l3_agent => $enable_l3_agent,
enable_metadata_agent => $enable_metadata_agent, enable_metadata_agent => $enable_metadata_agent,
auth_url => $quantum_auth_url, auth_url => $neutron_auth_url,
user_password => $quantum_user_password, user_password => $neutron_user_password,
shared_secret => $metadata_shared_secret, shared_secret => $metadata_shared_secret,
# Keystone # Keystone
keystone_host => $keystone_host, keystone_host => $keystone_host,
# General # General
enabled => $enabled, enabled => $enabled,
enable_server => $enable_quantum_server, enable_server => $enable_neutron_server,
verbose => $verbose, verbose => $verbose,
} }
class { 'nova::compute::quantum': class { 'nova::compute::neutron':
libvirt_vif_driver => $libvirt_vif_driver, libvirt_vif_driver => $libvirt_vif_driver,
} }
} else { } else {

View File

@@ -18,8 +18,8 @@
# [nova] # [nova]
# (optional) Install the Nova client package # (optional) Install the Nova client package
# #
# [quantum] # [neutron]
# (optional) Install the Quantum client package # (optional) Install the Neutron client package
# #
class openstack::client ( class openstack::client (
@@ -28,7 +28,7 @@ class openstack::client (
$glance = true, $glance = true,
$keystone = true, $keystone = true,
$nova = true, $nova = true,
$quantum = true $neutron = true
) { ) {
if $ceilometer { if $ceilometer {
@@ -51,7 +51,7 @@ class openstack::client (
include nova::client include nova::client
} }
if $quantum { if $neutron {
include quantum::client include neutron::client
} }
} }

View File

@@ -7,12 +7,12 @@
# Whether unmanaged nova.conf entries should be purged. # Whether unmanaged nova.conf entries should be purged.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# [quantum_firewall_driver] # [neutron_firewall_driver]
# Driver used to implement Quantum firewalling. # Driver used to implement Neutron firewalling.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# [ovs_enable_tunneling] # [ovs_enable_tunneling]
# Enable/disable the Quantum OVS GRE tunneling networking mode. # Enable/disable the Neutron OVS GRE tunneling networking mode.
# Optional. Defaults to true. # Optional. Defaults to true.
# #
# [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster. # [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster.
@@ -47,20 +47,20 @@ class openstack::compute (
$network_config = {}, $network_config = {},
$multi_host = false, $multi_host = false,
$enabled_apis = 'ec2,osapi_compute,metadata', $enabled_apis = 'ec2,osapi_compute,metadata',
# Quantum # Neutron
$quantum = true, $neutron = true,
$quantum_user_password = false, $neutron_user_password = false,
$quantum_admin_tenant_name = 'services', $neutron_admin_tenant_name = 'services',
$quantum_admin_user = 'quantum', $neutron_admin_user = 'neutron',
$enable_ovs_agent = true, $enable_ovs_agent = true,
$enable_l3_agent = false, $enable_l3_agent = false,
$enable_dhcp_agent = false, $enable_dhcp_agent = false,
$quantum_auth_url = 'http://127.0.0.1:35357/v2.0', $neutron_auth_url = 'http://127.0.0.1:35357/v2.0',
$keystone_host = '127.0.0.1', $keystone_host = '127.0.0.1',
$quantum_host = '127.0.0.1', $neutron_host = '127.0.0.1',
$ovs_enable_tunneling = true, $ovs_enable_tunneling = true,
$ovs_local_ip = false, $ovs_local_ip = false,
$quantum_firewall_driver = false, $neutron_firewall_driver = false,
$bridge_mappings = undef, $bridge_mappings = undef,
$bridge_uplinks = undef, $bridge_uplinks = undef,
# Nova # Nova
@@ -155,7 +155,7 @@ class openstack::compute (
# if the compute node should be configured as a multi-host # if the compute node should be configured as a multi-host
# compute installation # compute installation
if ! $quantum { if ! $neutron {
if ! $fixed_range { if ! $fixed_range {
fail('Must specify the fixed range when using nova-networks') fail('Must specify the fixed range when using nova-networks')
@@ -199,14 +199,14 @@ class openstack::compute (
} }
} else { } else {
if ! $quantum_user_password { if ! $neutron_user_password {
fail('quantum_user_password must be set when quantum is configured') fail('neutron_user_password must be set when neutron is configured')
} }
if ! $keystone_host { if ! $keystone_host {
fail('keystone_host must be configured when quantum is installed') fail('keystone_host must be configured when neutron is installed')
} }
class { 'openstack::quantum': class { 'openstack::neutron':
# Database # Database
db_host => $db_host, db_host => $db_host,
# Networking # Networking
@@ -215,15 +215,15 @@ class openstack::compute (
rabbit_host => $rabbit_host, rabbit_host => $rabbit_host,
rabbit_user => $rabbit_user, rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
# Quantum OVS # Neutron OVS
enable_ovs_agent => $enable_ovs_agent, enable_ovs_agent => $enable_ovs_agent,
ovs_enable_tunneling => $ovs_enable_tunneling, ovs_enable_tunneling => $ovs_enable_tunneling,
firewall_driver => $quantum_firewall_driver, firewall_driver => $neutron_firewall_driver,
# Quantum L3 Agent # Neutron L3 Agent
enable_l3_agent => $enable_l3_agent, enable_l3_agent => $enable_l3_agent,
enable_dhcp_agent => $enable_dhcp_agent, enable_dhcp_agent => $enable_dhcp_agent,
auth_url => $quantum_auth_url, auth_url => $neutron_auth_url,
user_password => $quantum_user_password, user_password => $neutron_user_password,
# Keystone # Keystone
keystone_host => $keystone_host, keystone_host => $keystone_host,
# General # General
@@ -234,18 +234,18 @@ class openstack::compute (
bridge_uplinks => $bridge_uplinks bridge_uplinks => $bridge_uplinks
} }
class { 'nova::compute::quantum': class { 'nova::compute::neutron':
libvirt_vif_driver => $libvirt_vif_driver, libvirt_vif_driver => $libvirt_vif_driver,
} }
# Configures nova.conf entries applicable to Quantum. # Configures nova.conf entries applicable to Neutron.
class { 'nova::network::quantum': class { 'nova::network::neutron':
quantum_admin_password => $quantum_user_password, neutron_admin_password => $neutron_user_password,
quantum_auth_strategy => 'keystone', neutron_auth_strategy => 'keystone',
quantum_url => "http://${quantum_host}:9696", neutron_url => "http://${neutron_host}:9696",
quantum_admin_username => $quantum_admin_user, neutron_admin_username => $neutron_admin_user,
quantum_admin_tenant_name => $quantum_admin_tenant_name, neutron_admin_tenant_name => $neutron_admin_tenant_name,
quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0", neutron_admin_auth_url => "http://${keystone_host}:35357/v2.0",
} }
} }

View File

@@ -59,21 +59,21 @@
# [cache_server_ip] local memcached instance ip # [cache_server_ip] local memcached instance ip
# [cache_server_port] local memcached instance port # [cache_server_port] local memcached instance port
# [horizon] (bool) is horizon installed. Defaults to: true # [horizon] (bool) is horizon installed. Defaults to: true
# [quantum] (bool) is quantum installed # [neutron] (bool) is neutron installed
# The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps.
# There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose.
# Each app is defined in two parts, the display name, and the URI # Each app is defined in two parts, the display name, and the URI
# #
# [ovs_enable_tunneling] # [ovs_enable_tunneling]
# Enable/disable the Quantum OVS GRE tunneling networking mode. # Enable/disable the Neutron OVS GRE tunneling networking mode.
# Optional. Defaults to true. # Optional. Defaults to true.
# #
# [metadata_shared_secret] # [metadata_shared_secret]
# Shared secret used by nova and quantum to authenticate metadata. # Shared secret used by nova and neutron to authenticate metadata.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# [physical_network] # [physical_network]
# Unique name of the physical network used by the Quantum OVS Agent. # Unique name of the physical network used by the Neutron OVS Agent.
# All physical networks listed are available for flat and VLAN # All physical networks listed are available for flat and VLAN
# provider network creation. # provider network creation.
# #
@@ -90,10 +90,10 @@
# #
# [firewall_driver] # [firewall_driver]
# Driver used to implement firewall rules. # Driver used to implement firewall rules.
# (optional) Defaults to 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. # (optional) Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'.
# #
# [quantum_auth_url] # [neutron_auth_url]
# Url used to quantum to contact the authentication service. # Url used to neutron to contact the authentication service.
# (optional) Default to http://127.0.0.1:35357/v2.0. # (optional) Default to http://127.0.0.1:35357/v2.0.
# #
# [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]' # [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]'
@@ -143,11 +143,11 @@ class openstack::controller (
$nova_user_password, $nova_user_password,
$secret_key, $secret_key,
$mysql_root_password, $mysql_root_password,
# cinder and quantum password are not required b/c they are # cinder and neutron password are not required b/c they are
# optional. Not sure what to do about this. # optional. Not sure what to do about this.
$quantum_user_password = false, $neutron_user_password = false,
$quantum_db_password = false, $neutron_db_password = false,
$quantum_core_plugin = undef, $neutron_core_plugin = undef,
$cinder_user_password = false, $cinder_user_password = false,
$cinder_db_password = false, $cinder_db_password = false,
$swift_user_password = false, $swift_user_password = false,
@@ -219,8 +219,8 @@ class openstack::controller (
$cinder_db_user = 'cinder', $cinder_db_user = 'cinder',
$cinder_db_dbname = 'cinder', $cinder_db_dbname = 'cinder',
$cinder_bind_address = '0.0.0.0', $cinder_bind_address = '0.0.0.0',
# Quantum # Neutron
$quantum = true, $neutron = true,
$physical_network = 'default', $physical_network = 'default',
$tenant_network_type = 'gre', $tenant_network_type = 'gre',
$ovs_enable_tunneling = true, $ovs_enable_tunneling = true,
@@ -235,11 +235,11 @@ class openstack::controller (
$enable_l3_agent = true, $enable_l3_agent = true,
$enable_metadata_agent = true, $enable_metadata_agent = true,
$metadata_shared_secret = false, $metadata_shared_secret = false,
$firewall_driver = 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
$quantum_db_user = 'quantum', $neutron_db_user = 'neutron',
$quantum_db_name = 'quantum', $neutron_db_name = 'neutron',
$quantum_auth_url = 'http://127.0.0.1:35357/v2.0', $neutron_auth_url = 'http://127.0.0.1:35357/v2.0',
$enable_quantum_server = true, $enable_neutron_server = true,
# swift # swift
$swift = false, $swift = false,
$swift_public_address = false, $swift_public_address = false,
@@ -296,10 +296,10 @@ class openstack::controller (
cinder_db_user => $cinder_db_user, cinder_db_user => $cinder_db_user,
cinder_db_password => $cinder_db_password, cinder_db_password => $cinder_db_password,
cinder_db_dbname => $cinder_db_dbname, cinder_db_dbname => $cinder_db_dbname,
quantum => $quantum, neutron => $neutron,
quantum_db_user => $quantum_db_user, neutron_db_user => $neutron_db_user,
quantum_db_password => $quantum_db_password, neutron_db_password => $neutron_db_password,
quantum_db_dbname => $quantum_db_name, neutron_db_dbname => $neutron_db_name,
allowed_hosts => $allowed_hosts, allowed_hosts => $allowed_hosts,
enabled => $enabled, enabled => $enabled,
} }
@@ -336,10 +336,10 @@ class openstack::controller (
cinder_user_password => $cinder_user_password, cinder_user_password => $cinder_user_password,
cinder_internal_address => $internal_address_real, cinder_internal_address => $internal_address_real,
cinder_admin_address => $admin_address_real, cinder_admin_address => $admin_address_real,
quantum => $quantum, neutron => $neutron,
quantum_user_password => $quantum_user_password, neutron_user_password => $neutron_user_password,
quantum_internal_address => $internal_address_real, neutron_internal_address => $internal_address_real,
quantum_admin_address => $admin_address_real, neutron_admin_address => $admin_address_real,
swift => $swift, swift => $swift,
swift_user_password => $swift_user_password, swift_user_password => $swift_user_password,
swift_public_address => $swift_public_address, swift_public_address => $swift_public_address,
@@ -398,9 +398,9 @@ class openstack::controller (
multi_host => $multi_host, multi_host => $multi_host,
public_interface => $public_interface, public_interface => $public_interface,
private_interface => $private_interface, private_interface => $private_interface,
# Quantum # Neutron
quantum => $quantum, neutron => $neutron,
quantum_user_password => $quantum_user_password, neutron_user_password => $neutron_user_password,
metadata_shared_secret => $metadata_shared_secret, metadata_shared_secret => $metadata_shared_secret,
# Nova # Nova
nova_admin_tenant_name => $nova_admin_tenant_name, nova_admin_tenant_name => $nova_admin_tenant_name,
@@ -428,19 +428,19 @@ class openstack::controller (
enabled => $enabled, enabled => $enabled,
} }
######### Quantum Controller Services ######## ######### Neutron Controller Services ########
if ($quantum) { if ($neutron) {
if ! $quantum_user_password { if ! $neutron_user_password {
fail('quantum_user_password must be set when configuring quantum') fail('neutron_user_password must be set when configuring neutron')
} }
if ! $quantum_db_password { if ! $neutron_db_password {
fail('quantum_db_password must be set when configuring quantum') fail('neutron_db_password must be set when configuring neutron')
} }
if ! $bridge_interface { if ! $bridge_interface {
fail('bridge_interface must be set when configuring quantum') fail('bridge_interface must be set when configuring neutron')
} }
if ! $bridge_uplinks { if ! $bridge_uplinks {
@@ -455,7 +455,7 @@ class openstack::controller (
$bridge_mappings_real = $bridge_mappings $bridge_mappings_real = $bridge_mappings
} }
class { 'openstack::quantum': class { 'openstack::neutron':
# Database # Database
db_host => $db_host, db_host => $db_host,
sql_idle_timeout => $sql_idle_timeout, sql_idle_timeout => $sql_idle_timeout,
@@ -465,7 +465,7 @@ class openstack::controller (
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
rabbit_hosts => $rabbit_hosts, rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host, rabbit_virtual_host => $rabbit_virtual_host,
# Quantum OVS # Neutron OVS
tenant_network_type => $tenant_network_type, tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges, network_vlan_ranges => $network_vlan_ranges,
ovs_enable_tunneling => $ovs_enable_tunneling, ovs_enable_tunneling => $ovs_enable_tunneling,
@@ -475,23 +475,23 @@ class openstack::controller (
enable_ovs_agent => $enable_ovs_agent, enable_ovs_agent => $enable_ovs_agent,
firewall_driver => $firewall_driver, firewall_driver => $firewall_driver,
# Database # Database
db_name => $quantum_db_name, db_name => $neutron_db_name,
db_user => $quantum_db_user, db_user => $neutron_db_user,
db_password => $quantum_db_password, db_password => $neutron_db_password,
# Plugin # Plugin
core_plugin => $quantum_core_plugin, core_plugin => $neutron_core_plugin,
# Quantum agents # Neutron agents
enable_dhcp_agent => $enable_dhcp_agent, enable_dhcp_agent => $enable_dhcp_agent,
enable_l3_agent => $enable_l3_agent, enable_l3_agent => $enable_l3_agent,
enable_metadata_agent => $enable_metadata_agent, enable_metadata_agent => $enable_metadata_agent,
auth_url => $quantum_auth_url, auth_url => $neutron_auth_url,
user_password => $quantum_user_password, user_password => $neutron_user_password,
shared_secret => $metadata_shared_secret, shared_secret => $metadata_shared_secret,
# Keystone # Keystone
keystone_host => $keystone_host, keystone_host => $keystone_host,
# General # General
enabled => $enabled, enabled => $enabled,
enable_server => $enable_quantum_server, enable_server => $enable_neutron_server,
debug => $debug, debug => $debug,
verbose => $verbose, verbose => $verbose,
} }

View File

@@ -11,7 +11,7 @@
# [glance_db_password] Password for glance database. Required. # [glance_db_password] Password for glance database. Required.
# [nova_db_password] Password for nova database. Required. # [nova_db_password] Password for nova database. Required.
# [cinder_db_password] Password for cinder database. Required. # [cinder_db_password] Password for cinder database. Required.
# [quantum_db_password] Password for quantum database. Required. # [neutron_db_password] Password for neutron database. Required.
# [mysql_bind_address] Address that mysql will bind to. Optional .Defaults to '0.0.0.0'. # [mysql_bind_address] Address that mysql will bind to. Optional .Defaults to '0.0.0.0'.
# [mysql_account_security] If a secure mysql db should be setup. Optional .Defaults to true. # [mysql_account_security] If a secure mysql db should be setup. Optional .Defaults to true.
# [keystone_db_user] DB user for keystone. Optional. Defaults to 'keystone'. # [keystone_db_user] DB user for keystone. Optional. Defaults to 'keystone'.
@@ -23,9 +23,9 @@
# [cinder]. Whether create cinder db. Optional. Defaults to 'true'. # [cinder]. Whether create cinder db. Optional. Defaults to 'true'.
# [cinder_db_user]. Name of cinder DB user. Optional. Defaults to 'cinder'. # [cinder_db_user]. Name of cinder DB user. Optional. Defaults to 'cinder'.
# [cinder_db_dbname]. Name of cinder DB. Optional. Defaults to 'cinder'. # [cinder_db_dbname]. Name of cinder DB. Optional. Defaults to 'cinder'.
# [quantum]. Whether create quantum db. Optional. Defaults to 'true'. # [neutron]. Whether create neutron db. Optional. Defaults to 'true'.
# [quantum_db_user]. Name of quantum DB user. Optional. Defaults to 'quantum'. # [neutron_db_user]. Name of neutron DB user. Optional. Defaults to 'neutron'.
# [quantum_db_dbname]. Name of quantum DB. Optional. Defaults to 'quantum'. # [neutron_db_dbname]. Name of neutron DB. Optional. Defaults to 'neutron'.
# [allowed_hosts] List of hosts that are allowed access. Optional. Defaults to false. # [allowed_hosts] List of hosts that are allowed access. Optional. Defaults to false.
# [enabled] If the db service should be started. Optional. Defaults to true. # [enabled] If the db service should be started. Optional. Defaults to true.
# #
@@ -37,7 +37,7 @@
# glance_db_password => 'changeme', # glance_db_password => 'changeme',
# nova_db_password => 'changeme', # nova_db_password => 'changeme',
# cinder_db_password => 'changeme', # cinder_db_password => 'changeme',
# quantum_db_password => 'changeme', # neutron_db_password => 'changeme',
# allowed_hosts => ['127.0.0.1', '10.0.0.%'], # allowed_hosts => ['127.0.0.1', '10.0.0.%'],
# } # }
class openstack::db::mysql ( class openstack::db::mysql (
@@ -48,7 +48,7 @@ class openstack::db::mysql (
$glance_db_password, $glance_db_password,
$nova_db_password, $nova_db_password,
$cinder_db_password, $cinder_db_password,
$quantum_db_password, $neutron_db_password,
# MySQL # MySQL
$mysql_bind_address = '0.0.0.0', $mysql_bind_address = '0.0.0.0',
$mysql_account_security = true, $mysql_account_security = true,
@@ -65,10 +65,10 @@ class openstack::db::mysql (
$cinder = true, $cinder = true,
$cinder_db_user = 'cinder', $cinder_db_user = 'cinder',
$cinder_db_dbname = 'cinder', $cinder_db_dbname = 'cinder',
# quantum # neutron
$quantum = true, $neutron = true,
$quantum_db_user = 'quantum', $neutron_db_user = 'neutron',
$quantum_db_dbname = 'quantum', $neutron_db_dbname = 'neutron',
$allowed_hosts = false, $allowed_hosts = false,
$enabled = true $enabled = true
) { ) {
@@ -122,12 +122,12 @@ class openstack::db::mysql (
} }
} }
# create quantum db # create neutron db
if ($quantum) { if ($neutron) {
class { 'quantum::db::mysql': class { 'neutron::db::mysql':
user => $quantum_db_user, user => $neutron_db_user,
password => $quantum_db_password, password => $neutron_db_password,
dbname => $quantum_db_dbname, dbname => $neutron_db_dbname,
allowed_hosts => $allowed_hosts, allowed_hosts => $allowed_hosts,
} }
} }

View File

@@ -44,7 +44,7 @@
# glance_user_password => 'glance', # glance_user_password => 'glance',
# nova_user_password => 'nova', # nova_user_password => 'nova',
# cinder_user_password => 'cinder', # cinder_user_password => 'cinder',
# quantum_user_password => 'quantum', # neutron_user_password => 'neutron',
# public_address => '192.168.1.1', # public_address => '192.168.1.1',
# } # }
@@ -56,7 +56,7 @@ class openstack::keystone (
$glance_user_password, $glance_user_password,
$nova_user_password, $nova_user_password,
$cinder_user_password, $cinder_user_password,
$quantum_user_password, $neutron_user_password,
$public_address, $public_address,
$public_protocol = 'http', $public_protocol = 'http',
$db_host = '127.0.0.1', $db_host = '127.0.0.1',
@@ -81,16 +81,16 @@ class openstack::keystone (
$cinder_public_address = false, $cinder_public_address = false,
$cinder_internal_address = false, $cinder_internal_address = false,
$cinder_admin_address = false, $cinder_admin_address = false,
$quantum_public_address = false, $neutron_public_address = false,
$quantum_internal_address = false, $neutron_internal_address = false,
$quantum_admin_address = false, $neutron_admin_address = false,
$swift_public_address = false, $swift_public_address = false,
$swift_internal_address = false, $swift_internal_address = false,
$swift_admin_address = false, $swift_admin_address = false,
$glance = true, $glance = true,
$nova = true, $nova = true,
$cinder = true, $cinder = true,
$quantum = true, $neutron = true,
$swift = false, $swift = false,
$enabled = true $enabled = true
) { ) {
@@ -159,20 +159,20 @@ class openstack::keystone (
} else { } else {
$cinder_admin_real = $cinder_internal_real $cinder_admin_real = $cinder_internal_real
} }
if($quantum_public_address) { if($neutron_public_address) {
$quantum_public_real = $quantum_public_address $neutron_public_real = $neutron_public_address
} else { } else {
$quantum_public_real = $public_address $neutron_public_real = $public_address
} }
if($quantum_internal_address) { if($neutron_internal_address) {
$quantum_internal_real = $quantum_internal_address $neutron_internal_real = $neutron_internal_address
} else { } else {
$quantum_internal_real = $quantum_public_real $neutron_internal_real = $neutron_public_real
} }
if($quantum_admin_address) { if($neutron_admin_address) {
$quantum_admin_real = $quantum_admin_address $neutron_admin_real = $neutron_admin_address
} else { } else {
$quantum_admin_real = $quantum_internal_real $neutron_admin_real = $neutron_internal_real
} }
if($swift_public_address) { if($swift_public_address) {
$swift_public_real = $swift_public_address $swift_public_real = $swift_public_address
@@ -255,13 +255,13 @@ class openstack::keystone (
region => $region, region => $region,
} }
} }
if $quantum { if $neutron {
class { 'quantum::keystone::auth': class { 'neutron::keystone::auth':
password => $quantum_user_password, password => $neutron_user_password,
public_address => $quantum_public_real, public_address => $neutron_public_real,
public_protocol => $public_protocol, public_protocol => $public_protocol,
admin_address => $quantum_admin_real, admin_address => $neutron_admin_real,
internal_address => $quantum_internal_real, internal_address => $neutron_internal_real,
region => $region, region => $region,
} }
} }

View File

@@ -1,8 +1,8 @@
# #
# == Class: openstack::quantum # == Class: openstack::neutron
# #
# Class to define quantum components for openstack. This class can # Class to define neutron components for openstack. This class can
# be configured to provide all quantum related functionality. # be configured to provide all neutron related functionality.
# #
# === Parameters # === Parameters
# #
@@ -15,7 +15,7 @@
# (required) # (required)
# #
# [enabled] # [enabled]
# state of the quantum services. # state of the neutron services.
# (optional) Defaults to true. # (optional) Defaults to true.
# #
# [enable_server] # [enable_server]
@@ -59,7 +59,7 @@
# (optional) Defaults to '127.0.0.1'. # (optional) Defaults to '127.0.0.1'.
# #
# [db_password] # [db_password]
# Password used to connect to quantum database. # Password used to connect to neutron database.
# (required) # (required)
# #
# [db_type] # [db_type]
@@ -110,15 +110,15 @@
# (optional) Defaults to 127.0.0.1. # (optional) Defaults to 127.0.0.1.
# #
# [db_name] # [db_name]
# Name of quantum database. # Name of neutron database.
# (optional) Defaults to quantum. # (optional) Defaults to neutron.
# #
# [db_user] # [db_user]
# User to connect to quantum database as. # User to connect to neutron database as.
# (optional) Defaults to quantum. # (optional) Defaults to neutron.
# #
# [bind_address] # [bind_address]
# Address quantum api server should bind to. # Address neutron api server should bind to.
# (optional) Defaults to 0.0.0.0. # (optional) Defaults to 0.0.0.0.
# #
# [sql_idle_timeout] # [sql_idle_timeout]
@@ -130,19 +130,19 @@
# (optional) Defaults to 127.0.0.1. # (optional) Defaults to 127.0.0.1.
# #
# [verbose] # [verbose]
# Enables verbose for quantum services. # Enables verbose for neutron services.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# [debug] # [debug]
# Enables debug for quantum services. # Enables debug for neutron services.
# (optional) Defaults to false. # (optional) Defaults to false.
# #
# === Examples # === Examples
# #
# class { 'openstack::quantum': # class { 'openstack::neutron':
# db_password => 'quantum_db_pass', # db_password => 'neutron_db_pass',
# user_password => 'keystone_user_pass', # user_password => 'keystone_user_pass',
# rabbit_password => 'quantum_rabbit_pass', # rabbit_password => 'neutron_rabbit_pass',
# bridge_uplinks => '[br-ex:eth0]', # bridge_uplinks => '[br-ex:eth0]',
# bridge_mappings => '[default:br-ex], # bridge_mappings => '[default:br-ex],
# enable_ovs_agent => true, # enable_ovs_agent => true,
@@ -150,11 +150,11 @@
# } # }
# #
class openstack::quantum ( class openstack::neutron (
# Passwords # Passwords
$user_password, $user_password,
$rabbit_password, $rabbit_password,
# enable or disable quantum # enable or disable neutron
$enabled = true, $enabled = true,
$enable_server = true, $enable_server = true,
# Set DHCP/L3 Agents on Primary Controller # Set DHCP/L3 Agents on Primary Controller
@@ -175,7 +175,7 @@ class openstack::quantum (
# Metadata configuration # Metadata configuration
$shared_secret = false, $shared_secret = false,
$metadata_ip = '127.0.0.1', $metadata_ip = '127.0.0.1',
# Quantum Authentication Information # Neutron Authentication Information
$auth_url = 'http://localhost:35357/v2.0', $auth_url = 'http://localhost:35357/v2.0',
# Rabbit Information # Rabbit Information
$rabbit_user = 'rabbit_user', $rabbit_user = 'rabbit_user',
@@ -186,8 +186,8 @@ class openstack::quantum (
$db_type = 'mysql', $db_type = 'mysql',
$db_password = false, $db_password = false,
$db_host = '127.0.0.1', $db_host = '127.0.0.1',
$db_name = 'quantum', $db_name = 'neutron',
$db_user = 'quantum', $db_user = 'neutron',
$sql_idle_timeout = '3600', $sql_idle_timeout = '3600',
# Plugin # Plugin
$core_plugin = undef, $core_plugin = undef,
@@ -198,7 +198,7 @@ class openstack::quantum (
$debug = false, $debug = false,
) { ) {
class { '::quantum': class { '::neutron':
enabled => $enabled, enabled => $enabled,
core_plugin => $core_plugin, core_plugin => $core_plugin,
bind_host => $bind_address, bind_host => $bind_address,
@@ -213,18 +213,18 @@ class openstack::quantum (
if $enable_server { if $enable_server {
if ! $db_password { if ! $db_password {
fail('db password must be set when configuring a quantum server') fail('db password must be set when configuring a neutron server')
} }
if ($db_type == 'mysql') { if ($db_type == 'mysql') {
$sql_connection = "mysql://${db_user}:${db_password}@${db_host}/${db_name}?charset=utf8" $sql_connection = "mysql://${db_user}:${db_password}@${db_host}/${db_name}?charset=utf8"
} else { } else {
fail("Unsupported db type: ${db_type}. Only mysql is currently supported.") fail("Unsupported db type: ${db_type}. Only mysql is currently supported.")
} }
class { 'quantum::server': class { 'neutron::server':
auth_host => $keystone_host, auth_host => $keystone_host,
auth_password => $user_password, auth_password => $user_password,
} }
class { 'quantum::plugins::ovs': class { 'neutron::plugins::ovs':
sql_connection => $sql_connection, sql_connection => $sql_connection,
sql_idle_timeout => $sql_idle_timeout, sql_idle_timeout => $sql_idle_timeout,
tenant_network_type => $tenant_network_type, tenant_network_type => $tenant_network_type,
@@ -233,7 +233,7 @@ class openstack::quantum (
} }
if $enable_ovs_agent { if $enable_ovs_agent {
class { 'quantum::agents::ovs': class { 'neutron::agents::ovs':
bridge_uplinks => $bridge_uplinks, bridge_uplinks => $bridge_uplinks,
bridge_mappings => $bridge_mappings, bridge_mappings => $bridge_mappings,
enable_tunneling => $ovs_enable_tunneling, enable_tunneling => $ovs_enable_tunneling,
@@ -243,13 +243,13 @@ class openstack::quantum (
} }
if $enable_dhcp_agent { if $enable_dhcp_agent {
class { 'quantum::agents::dhcp': class { 'neutron::agents::dhcp':
use_namespaces => true, use_namespaces => true,
debug => $debug, debug => $debug,
} }
} }
if $enable_l3_agent { if $enable_l3_agent {
class { 'quantum::agents::l3': class { 'neutron::agents::l3':
use_namespaces => true, use_namespaces => true,
debug => $debug, debug => $debug,
} }
@@ -259,7 +259,7 @@ class openstack::quantum (
if ! $shared_secret { if ! $shared_secret {
fail('metadata_shared_secret parameter must be set when using metadata agent') fail('metadata_shared_secret parameter must be set when using metadata agent')
} }
class { 'quantum::agents::metadata': class { 'neutron::agents::metadata':
auth_password => $user_password, auth_password => $user_password,
shared_secret => $shared_secret, shared_secret => $shared_secret,
auth_url => $auth_url, auth_url => $auth_url,

View File

@@ -21,15 +21,15 @@
# [rabbit_cluster_nodes] An array of Rabbit Broker IP addresses within the Cluster. # [rabbit_cluster_nodes] An array of Rabbit Broker IP addresses within the Cluster.
# Optional. Defaults to false. # Optional. Defaults to false.
# #
# [quantum] # [neutron]
# Specifies if nova should be configured to use quantum. # Specifies if nova should be configured to use neutron.
# (optional) Defaults to false (indicating nova-networks should be used) # (optional) Defaults to false (indicating nova-networks should be used)
# #
# [quantum_user_password] # [neutron_user_password]
# password that nova uses to authenticate with quantum. # password that nova uses to authenticate with neutron.
# #
# [metadata_shared_secret] Secret used to authenticate between nova and the # [metadata_shared_secret] Secret used to authenticate between nova and the
# quantum metadata services. # neutron metadata services.
# (Optional). Defaults to undef. # (Optional). Defaults to undef.
# #
# [sql_idle_timeout] # [sql_idle_timeout]
@@ -70,9 +70,9 @@ class openstack::nova::controller (
$multi_host = false, $multi_host = false,
$public_interface = undef, $public_interface = undef,
$private_interface = undef, $private_interface = undef,
# quantum # neutron
$quantum = true, $neutron = true,
$quantum_user_password = false, $neutron_user_password = false,
$metadata_shared_secret = undef, $metadata_shared_secret = undef,
# Nova # Nova
$nova_admin_tenant_name = 'services', $nova_admin_tenant_name = 'services',
@@ -161,7 +161,7 @@ class openstack::nova::controller (
enabled_apis => $enabled_apis, enabled_apis => $enabled_apis,
api_bind_address => $api_bind_address, api_bind_address => $api_bind_address,
auth_host => $keystone_host, auth_host => $keystone_host,
quantum_metadata_proxy_shared_secret => $metadata_shared_secret, neutron_metadata_proxy_shared_secret => $metadata_shared_secret,
} }
@@ -171,7 +171,7 @@ class openstack::nova::controller (
$really_create_networks = false $really_create_networks = false
} }
if $quantum == false { if $neutron == false {
# Configure nova-network # Configure nova-network
if $multi_host { if $multi_host {
nova_config { 'DEFAULT/multi_host': value => true } nova_config { 'DEFAULT/multi_host': value => true }
@@ -204,19 +204,19 @@ class openstack::nova::controller (
install_service => $enable_network_service, install_service => $enable_network_service,
} }
} else { } else {
# Configure Nova for Quantum networking # Configure Nova for Neutron networking
if ! $quantum_user_password { if ! $neutron_user_password {
fail('quantum_user_password must be specified when quantum is configured') fail('neutron_user_password must be specified when neutron is configured')
} }
class { 'nova::network::quantum': class { 'nova::network::neutron':
quantum_admin_password => $quantum_user_password, neutron_admin_password => $neutron_user_password,
quantum_auth_strategy => 'keystone', neutron_auth_strategy => 'keystone',
quantum_url => "http://${keystone_host}:9696", neutron_url => "http://${keystone_host}:9696",
quantum_admin_tenant_name => 'services', neutron_admin_tenant_name => 'services',
quantum_admin_username => 'quantum', neutron_admin_username => 'neutron',
quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0", neutron_admin_auth_url => "http://${keystone_host}:35357/v2.0",
} }
} }

View File

@@ -2,14 +2,14 @@
# #
# This class provides basic provisioning of a bare openstack # This class provides basic provisioning of a bare openstack
# deployment. A non-admin user is created, an image is uploaded, and # deployment. A non-admin user is created, an image is uploaded, and
# quantum networking is configured. Once complete, it should be # neutron networking is configured. Once complete, it should be
# possible for the non-admin user to create a boot a VM that can be # possible for the non-admin user to create a boot a VM that can be
# logged into via vnc (ssh may require extra configuration). # logged into via vnc (ssh may require extra configuration).
# #
# This module is currently limited to targetting an all-in-one # This module is currently limited to targetting an all-in-one
# deployment for the following reasons: # deployment for the following reasons:
# #
# - puppet-{keystone,glance,quantum} rely on their configuration files being # - puppet-{keystone,glance,neutron} rely on their configuration files being
# available on localhost which is not guaranteed for multi-host. # available on localhost which is not guaranteed for multi-host.
# #
# - the gateway configuration only supports a host that uses the same # - the gateway configuration only supports a host that uses the same
@@ -52,7 +52,7 @@ class openstack::provision(
$image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img', $image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img',
$image_ssh_user = 'cirros', $image_ssh_user = 'cirros',
## Quantum ## Neutron
$tenant_name = 'demo', $tenant_name = 'demo',
$public_network_name = 'public', $public_network_name = 'public',
$public_subnet_name = 'public_subnet', $public_subnet_name = 'public_subnet',
@@ -113,43 +113,43 @@ class openstack::provision(
## Networks ## Networks
quantum_network { $public_network_name: neutron_network { $public_network_name:
ensure => present, ensure => present,
router_external => true, router_external => true,
tenant_name => $admin_tenant_name, tenant_name => $admin_tenant_name,
} }
quantum_subnet { $public_subnet_name: neutron_subnet { $public_subnet_name:
ensure => 'present', ensure => 'present',
cidr => $floating_range, cidr => $floating_range,
enable_dhcp => false, enable_dhcp => false,
network_name => $public_network_name, network_name => $public_network_name,
tenant_name => $admin_tenant_name, tenant_name => $admin_tenant_name,
} }
quantum_network { $private_network_name: neutron_network { $private_network_name:
ensure => present, ensure => present,
tenant_name => $tenant_name, tenant_name => $tenant_name,
} }
quantum_subnet { $private_subnet_name: neutron_subnet { $private_subnet_name:
ensure => present, ensure => present,
cidr => $fixed_range, cidr => $fixed_range,
network_name => $private_network_name, network_name => $private_network_name,
tenant_name => $tenant_name, tenant_name => $tenant_name,
} }
# Tenant-owned router - assumes network namespace isolation # Tenant-owned router - assumes network namespace isolation
quantum_router { $router_name: neutron_router { $router_name:
ensure => present, ensure => present,
tenant_name => $tenant_name, tenant_name => $tenant_name,
gateway_network_name => $public_network_name, gateway_network_name => $public_network_name,
# A quantum_router resource must explicitly declare a dependency on # A neutron_router resource must explicitly declare a dependency on
# the first subnet of the gateway network. # the first subnet of the gateway network.
require => Quantum_subnet[$public_subnet_name], require => Neutron_subnet[$public_subnet_name],
} }
quantum_router_interface { "${router_name}:${private_subnet_name}": neutron_router_interface { "${router_name}:${private_subnet_name}":
ensure => present, ensure => present,
} }
if $setup_ovs_bridge { if $setup_ovs_bridge {
quantum_l3_ovs_bridge { $public_bridge_name: neutron_l3_ovs_bridge { $public_bridge_name:
ensure => present, ensure => present,
subnet_name => $public_subnet_name, subnet_name => $public_subnet_name,
} }
@@ -178,7 +178,7 @@ class openstack::provision(
admin_username => $admin_username, admin_username => $admin_username,
admin_password => $admin_password, admin_password => $admin_password,
admin_tenant_name => $admin_tenant_name, admin_tenant_name => $admin_tenant_name,
quantum_available => true, neutron_available => true,
public_network_name => $public_network_name, public_network_name => $public_network_name,
resize_available => $resize_available, resize_available => $resize_available,
change_password_available => $change_password_available, change_password_available => $change_password_available,
@@ -186,7 +186,7 @@ class openstack::provision(
Keystone_user[$username], Keystone_user[$username],
Keystone_user[$alt_username], Keystone_user[$alt_username],
Glance_image[$image_name], Glance_image[$image_name],
Quantum_network[$public_network_name], Neutron_network[$public_network_name],
], ],
} }
} }

View File

@@ -19,7 +19,7 @@ class openstack::test_file(
$image_type = 'cirros', $image_type = 'cirros',
$sleep_time = '15', $sleep_time = '15',
$floating_ip = false, $floating_ip = false,
$quantum = true $neutron = true
) { ) {
file { $path: file { $path:

View File

@@ -33,51 +33,51 @@ describe 'openstack::all' do
} }
end end
context 'quantum enabled (which is the default)' do context 'neutron enabled (which is the default)' do
before do before do
params.merge!(:cinder => false) params.merge!(:cinder => false)
end end
it 'raises an error if no quantum_user_password is set' do it 'raises an error if no neutron_user_password is set' do
expect { subject }.to raise_error(Puppet::Error, /quantum_user_password must be specified when quantum is configured/) expect { subject }.to raise_error(Puppet::Error, /neutron_user_password must be specified when neutron is configured/)
end end
context 'with quantum_user_password set' do context 'with neutron_user_password set' do
before do before do
params.merge!(:quantum_user_password => 'quantum_user_password') params.merge!(:neutron_user_password => 'neutron_user_password')
end end
it 'raises an error if no quantum_db_password is set' do it 'raises an error if no neutron_db_password is set' do
expect { subject }.to raise_error(Puppet::Error, /quantum_db_password must be set when configuring quantum/) expect { subject }.to raise_error(Puppet::Error, /neutron_db_password must be set when configuring neutron/)
end end
end end
context 'with quantum_user_password and quantum_db_password set' do context 'with neutron_user_password and neutron_db_password set' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password' :neutron_db_password => 'neutron_db_password'
) )
end end
it 'raises an error if no bridge_interface is set' do it 'raises an error if no bridge_interface is set' do
expect { subject }.to raise_error(Puppet::Error, /bridge_interface must be set when configuring quantum/) expect { subject }.to raise_error(Puppet::Error, /bridge_interface must be set when configuring neutron/)
end end
end end
context 'with quantum_user_password, quantum_db_password, and bridge_interface set' do context 'with neutron_user_password, neutron_db_password, and bridge_interface set' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:bridge_interface => 'eth0' :bridge_interface => 'eth0'
) )
end end
end end
context 'with quantum_user_password, quantum_db_password, bridge_interface, and ovs_local_ip set' do context 'with neutron_user_password, neutron_db_password, bridge_interface, and ovs_local_ip set' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:bridge_interface => 'eth0', :bridge_interface => 'eth0',
:ovs_local_ip => '10.0.1.1' :ovs_local_ip => '10.0.1.1'
) )
@@ -87,18 +87,18 @@ describe 'openstack::all' do
end end
end end
context 'with quantum_user_password, quantum_db_password, bridge_interface, ovs_local_ip, and shared_secret set' do context 'with neutron_user_password, neutron_db_password, bridge_interface, ovs_local_ip, and shared_secret set' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:bridge_interface => 'eth0', :bridge_interface => 'eth0',
:ovs_local_ip => '10.0.1.1', :ovs_local_ip => '10.0.1.1',
:metadata_shared_secret => 'shared_md_secret' :metadata_shared_secret => 'shared_md_secret'
) )
end end
it 'contains an openstack::quantum class' do it 'contains an openstack::neutron class' do
should contain_class('openstack::quantum').with( should contain_class('openstack::neutron').with(
:db_host => '127.0.0.1', :db_host => '127.0.0.1',
:rabbit_host => '127.0.0.1', :rabbit_host => '127.0.0.1',
:rabbit_user => 'openstack', :rabbit_user => 'openstack',
@@ -108,15 +108,15 @@ describe 'openstack::all' do
:bridge_uplinks => 'br-ex:eth0', :bridge_uplinks => 'br-ex:eth0',
:bridge_mappings => 'default:br-ex', :bridge_mappings => 'default:br-ex',
:enable_ovs_agent => true, :enable_ovs_agent => true,
:firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
:db_name => 'quantum', :db_name => 'neutron',
:db_user => 'quantum', :db_user => 'neutron',
:db_password => 'quantum_db_password', :db_password => 'neutron_db_password',
:enable_dhcp_agent => true, :enable_dhcp_agent => true,
:enable_l3_agent => true, :enable_l3_agent => true,
:enable_metadata_agent => true, :enable_metadata_agent => true,
:auth_url => 'http://127.0.0.1:35357/v2.0', :auth_url => 'http://127.0.0.1:35357/v2.0',
:user_password => 'quantum_user_password', :user_password => 'neutron_user_password',
:shared_secret => 'shared_md_secret', :shared_secret => 'shared_md_secret',
:keystone_host => '127.0.0.1', :keystone_host => '127.0.0.1',
:enabled => true, :enabled => true,
@@ -130,8 +130,8 @@ describe 'openstack::all' do
context 'cinder enabled (which is the default)' do context 'cinder enabled (which is the default)' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:bridge_interface => 'eth0', :bridge_interface => 'eth0',
:ovs_local_ip => '10.0.1.1', :ovs_local_ip => '10.0.1.1',
:metadata_shared_secret => 'shared_md_secret' :metadata_shared_secret => 'shared_md_secret'
@@ -180,11 +180,11 @@ describe 'openstack::all' do
end end
end end
context 'cinder and quantum enabled (which is the default)' do context 'cinder and neutron enabled (which is the default)' do
before do before do
params.merge!( params.merge!(
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:bridge_interface => 'eth0', :bridge_interface => 'eth0',
:ovs_local_ip => '10.0.1.1', :ovs_local_ip => '10.0.1.1',
:metadata_shared_secret => 'shared_md_secret', :metadata_shared_secret => 'shared_md_secret',
@@ -211,10 +211,10 @@ describe 'openstack::all' do
:cinder_db_user => 'cinder', :cinder_db_user => 'cinder',
:cinder_db_password => 'cinder_db_password', :cinder_db_password => 'cinder_db_password',
:cinder_db_dbname => 'cinder', :cinder_db_dbname => 'cinder',
:quantum => true, :neutron => true,
:quantum_db_user => 'quantum', :neutron_db_user => 'neutron',
:quantum_db_password => 'quantum_db_password', :neutron_db_password => 'neutron_db_password',
:quantum_db_dbname => 'quantum', :neutron_db_dbname => 'neutron',
:allowed_hosts => '%', :allowed_hosts => '%',
:enabled => true :enabled => true
) )
@@ -240,8 +240,8 @@ describe 'openstack::all' do
:nova_user_password => 'nova_pass', :nova_user_password => 'nova_pass',
:cinder => true, :cinder => true,
:cinder_user_password => 'cinder_user_password', :cinder_user_password => 'cinder_user_password',
:quantum => true, :neutron => true,
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:enabled => true, :enabled => true,
:bind_host => '0.0.0.0' :bind_host => '0.0.0.0'
) )
@@ -295,8 +295,8 @@ describe 'openstack::all' do
:multi_host => false, :multi_host => false,
:public_interface => 'eth0', :public_interface => 'eth0',
:private_interface => false, :private_interface => false,
:quantum => true, :neutron => true,
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:metadata_shared_secret => 'shared_md_secret', :metadata_shared_secret => 'shared_md_secret',
:nova_admin_tenant_name => 'services', :nova_admin_tenant_name => 'services',
:nova_admin_user => 'nova', :nova_admin_user => 'nova',
@@ -326,11 +326,11 @@ describe 'openstack::all' do
end end
end end
context 'without quantum' do context 'without neutron' do
before do before do
params.merge!( params.merge!(
:cinder => false, :cinder => false,
:quantum => false, :neutron => false,
:private_interface => 'eth1') :private_interface => 'eth1')
end end

View File

@@ -12,7 +12,7 @@ describe 'openstack::client' do
it { should include_class('glance::client') } it { should include_class('glance::client') }
it { should include_class('keystone::client') } it { should include_class('keystone::client') }
it { should include_class('nova::client') } it { should include_class('nova::client') }
it { should include_class('quantum::client') } it { should include_class('neutron::client') }
end end
describe 'without ceilometer' do describe 'without ceilometer' do
@@ -40,8 +40,8 @@ describe 'openstack::client' do
it { should_not include_class('nova::client') } it { should_not include_class('nova::client') }
end end
describe 'without quantum' do describe 'without neutron' do
let (:params) { {:quantum => false }} let (:params) { {:neutron => false }}
it { should_not include_class('quantum::client') } it { should_not include_class('neutron::client') }
end end
end end

View File

@@ -16,7 +16,7 @@ describe 'openstack::compute' do
:enabled_apis => 'ec2,osapi_compute,metadata', :enabled_apis => 'ec2,osapi_compute,metadata',
:nova_db_password => 'pass', :nova_db_password => 'pass',
:cinder_db_password => 'cinder_pass', :cinder_db_password => 'cinder_pass',
:quantum => false, :neutron => false,
:fixed_range => '10.0.0.0/16' :fixed_range => '10.0.0.0/16'
} }
end end
@@ -180,14 +180,14 @@ describe 'openstack::compute' do
end end
end end
describe 'when quantum is false' do describe 'when neutron is false' do
describe 'configuring for multi host' do describe 'configuring for multi host' do
before do before do
params.merge!( params.merge!(
:multi_host => true, :multi_host => true,
:public_interface => 'eth0', :public_interface => 'eth0',
:quantum => false :neutron => false
) )
end end
@@ -199,7 +199,7 @@ describe 'openstack::compute' do
'enabled' => true, 'enabled' => true,
'install_service' => true 'install_service' => true
}) })
should_not contain_class('openstack::quantum') should_not contain_class('openstack::neutron')
end end
describe 'with defaults' do describe 'with defaults' do
@@ -270,22 +270,22 @@ describe 'openstack::compute' do
} }
end end
describe 'when configuring quantum' do describe 'when configuring neutron' do
before do before do
params.merge!( params.merge!(
:internal_address => '127.0.0.1', :internal_address => '127.0.0.1',
:public_interface => 'eth3', :public_interface => 'eth3',
:quantum => true, :neutron => true,
:keystone_host => '127.0.0.3', :keystone_host => '127.0.0.3',
:quantum_host => '127.0.0.2', :neutron_host => '127.0.0.2',
:ovs_enable_tunneling => true, :ovs_enable_tunneling => true,
:quantum_user_password => 'quantum_user_password', :neutron_user_password => 'neutron_user_password',
:quantum_firewall_driver => false :neutron_firewall_driver => false
) )
end end
it 'should configure quantum' do it 'should configure neutron' do
should contain_class('openstack::quantum').with( should contain_class('openstack::neutron').with(
:db_host => '127.0.0.1', :db_host => '127.0.0.1',
:ovs_local_ip => params[:internal_address], :ovs_local_ip => params[:internal_address],
:rabbit_host => params[:rabbit_host], :rabbit_host => params[:rabbit_host],
@@ -294,34 +294,34 @@ describe 'openstack::compute' do
:rabbit_password => params[:rabbit_password], :rabbit_password => params[:rabbit_password],
:enable_ovs_agent => true, :enable_ovs_agent => true,
:ovs_enable_tunneling => params[:ovs_enable_tunneling], :ovs_enable_tunneling => params[:ovs_enable_tunneling],
:firewall_driver => params[:quantum_firewall_driver], :firewall_driver => params[:neutron_firewall_driver],
:enable_l3_agent => false, :enable_l3_agent => false,
:enable_dhcp_agent => false, :enable_dhcp_agent => false,
:auth_url => 'http://127.0.0.1:35357/v2.0', :auth_url => 'http://127.0.0.1:35357/v2.0',
:user_password => params[:quantum_user_password], :user_password => params[:neutron_user_password],
:keystone_host => params[:keystone_host], :keystone_host => params[:keystone_host],
:enabled => true, :enabled => true,
:enable_server => false, :enable_server => false,
:verbose => false :verbose => false
) )
should contain_class('nova::compute::quantum').with( should contain_class('nova::compute::neutron').with(
:libvirt_vif_driver => 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver' :libvirt_vif_driver => 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver'
) )
should contain_class('nova::network::quantum').with( should contain_class('nova::network::neutron').with(
:quantum_admin_password => 'quantum_user_password', :neutron_admin_password => 'neutron_user_password',
:quantum_auth_strategy => 'keystone', :neutron_auth_strategy => 'keystone',
:quantum_url => "http://127.0.0.2:9696", :neutron_url => "http://127.0.0.2:9696",
:quantum_admin_tenant_name => 'services', :neutron_admin_tenant_name => 'services',
:quantum_admin_username => 'quantum', :neutron_admin_username => 'neutron',
:quantum_admin_auth_url => "http://127.0.0.3:35357/v2.0" :neutron_admin_auth_url => "http://127.0.0.3:35357/v2.0"
) )
should_not contain_class('quantum::server') should_not contain_class('neutron::server')
should_not contain_class('quantum::plugins::ovs') should_not contain_class('neutron::plugins::ovs')
should_not contain_class('quantum::agents::dhcp') should_not contain_class('neutron::agents::dhcp')
should_not contain_class('quantum::agents::l3') should_not contain_class('neutron::agents::l3')
end end
end end

View File

@@ -26,7 +26,7 @@ describe 'openstack::controller' do
:cinder_user_password => 'cinder_pass', :cinder_user_password => 'cinder_pass',
:secret_key => 'secret_key', :secret_key => 'secret_key',
:mysql_root_password => 'sql_pass', :mysql_root_password => 'sql_pass',
:quantum => false, :neutron => false,
:vncproxy_host => '10.0.0.1', :vncproxy_host => '10.0.0.1',
:nova_admin_tenant_name => 'services', :nova_admin_tenant_name => 'services',
:nova_admin_user => 'nova', :nova_admin_user => 'nova',
@@ -71,11 +71,11 @@ describe 'openstack::controller' do
default_params.merge( default_params.merge(
:enabled => true, :enabled => true,
:db_type => 'mysql', :db_type => 'mysql',
:quantum => true, :neutron => true,
:metadata_shared_secret => 'secret', :metadata_shared_secret => 'secret',
:bridge_interface => 'eth1', :bridge_interface => 'eth1',
:quantum_user_password => 'q_pass', :neutron_user_password => 'q_pass',
:quantum_db_password => 'q_db_pass', :neutron_db_password => 'q_db_pass',
:cinder => true :cinder => true
) )
end end
@@ -112,10 +112,10 @@ describe 'openstack::controller' do
:dbname => 'cinder', :dbname => 'cinder',
:allowed_hosts => '%' :allowed_hosts => '%'
) )
should contain_class('quantum::db::mysql').with( should contain_class('neutron::db::mysql').with(
:user => 'quantum', :user => 'neutron',
:password => 'q_db_pass', :password => 'q_db_pass',
:dbname => 'quantum', :dbname => 'neutron',
:allowed_hosts => '%' :allowed_hosts => '%'
) )
end end
@@ -125,16 +125,16 @@ describe 'openstack::controller' do
end end
context 'when cinder and quantum are false' do context 'when cinder and neutron are false' do
let :params do let :params do
default_params.merge( default_params.merge(
:quantum => false, :neutron => false,
:cinder => false :cinder => false
) )
end end
it do it do
should_not contain_class('quantum::db::mysql') should_not contain_class('neutron::db::mysql')
should_not contain_class('cinder::db::mysql') should_not contain_class('cinder::db::mysql')
end end
@@ -155,7 +155,7 @@ describe 'openstack::controller' do
config_hash['root_password'].should == 'sql_pass' config_hash['root_password'].should == 'sql_pass'
end end
['keystone', 'nova', 'glance', 'cinder', 'quantum'].each do |x| ['keystone', 'nova', 'glance', 'cinder', 'neutron'].each do |x|
it { should_not contain_class("#{x}::db::mysql") } it { should_not contain_class("#{x}::db::mysql") }
end end
end end
@@ -578,18 +578,18 @@ describe 'openstack::controller' do
context 'network config' do context 'network config' do
context 'when quantum' do context 'when neutron' do
let :params do let :params do
default_params.merge({ default_params.merge({
:quantum => true, :neutron => true,
:debug => true, :debug => true,
:verbose => true, :verbose => true,
:sql_idle_timeout => '30', :sql_idle_timeout => '30',
:quantum_user_password => 'q_pass', :neutron_user_password => 'q_pass',
:bridge_interface => 'eth_27', :bridge_interface => 'eth_27',
:internal_address => '10.0.0.3', :internal_address => '10.0.0.3',
:quantum_db_password => 'q_db_pass', :neutron_db_password => 'q_db_pass',
:metadata_shared_secret => 'secret', :metadata_shared_secret => 'secret',
:external_bridge_name => 'br-ex' :external_bridge_name => 'br-ex'
}) })
@@ -597,9 +597,9 @@ describe 'openstack::controller' do
it { should_not contain_class('nova::network') } it { should_not contain_class('nova::network') }
it 'should configure quantum' do it 'should configure neutron' do
should contain_class('openstack::quantum').with( should contain_class('openstack::neutron').with(
:db_host => '127.0.0.1', :db_host => '127.0.0.1',
:sql_idle_timeout => '30', :sql_idle_timeout => '30',
:rabbit_host => '127.0.0.1', :rabbit_host => '127.0.0.1',
@@ -613,9 +613,9 @@ describe 'openstack::controller' do
:bridge_uplinks => ["br-ex:eth_27"], :bridge_uplinks => ["br-ex:eth_27"],
:bridge_mappings => ["default:br-ex"], :bridge_mappings => ["default:br-ex"],
:enable_ovs_agent => true, :enable_ovs_agent => true,
:firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
:db_name => 'quantum', :db_name => 'neutron',
:db_user => 'quantum', :db_user => 'neutron',
:db_password => 'q_db_pass', :db_password => 'q_db_pass',
:enable_dhcp_agent => true, :enable_dhcp_agent => true,
:enable_l3_agent => true, :enable_l3_agent => true,
@@ -639,7 +639,7 @@ describe 'openstack::controller' do
context 'when multi-host is not set' do context 'when multi-host is not set' do
let :params do let :params do
default_params.merge(:quantum => false, :multi_host => false) default_params.merge(:neutron => false, :multi_host => false)
end end
it {should contain_class('nova::network').with( it {should contain_class('nova::network').with(
:private_interface => 'eth0', :private_interface => 'eth0',
@@ -657,7 +657,7 @@ describe 'openstack::controller' do
context 'when multi-host is set' do context 'when multi-host is set' do
let :params do let :params do
default_params.merge(:quantum => false, :multi_host => true) default_params.merge(:neutron => false, :multi_host => true)
end end
it { should contain_nova_config('DEFAULT/multi_host').with(:value => true)} it { should contain_nova_config('DEFAULT/multi_host').with(:value => true)}
it {should contain_class('nova::network').with( it {should contain_class('nova::network').with(

View File

@@ -11,7 +11,7 @@ describe 'openstack::keystone' do
:glance_user_password => 'pass', :glance_user_password => 'pass',
:nova_user_password => 'pass', :nova_user_password => 'pass',
:cinder_user_password => 'pass', :cinder_user_password => 'pass',
:quantum_user_password => 'pass', :neutron_user_password => 'pass',
:public_address => '127.0.0.1', :public_address => '127.0.0.1',
:db_host => '127.0.0.1', :db_host => '127.0.0.1',
:admin_email => 'root@localhost' :admin_email => 'root@localhost'
@@ -40,7 +40,7 @@ describe 'openstack::keystone' do
:enabled => true, :enabled => true,
:sql_connection => 'mysql://keystone:pass@127.0.0.1/keystone' :sql_connection => 'mysql://keystone:pass@127.0.0.1/keystone'
) )
[ 'glance', 'cinder', 'quantum' ].each do |type| [ 'glance', 'cinder', 'neutron' ].each do |type|
should contain_class("#{type}::keystone::auth").with( should contain_class("#{type}::keystone::auth").with(
:password => params["#{type}_user_password".intern], :password => params["#{type}_user_password".intern],
:public_address => params[:public_address], :public_address => params[:public_address],

View File

@@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe 'openstack::quantum' do describe 'openstack::neutron' do
let :facts do let :facts do
{:osfamily => 'Redhat'} {:osfamily => 'Redhat'}
@@ -14,7 +14,7 @@ describe 'openstack::quantum' do
} }
end end
context 'install quantum with default settings' do context 'install neutron with default settings' do
before do before do
params.delete(:db_password) params.delete(:db_password)
end end
@@ -24,9 +24,9 @@ describe 'openstack::quantum' do
end.to raise_error(Puppet::Error, /db password must be set/) end.to raise_error(Puppet::Error, /db password must be set/)
end end
end end
context 'install quantum with default and database password' do context 'install neutron with default and database password' do
it 'should perform default configuration' do it 'should perform default configuration' do
should contain_class('quantum').with( should contain_class('neutron').with(
:enabled => true, :enabled => true,
:bind_host => '0.0.0.0', :bind_host => '0.0.0.0',
:rabbit_host => '127.0.0.1', :rabbit_host => '127.0.0.1',
@@ -37,12 +37,12 @@ describe 'openstack::quantum' do
:verbose => false, :verbose => false,
:debug => false :debug => false
) )
should contain_class('quantum::server').with( should contain_class('neutron::server').with(
:auth_host => '127.0.0.1', :auth_host => '127.0.0.1',
:auth_password => 'q_user_pass' :auth_password => 'q_user_pass'
) )
should contain_class('quantum::plugins::ovs').with( should contain_class('neutron::plugins::ovs').with(
:sql_connection => "mysql://quantum:bar@127.0.0.1/quantum?charset=utf8", :sql_connection => "mysql://neutron:bar@127.0.0.1/neutron?charset=utf8",
:tenant_network_type => 'gre' :tenant_network_type => 'gre'
) )
end end
@@ -53,8 +53,8 @@ describe 'openstack::quantum' do
params.merge!(:enable_server => false) params.merge!(:enable_server => false)
end end
it 'should not configure server' do it 'should not configure server' do
should_not contain_class('quantum::server') should_not contain_class('neutron::server')
should_not contain_class('quantum::plugins::ovs') should_not contain_class('neutron::plugins::ovs')
end end
end end
@@ -67,12 +67,12 @@ describe 'openstack::quantum' do
:ovs_local_ip => '10.0.0.2' :ovs_local_ip => '10.0.0.2'
) )
end end
it { should contain_class('quantum::agents::ovs').with( it { should contain_class('neutron::agents::ovs').with(
:bridge_uplinks => ['br-ex:eth0'], :bridge_uplinks => ['br-ex:eth0'],
:bridge_mappings => ['default:br-ex'], :bridge_mappings => ['default:br-ex'],
:enable_tunneling => true, :enable_tunneling => true,
:local_ip => '10.0.0.2', :local_ip => '10.0.0.2',
:firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver' :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
)} )}
end end
@@ -80,7 +80,7 @@ describe 'openstack::quantum' do
before do before do
params.merge!(:enable_dhcp_agent => true) params.merge!(:enable_dhcp_agent => true)
end end
it { should contain_class('quantum::agents::dhcp').with( it { should contain_class('neutron::agents::dhcp').with(
:use_namespaces => true, :use_namespaces => true,
:debug => false :debug => false
) } ) }
@@ -90,7 +90,7 @@ describe 'openstack::quantum' do
before do before do
params.merge!(:enable_l3_agent => true) params.merge!(:enable_l3_agent => true)
end end
it { should contain_class('quantum::agents::l3').with( it { should contain_class('neutron::agents::l3').with(
:use_namespaces => true, :use_namespaces => true,
:debug => false :debug => false
) } ) }
@@ -113,7 +113,7 @@ describe 'openstack::quantum' do
:shared_secret => 'foo' :shared_secret => 'foo'
) )
end end
it { should contain_class('quantum::agents::metadata').with( it { should contain_class('neutron::agents::metadata').with(
:auth_password => 'q_user_pass', :auth_password => 'q_user_pass',
:shared_secret => 'foo', :shared_secret => 'foo',
:auth_url => 'http://localhost:35357/v2.0', :auth_url => 'http://localhost:35357/v2.0',

View File

@@ -9,9 +9,9 @@ describe 'openstack::nova::controller' do
:api_bind_address => '0.0.0.0', :api_bind_address => '0.0.0.0',
:rabbit_password => 'rabbit_pass', :rabbit_password => 'rabbit_pass',
:nova_user_password => 'nova_user_pass', :nova_user_password => 'nova_user_pass',
:quantum_user_password => 'quantum_user_pass', :neutron_user_password => 'neutron_user_pass',
:nova_db_password => 'nova_db_pass', :nova_db_password => 'nova_db_pass',
:quantum => true, :neutron => true,
:memcached_servers => false, :memcached_servers => false,
:metadata_shared_secret => 'secret' :metadata_shared_secret => 'secret'
} }
@@ -27,9 +27,9 @@ describe 'openstack::nova::controller' do
it { should contain_class('openstack::nova::controller') } it { should contain_class('openstack::nova::controller') }
context 'when configuring quantum' do context 'when configuring neutron' do
it 'should configure nova with quantum' do it 'should configure nova with neutron' do
should contain_class('nova::rabbitmq').with( should contain_class('nova::rabbitmq').with(
:userid => 'openstack', :userid => 'openstack',
@@ -59,16 +59,16 @@ describe 'openstack::nova::controller' do
:enabled_apis => 'ec2,osapi_compute,metadata', :enabled_apis => 'ec2,osapi_compute,metadata',
:api_bind_address => '0.0.0.0', :api_bind_address => '0.0.0.0',
:auth_host => '127.0.0.1', :auth_host => '127.0.0.1',
:quantum_metadata_proxy_shared_secret => 'secret' :neutron_metadata_proxy_shared_secret => 'secret'
) )
should contain_class('nova::network::quantum').with( should contain_class('nova::network::neutron').with(
:quantum_admin_password => 'quantum_user_pass', :neutron_admin_password => 'neutron_user_pass',
:quantum_auth_strategy => 'keystone', :neutron_auth_strategy => 'keystone',
:quantum_url => "http://127.0.0.1:9696", :neutron_url => "http://127.0.0.1:9696",
:quantum_admin_tenant_name => 'services', :neutron_admin_tenant_name => 'services',
:quantum_admin_username => 'quantum', :neutron_admin_username => 'neutron',
:quantum_admin_auth_url => "http://127.0.0.1:35357/v2.0" :neutron_admin_auth_url => "http://127.0.0.1:35357/v2.0"
) )
['nova::scheduler', 'nova::objectstore', 'nova::cert', 'nova::consoleauth', 'nova::conductor'].each do |x| ['nova::scheduler', 'nova::objectstore', 'nova::cert', 'nova::consoleauth', 'nova::conductor'].each do |x|

View File

@@ -24,13 +24,13 @@ describe 'openstack::provision' do
:tempest_repo_revision => 'stable/grizzly' :tempest_repo_revision => 'stable/grizzly'
) } ) }
it 'should configure quantum networks' do it 'should configure neutron networks' do
should contain_quantum_network('public').with( should contain_neutron_network('public').with(
'ensure' => 'present', 'ensure' => 'present',
'router_external' => true, 'router_external' => true,
'tenant_name' => 'admin' 'tenant_name' => 'admin'
) )
should contain_quantum_network('private').with( should contain_neutron_network('private').with(
'ensure' => 'present', 'ensure' => 'present',
'tenant_name' => 'demo' 'tenant_name' => 'demo'
) )

View File

@@ -40,24 +40,24 @@ nova --no-cache keypair-add --pub_key /tmp/id_rsa.pub key_cirros
instance_name='<%= @image_type %>_test_vm' instance_name='<%= @image_type %>_test_vm'
<% if @quantum -%> <% if @neutron -%>
quantum net-create public --router:external=True neutron net-create public --router:external=True
quantum subnet-create --allocation-pool start=172.16.2.128,end=172.16.2.150 public 172.16.2.0/24 neutron subnet-create --allocation-pool start=172.16.2.128,end=172.16.2.150 public 172.16.2.0/24
quantum net-create net1 neutron net-create net1
quantum subnet-create net1 10.0.0.0/24 neutron subnet-create net1 10.0.0.0/24
quantum_net=`quantum net-list | grep net1 | awk -F' ' '{print $2}'` neutron_net=`neutron net-list | grep net1 | awk -F' ' '{print $2}'`
quantum_public_net=`quantum net-list | grep public | awk -F' ' '{print $2}'` neutron_public_net=`neutron net-list | grep public | awk -F' ' '{print $2}'`
quantum_prv_subnet=`quantum subnet-list | grep '10.0.0.0/24' | awk -F' ' '{print $2}'` neutron_prv_subnet=`neutron subnet-list | grep '10.0.0.0/24' | awk -F' ' '{print $2}'`
quantum router-create router1 neutron router-create router1
quantum router-interface-add router1 $quantum_prv_subnet neutron router-interface-add router1 $neutron_prv_subnet
quantum router-gateway-set router1 $quantum_public_net neutron router-gateway-set router1 $neutron_public_net
nova --no-cache boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$quantum_net $instance_name nova --no-cache boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$neutron_net $instance_name
<% else -%> <% else -%>
<% if @floating_ip -%> <% if @floating_ip -%>
# create a security group so that we can allow ssh, http, and ping traffic # create a security group so that we can allow ssh, http, and ping traffic
@@ -84,7 +84,7 @@ sleep <%= @sleep_time %>
<% if @floating_ip -%> <% if @floating_ip -%>
# Now add the floating IP we reserved earlier to the machine. # Now add the floating IP we reserved earlier to the machine.
# if not quantum # if not neutron
nova --no-cache add-floating-ip $instance_name $floating_ip nova --no-cache add-floating-ip $instance_name $floating_ip
# Wait and then try to SSH to the node, leveraging the private key # Wait and then try to SSH to the node, leveraging the private key
# we generated earlier. # we generated earlier.
@@ -92,13 +92,13 @@ sleep <%= @sleep_time %>
ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
<% end -%> <% end -%>
<% if @quantum %> <% if @neutron %>
# get port # get port
ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'` ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'`
port_id=`quantum port-list | grep $ip_addr | awk -F' ' '{print $2}'` port_id=`neutron port-list | grep $ip_addr | awk -F' ' '{print $2}'`
floating_ip=`quantum floatingip-create --port_id $port_id $quantum_public_net | grep floating_ip_address | awk '{print $4}'` floating_ip=`neutron floatingip-create --port_id $port_id $neutron_public_net | grep floating_ip_address | awk '{print $4}'`
quantum security-group-rule-create --protocol icmp --direction ingress default neutron security-group-rule-create --protocol icmp --direction ingress default
quantum security-group-rule-create --protocol tcp --port-range-min 22 \ neutron security-group-rule-create --protocol tcp --port-range-min 22 \
--port-range-max 22 --direction ingress default --port-range-max 22 --direction ingress default
sleep <%= @sleep_time %> sleep <%= @sleep_time %>
ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname

View File

@@ -14,7 +14,7 @@ class { 'openstack::all':
private_interface => 'eth1', private_interface => 'eth1',
public_address => $::ipaddress_eth0, public_address => $::ipaddress_eth0,
public_interface => 'eth0', public_interface => 'eth0',
quantum => false, neutron => false,
rabbit_password => 'password', rabbit_password => 'password',
secret_key => '12345', secret_key => '12345',
} }

View File

@@ -14,7 +14,7 @@ class { 'openstack::controller':
private_interface => 'eth1', private_interface => 'eth1',
public_address => $::ipaddress_eth0, public_address => $::ipaddress_eth0,
public_interface => 'eth0', public_interface => 'eth0',
quantum => false, neutron => false,
rabbit_password => 'password', rabbit_password => 'password',
secret_key => '12345', secret_key => '12345',
} }

View File

@@ -6,7 +6,7 @@ class { 'openstack::compute':
libvirt_type => 'qemu', libvirt_type => 'qemu',
nova_db_password => 'password', nova_db_password => 'password',
nova_user_password => 'password', nova_user_password => 'password',
quantum => false, neutron => false,
rabbit_password => 'password', rabbit_password => 'password',
vncproxy_host => '192.168.1.1', vncproxy_host => '192.168.1.1',
} }

View File

@@ -71,7 +71,7 @@ node /openstack_all/ {
verbose => $verbose, verbose => $verbose,
auto_assign_floating_ip => $auto_assign_floating_ip, auto_assign_floating_ip => $auto_assign_floating_ip,
secret_key => $secret_key, secret_key => $secret_key,
quantum => false, neutron => false,
} }
class { 'openstack::auth_file': class { 'openstack::auth_file':
@@ -117,7 +117,7 @@ node /openstack_controller/ {
cinder_user_password => $cinder_user_password, cinder_user_password => $cinder_user_password,
glance_db_password => $glance_db_password, glance_db_password => $glance_db_password,
glance_user_password => $glance_user_password, glance_user_password => $glance_user_password,
quantum => false, neutron => false,
nova_db_password => $nova_db_password, nova_db_password => $nova_db_password,
nova_user_password => $nova_user_password, nova_user_password => $nova_user_password,
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
@@ -147,7 +147,7 @@ node /openstack_compute/ {
cinder_db_password => $cinder_db_password, cinder_db_password => $cinder_db_password,
nova_db_password => $nova_db_password, nova_db_password => $nova_db_password,
nova_user_password => $nova_user_password, nova_user_password => $nova_user_password,
quantum => false, neutron => false,
rabbit_host => $controller_node_internal, rabbit_host => $controller_node_internal,
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
rabbit_user => $rabbit_user, rabbit_user => $rabbit_user,