@@ -14,5 +14,6 @@ fixtures:
|
|||||||
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
|
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
|
||||||
'inifile': 'git://github.com/cprice-puppet/puppetlabs-inifile'
|
'inifile': 'git://github.com/cprice-puppet/puppetlabs-inifile'
|
||||||
"create_resources": 'git://github.com/puppetlabs/puppetlabs-create_resources'
|
"create_resources": 'git://github.com/puppetlabs/puppetlabs-create_resources'
|
||||||
|
'vswitch': 'git://github.com/ekarlso/puppet-vswitch'
|
||||||
symlinks:
|
symlinks:
|
||||||
"openstack": "#{source_dir}"
|
"openstack": "#{source_dir}"
|
||||||
|
@@ -263,6 +263,53 @@ class openstack::all (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# Set up Quantum
|
# Set up Quantum
|
||||||
|
$quantum_sql_connection = "mysql://${quantum_db_user}:${quantum_db_password}@127.0.0.1/${quantum_db_dbname}?charset=utf8"
|
||||||
|
|
||||||
|
class { 'quantum':
|
||||||
|
verbose => $verbose,
|
||||||
|
debug => $verbose,
|
||||||
|
rabbit_host => '127.0.0.1',
|
||||||
|
rabbit_user => $rabbit_user,
|
||||||
|
rabbit_password => $rabbit_password,
|
||||||
|
sql_connection => $quantum_sql_connection,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::server':
|
||||||
|
keystone_password => $quantum_user_password,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::agents::dhcp': }
|
||||||
|
|
||||||
|
class { 'nova::compute::quantum': }
|
||||||
|
|
||||||
|
nova_config {
|
||||||
|
'linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
|
||||||
|
'linuxnet_ovs_integration_bridge': value => 'br-int';
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::plugins::ovs':
|
||||||
|
sql_connection => $quantum_sql_connection,
|
||||||
|
tenant_network_type => 'gre',
|
||||||
|
# I need to know what this does...
|
||||||
|
local_ip => '10.0.0.1',
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::agents::ovs':
|
||||||
|
bridge_uplinks => ["br-virtual:${private_interface}"],
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'nova::network::quantum':
|
||||||
|
#$fixed_range,
|
||||||
|
quantum_admin_password => $quantum_user_password,
|
||||||
|
#$use_dhcp = 'True',
|
||||||
|
#$public_interface = undef,
|
||||||
|
quantum_connection_host => 'localhost',
|
||||||
|
quantum_auth_strategy => 'keystone',
|
||||||
|
quantum_url => "http://127.0.0.1:9696",
|
||||||
|
quantum_admin_tenant_name => 'services',
|
||||||
|
#quantum_admin_username => 'quantum',
|
||||||
|
quantum_admin_auth_url => "http://127.0.0.1:35357/v2.0",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $auto_assign_floating_ip {
|
if $auto_assign_floating_ip {
|
||||||
|
@@ -25,13 +25,18 @@ class openstack::compute (
|
|||||||
# DB
|
# DB
|
||||||
$sql_connection,
|
$sql_connection,
|
||||||
# Network
|
# Network
|
||||||
$quantum = true,
|
|
||||||
$public_interface = undef,
|
$public_interface = undef,
|
||||||
$private_interface = undef,
|
$private_interface = undef,
|
||||||
$fixed_range = undef,
|
$fixed_range = undef,
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
$network_config = {},
|
$network_config = {},
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
|
# Quantum
|
||||||
|
$quantum = true,
|
||||||
|
$quantum_sql_connection = false,
|
||||||
|
$quantum_host = false,
|
||||||
|
$quantum_user_password = false,
|
||||||
|
$keystone_host = false,
|
||||||
# Nova
|
# Nova
|
||||||
$purge_nova_config = true,
|
$purge_nova_config = true,
|
||||||
# Rabbit
|
# Rabbit
|
||||||
@@ -146,7 +151,56 @@ class openstack::compute (
|
|||||||
install_service => $enable_network_service,
|
install_service => $enable_network_service,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# TODO install quantum
|
|
||||||
|
if ! $quantum_sql_connection {
|
||||||
|
fail('quantum sql connection must be specified when quantum is installed on compute instances')
|
||||||
|
}
|
||||||
|
if ! $quantum_host {
|
||||||
|
fail('quantum host must be specified when quantum is installed on compute instances')
|
||||||
|
}
|
||||||
|
if ! $quantum_user_password {
|
||||||
|
fail('quantum user password must be set when quantum is configured')
|
||||||
|
}
|
||||||
|
if ! $keystone_host {
|
||||||
|
fail('keystone host must be configured when quantum is installed')
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum':
|
||||||
|
verbose => $verbose,
|
||||||
|
debug => $verbose,
|
||||||
|
rabbit_host => $rabbit_host,
|
||||||
|
rabbit_user => $rabbit_user,
|
||||||
|
rabbit_password => $rabbit_password,
|
||||||
|
sql_connection => $quantum_sql_connection,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::agents::ovs':
|
||||||
|
bridge_uplinks => ["br-virtual:${private_interface}"],
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::agents::dhcp': }
|
||||||
|
|
||||||
|
class { 'nova::compute::quantum': }
|
||||||
|
|
||||||
|
# does this have to be installed on the compute node?
|
||||||
|
# NOTE
|
||||||
|
class { 'nova::network::quantum':
|
||||||
|
#$fixed_range,
|
||||||
|
quantum_admin_password => $quantum_user_password,
|
||||||
|
#$use_dhcp = 'True',
|
||||||
|
#$public_interface = undef,
|
||||||
|
quantum_connection_host => $quantum_host,
|
||||||
|
#quantum_auth_strategy => 'keystone',
|
||||||
|
quantum_url => "http://${keystone_host}:9696",
|
||||||
|
quantum_admin_tenant_name => 'services',
|
||||||
|
#quantum_admin_username => 'quantum',
|
||||||
|
quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
nova_config {
|
||||||
|
'linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
|
||||||
|
'linuxnet_ovs_integration_bridge': value => 'br-int';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cinder) {
|
if ($cinder) {
|
||||||
|
@@ -136,6 +136,37 @@ class openstack::nova::controller (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# Set up Quantum
|
# Set up Quantum
|
||||||
|
$quantum_sql_connection = "mysql://${quantum_db_user}:${quantum_db_password}@${db_host}/${quantum_db_dbname}?charset=utf8"
|
||||||
|
class { 'quantum':
|
||||||
|
rabbit_user => $rabbit_user,
|
||||||
|
rabbit_password => $rabbit_password,
|
||||||
|
sql_connection => $quantum_sql_connection,
|
||||||
|
verbose => $verbose,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::server':
|
||||||
|
keystone_password => $quantum_user_password,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'quantum::plugins::ovs':
|
||||||
|
sql_connection => $quantum_sql_connection,
|
||||||
|
tenant_network_type => 'gre',
|
||||||
|
# I need to know what this does...
|
||||||
|
local_ip => '10.0.0.1',
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'nova::network::quantum':
|
||||||
|
#$fixed_range,
|
||||||
|
quantum_admin_password => $quantum_user_password,
|
||||||
|
#$use_dhcp = 'True',
|
||||||
|
#$public_interface = undef,
|
||||||
|
quantum_connection_host => 'localhost',
|
||||||
|
quantum_auth_strategy => 'keystone',
|
||||||
|
quantum_url => "http://$keystone_host}:9696",
|
||||||
|
quantum_admin_tenant_name => 'services',
|
||||||
|
#quantum_admin_username => 'quantum',
|
||||||
|
quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $auto_assign_floating_ip {
|
if $auto_assign_floating_ip {
|
||||||
|
@@ -24,9 +24,9 @@ wget http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd6
|
|||||||
glance add name="precise-amd64" is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img
|
glance add name="precise-amd64" is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img
|
||||||
# Caputre the Image ID so taht we can call the right UUID for this image
|
# Caputre the Image ID so taht we can call the right UUID for this image
|
||||||
IMAGE_ID=`glance index | grep 'precise-amd64' | head -1 | awk -F' ' '{print $1}'`
|
IMAGE_ID=`glance index | grep 'precise-amd64' | head -1 | awk -F' ' '{print $1}'`
|
||||||
|
login_user='ubuntu'
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
login_user='ubuntu'
|
|
||||||
|
|
||||||
# create a pub/priv keypair
|
# create a pub/priv keypair
|
||||||
ssh-keygen -f /tmp/id_rsa -t rsa -N ''
|
ssh-keygen -f /tmp/id_rsa -t rsa -N ''
|
||||||
|
Reference in New Issue
Block a user