Created test/manifest for all-in-one install.
This commit is contained in:
parent
8855070018
commit
72f8534712
167
manifests/all.pp
167
manifests/all.pp
|
@ -1,89 +1,102 @@
|
||||||
#
|
#
|
||||||
# TODO - this is currently hardcoded to be a xenserver
|
# TODO - this is currently hardcoded to be a xenserver
|
||||||
class nova::all(
|
class nova::all(
|
||||||
$logdir,
|
$db_password,
|
||||||
$verbose,
|
$db_name = 'nova',
|
||||||
$sql_connection='mysql://root:<password>@127.0.0.1/nova',
|
$db_user = 'nova',
|
||||||
$network_manager,
|
$db_host = 'localhost',
|
||||||
$image_service,
|
|
||||||
$flat_network_bridge = 'xenbr0',
|
$rabbit_port = undef,
|
||||||
$glance_host,
|
$rabbit_userid = undef,
|
||||||
$glance_port,
|
$rabbit_password = undef,
|
||||||
$allow_admin_api = 'true',
|
$rabbit_virtual_host = undef,
|
||||||
$rabbit_host=$::ipaddress,
|
$rabbit_host = undef,
|
||||||
$rabbit_password,
|
|
||||||
$rabbit_port,
|
$flat_network_bridge = 'br100',
|
||||||
$rabbit_userid,
|
$flat_network_bridge_ip = '11.0.0.1',
|
||||||
$rabbit_virtual_host,
|
$flat_network_bridge_netmask = '255.255.255.0',
|
||||||
$state_path,
|
|
||||||
$lock_path,
|
$nova_network = '11.0.0.0',
|
||||||
$service_down_time,
|
$available_ips = '256',
|
||||||
$quota_instances,
|
|
||||||
$quota_cores,
|
$image_service = 'nova.image.glance.GlanceImageService',
|
||||||
$quota_volumes,
|
$glance_host = 'localhost',
|
||||||
$quota_gigabytes,
|
$glance_port = '9292',
|
||||||
$quota_floating_ips,
|
|
||||||
$quota_metadata_items,
|
$admin_user = 'novaadmin',
|
||||||
$quota_max_injected_files,
|
$project_name = 'nova',
|
||||||
$quota_max_injected_file_content_bytes,
|
|
||||||
$quota_max_injected_file_path_bytes,
|
$verbose = undef
|
||||||
$host,
|
|
||||||
$compute_type = 'libvirt',
|
|
||||||
# do kvm and libvirt have extra config options?
|
|
||||||
$xenapi_connection_url,
|
|
||||||
$xenapi_connection_username,
|
|
||||||
$xenapi_connection_password,
|
|
||||||
$xenapi_inject_image = 'false',
|
|
||||||
$db_host = 'localhost'
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class { "nova":
|
|
||||||
logdir => $logdir,
|
# work around hostname bug, LP #653405
|
||||||
verbose => $verbose,
|
host { $hostname:
|
||||||
sql_connection => $sql_connection,
|
ip => $ipaddress,
|
||||||
network_manager => $network_manager,
|
host_aliases => $fqdn,
|
||||||
image_service => $image_service,
|
}
|
||||||
flat_network_bridge => $flat_network_bridge,
|
class { 'nova::rabbitmq':
|
||||||
glance_host => $glance_host,
|
port => $rabbit_port,
|
||||||
glance_port => $glance_port,
|
userid => $rabbit_userid,
|
||||||
allow_admin_api => $allow_admin_api,
|
password => $rabbit_password,
|
||||||
rabbit_host => $rabbit_host,
|
virtual_host => $rabbit_virtual_host,
|
||||||
rabbit_password => $rabbit_password,
|
require => Host[$hostname],
|
||||||
rabbit_port => $rabbit_port,
|
|
||||||
rabbit_userid => $rabbit_userid,
|
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
|
||||||
state_path => $state_path,
|
|
||||||
lock_path => $lock_path,
|
|
||||||
service_down_time => $service_down_time,
|
|
||||||
quota_instances => $quota_instances,
|
|
||||||
quota_cores => $quota_cores,
|
|
||||||
quota_volumes => $quota_volumes,
|
|
||||||
quota_gigabytes => $quota_gigabytes,
|
|
||||||
quota_floating_ips => $quota_floating_ips,
|
|
||||||
quota_metadata_items => $quota_metadata_items,
|
|
||||||
quota_max_injected_files => $quota_max_injected_files,
|
|
||||||
quota_max_injected_file_content_bytes => $quota_max_injected_file_content_bytes,
|
|
||||||
quota_max_injected_file_path_bytes => $quota_max_injected_file_path_bytes,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { "nova::api": enabled => false }
|
class { "nova":
|
||||||
class { "nova::compute":
|
verbose => $verbose,
|
||||||
compute_type => $compute_type,
|
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
|
||||||
host => $host,
|
image_service => $image_service,
|
||||||
xenapi_connection_url => $xenapi_connection_url,
|
glance_host => $glance_host,
|
||||||
xenapi_connection_username => $xenapi_connection_username,
|
glance_port => $glance_port,
|
||||||
xenapi_connection_password => $xenapi_connection_password,
|
rabbit_host => $rabbit_host,
|
||||||
xenapi_inject_image => $xenapi_inject_image,
|
rabbit_port => $rabbit_port,
|
||||||
enabled => false
|
rabbit_userid => $rabbit_userid,
|
||||||
|
rabbit_password => $rabbit_password,
|
||||||
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
}
|
}
|
||||||
class { "nova::network": enabled => false }
|
|
||||||
class { "nova::objectstore": enabled => false }
|
class { "nova::api": enabled => true }
|
||||||
class { "nova::scheduler": enabled => false }
|
|
||||||
|
class { "nova::compute":
|
||||||
|
api_server => $ipaddress,
|
||||||
|
enabled => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { "nova::network::flat":
|
||||||
|
enabled => true,
|
||||||
|
flat_network_bridge => $flat_network_bridge,
|
||||||
|
flat_network_bridge_ip => $flat_network_bridge_ip,
|
||||||
|
flat_network_bridge_netmask => $flat_network_bridge_netmask,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { "nova::objectstore": enabled => true }
|
||||||
|
class { "nova::scheduler": enabled => true }
|
||||||
class { 'nova::db':
|
class { 'nova::db':
|
||||||
# pass in db config as params
|
# pass in db config as params
|
||||||
password => 'password',
|
password => $db_password,
|
||||||
name => 'nova',
|
name => $db_name,
|
||||||
user => 'nova',
|
user => $db_user,
|
||||||
host => 'localhost',
|
host => $db_host,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nova::manage::admin { $admin_user: }
|
||||||
|
nova::manage::project { $project_name:
|
||||||
|
owner => $admin_user,
|
||||||
|
}
|
||||||
|
|
||||||
|
nova::manage::network { "${project_name}-net-${network}":
|
||||||
|
network => $nova_network,
|
||||||
|
available_ips => $available_ips,
|
||||||
|
require => Nova::Manage::Project[$project_name],
|
||||||
|
}
|
||||||
|
|
||||||
|
# set up glance server
|
||||||
|
class { 'glance::api':
|
||||||
|
swift_store_user => 'foo_user',
|
||||||
|
swift_store_key => 'foo_pass',
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'glance::registry': }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
60
tests/all.pp
60
tests/all.pp
|
@ -1,4 +1,3 @@
|
||||||
Nova_config { target => '/tmp/nova.config' }
|
|
||||||
resources { 'nova_config':
|
resources { 'nova_config':
|
||||||
purge => true,
|
purge => true,
|
||||||
}
|
}
|
||||||
|
@ -6,47 +5,30 @@ resources { 'nova_config':
|
||||||
stage { 'repo-setup':
|
stage { 'repo-setup':
|
||||||
before => Stage['main'],
|
before => Stage['main'],
|
||||||
}
|
}
|
||||||
class { 'apt':
|
#class { 'apt':
|
||||||
disable_keys => true,
|
# disable_keys => true,
|
||||||
#always_apt_update => true,
|
# #always_apt_update => true,
|
||||||
stage => 'repo-setup',
|
# stage => 'repo-setup',
|
||||||
}
|
#}
|
||||||
class { 'nova::repo':
|
#class { 'nova::repo':
|
||||||
stage => 'repo-setup',
|
# stage => 'repo-setup',
|
||||||
}
|
#}
|
||||||
class { 'mysql::server':
|
class { 'mysql::server': }
|
||||||
root_password => 'password'
|
|
||||||
}
|
|
||||||
class { 'nova::all':
|
class { 'nova::all':
|
||||||
verbose => 'true',
|
db_password => 'password',
|
||||||
logdir => '/var/log/nova',
|
db_name => 'nova',
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
db_user => 'nova',
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
db_host => 'localhost',
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
glance_host => 'glance_ip_address',
|
|
||||||
glance_port => '9292',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
rabbit_host => 'rabbit_ip_address',
|
|
||||||
rabbit_password => 'rabbitpassword',
|
rabbit_password => 'rabbitpassword',
|
||||||
rabbit_port => '5672',
|
rabbit_port => '5672',
|
||||||
rabbit_userid => 'rabbit_user',
|
rabbit_userid => 'rabbit_user',
|
||||||
rabbit_virtual_host => '/',
|
rabbit_virtual_host => '/',
|
||||||
state_path => '/var/lib/nova',
|
rabbit_host => 'localhost',
|
||||||
lock_path => '/var/lock/nova',
|
|
||||||
service_down_time => '180000000',
|
image_service => 'nova.image.glance.GlanceImageService',
|
||||||
quota_instances => '1000000',
|
|
||||||
quota_cores => '1000000',
|
glance_host => 'localhost',
|
||||||
quota_volumes => '1000000',
|
glance_port => '9292',
|
||||||
quota_gigabytes => '1000000',
|
|
||||||
quota_floating_ips => '1000000',
|
|
||||||
quota_metadata_items => '1000000',
|
|
||||||
quota_max_injected_files => '1000000',
|
|
||||||
quota_max_injected_file_content_bytes => '1000000',
|
|
||||||
quota_max_injected_file_path_bytes => '1000000',
|
|
||||||
host => $ipaddress,
|
|
||||||
xenapi_connection_url => 'https://<XenServer_IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue