Skip to content

Commit

Permalink
Merge pull request #122 from bodepd/folsom_quantum_updates
Browse files Browse the repository at this point in the history
quantum updates
  • Loading branch information
bodepd committed Nov 2, 2012
2 parents bf72309 + ad142c3 commit 0921350
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 22 deletions.
4 changes: 2 additions & 2 deletions manifests/all.pp
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,10 @@
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,
auth_password => $quantum_user_password,
}

class { 'quantum::agents::dhcp': }
Expand All @@ -292,6 +291,7 @@
tenant_network_type => 'gre',
# I need to know what this does...
local_ip => '10.0.0.1',
enable_tunneling => true,
}

class { 'quantum::agents::ovs':
Expand Down
21 changes: 17 additions & 4 deletions manifests/compute.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$network_config = {},
$multi_host = false,
# Quantum
$quantum = true,
$quantum = false,
$quantum_sql_connection = false,
$quantum_host = false,
$quantum_user_password = false,
Expand Down Expand Up @@ -171,14 +171,27 @@
rabbit_host => $rabbit_host,
rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password,
sql_connection => $quantum_sql_connection,
#sql_connection => $quantum_sql_connection,
}

class { 'quantum::plugins::ovs':
tenant_network_type => 'gre',
enable_tunneling => true,
}

class { 'quantum::agents::ovs':
bridge_uplinks => ["br-virtual:${private_interface}"],
bridge_uplinks => ["br-virtual:${private_interface}"],
enable_tunneling => true,
local_ip => $internal_address,
}

class { 'quantum::agents::dhcp': }
class { 'quantum::agents::dhcp':
use_namespaces => False,
}

class { 'quantum::agents::l3':
auth_password => $quantum_user_password,
}

class { 'nova::compute::quantum': }

Expand Down
7 changes: 6 additions & 1 deletion manifests/controller.pp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
$cinder_db_user = 'cinder',
$cinder_db_dbname = 'cinder',
# quantum
$quantum = true,
$quantum = false,
$quantum_db_user = 'quantum',
$quantum_db_dbname = 'quantum',
$enabled = true
Expand Down Expand Up @@ -253,7 +253,12 @@
multi_host => $multi_host,
public_interface => $public_interface,
private_interface => $private_interface,
# Quantum
quantum => $quantum,
quantum_user_password => $quantum_user_password,
quantum_db_password => $quantum_db_password,
quantum_db_user => $quantum_db_user,
quantum_db_dbname => $quantum_db_dbname,
# Nova
nova_user_password => $nova_user_password,
nova_db_password => $nova_db_password,
Expand Down
35 changes: 30 additions & 5 deletions manifests/nova/controller.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
$multi_host = false,
$public_interface = undef,
$private_interface = undef,
$quantum = true,
# quantum
$quantum = false,
$quantum_db_dbname = 'quantum',
$quantum_db_user = 'quantum',
$quantum_db_password = 'quantum_pass',
$quantum_user_password = 'quantum_pass',
# Nova
$nova_db_user = 'nova',
$nova_db_dbname = 'nova',
Expand Down Expand Up @@ -140,21 +145,41 @@
class { 'quantum':
rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password,
sql_connection => $quantum_sql_connection,
#sql_connection => $quantum_sql_connection,
verbose => $verbose,
debug => $verbose,
}

class { 'quantum::server':
keystone_password => $quantum_user_password,
auth_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',
enable_tunneling => true,
}

class { 'quantum::agents::ovs':
bridge_uplinks => ["br-virtual:${private_interface}"],
enable_tunneling => true,
local_ip => $internal_address,
}

class { 'quantum::agents::dhcp':
use_namespaces => False,
}


# class { 'quantum::agents::dhcp':
# use_namespaces => False,
# }
#
#
# class { 'quantum::agents::l3':
# auth_password => $quantum_user_password,
# }

class { 'nova::network::quantum':
#$fixed_range,
quantum_admin_password => $quantum_user_password,
Expand Down
22 changes: 12 additions & 10 deletions spec/classes/openstack_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@
)
end

it { should contain_class('mysql::server').with(
:config_hash => {'bind_address' => '0.0.0.0', 'root_password' => 'sql_pass' },
:enabled => true
)
}
it 'should configure mysql server' do
param_value(subject, 'class', 'mysql::server', 'enabled').should be_true
config_hash = param_value(subject, 'class', 'mysql::server', 'config_hash')
config_hash['bind_address'].should == '0.0.0.0'
config_hash['root_password'].should == 'sql_pass'
end

it 'should contain openstack db config' do
should contain_class('keystone::db::mysql').with(
Expand Down Expand Up @@ -129,11 +130,12 @@
)
end

it { should contain_class('mysql::server').with(
:config_hash => {'bind_address' => '0.0.0.0', 'root_password' => 'sql_pass' },
:enabled => false
)
}
it 'should configure mysql server' do
param_value(subject, 'class', 'mysql::server', 'enabled').should be_false
config_hash = param_value(subject, 'class', 'mysql::server', 'config_hash')
config_hash['bind_address'].should == '0.0.0.0'
config_hash['root_password'].should == 'sql_pass'
end

['keystone', 'nova', 'glance', 'cinder', 'quantum'].each do |x|
it { should_not contain_class("#{x}::db::mysql") }
Expand Down

0 comments on commit 0921350

Please sign in to comment.