Added nova_config code to manifests.
This commit is contained in:
parent
ac8c7f4f79
commit
409f625e77
|
@ -1,16 +1,22 @@
|
||||||
|
# this class should probably never be declared except
|
||||||
|
# from the virtualization implementation of the compute node
|
||||||
class nova::compute(
|
class nova::compute(
|
||||||
$enabled = false,
|
$enabled = false
|
||||||
$nova_config = '/etc/nova/nova.conf',
|
# $type,
|
||||||
$host,
|
# $hash,
|
||||||
$connection_type,
|
|
||||||
# There will need to be a map of host compute vm to host instance
|
|
||||||
$xenapi_connection_url,
|
|
||||||
$xenapi_connection_username,
|
|
||||||
$xenapi_connection_password,
|
|
||||||
$xenapi_inject_image
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
# if $type == 'xenserver' {
|
||||||
|
# class { 'nova::compute::xenserver':
|
||||||
|
# xenapi_connection_url => $hash['xen_connection_url'],
|
||||||
|
# $xenapi_connection_url,
|
||||||
|
# $xenapi_connection_username,
|
||||||
|
# $xenapi_connection_password,
|
||||||
|
# $xenapi_inject_image=false,
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
Nova_config<| |>~>Service['nova_compute']
|
Nova_config<| |>~>Service['nova-compute']
|
||||||
|
|
||||||
if $enabled {
|
if $enabled {
|
||||||
$service_ensure = 'running'
|
$service_ensure = 'running'
|
||||||
|
|
|
@ -1,25 +1,20 @@
|
||||||
class nova::compute::xenserver(
|
class nova::compute::xenserver(
|
||||||
$enabled = false
|
$host,
|
||||||
$xenapi_connection_url,
|
$xenapi_connection_url,
|
||||||
$xenapi_connection_username,
|
$xenapi_connection_username,
|
||||||
$xenapi_connection_password,
|
$xenapi_connection_password,
|
||||||
$xenapi_inject_image=false,
|
$xenapi_inject_image=false,
|
||||||
|
$enabled = false
|
||||||
) inherits nova {
|
) inherits nova {
|
||||||
|
|
||||||
class { 'nova::compute':
|
class { 'nova::compute':
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
nova_config { 'xenapi_connection_url':
|
nova_config {
|
||||||
value => $xenapi_connection_url,
|
'xenapi_connection_url': value => $xenapi_connection_url;
|
||||||
}
|
'xenapi_connection_username': value => $xenapi_connection_username;
|
||||||
nova_config { 'xenapi_connection_username':
|
'xenapi_connection_password': value => $xenapi_connection_password;
|
||||||
value => $xenapi_connection_username,
|
'xenapi_inject_image': value => $xenapi_inject_image;
|
||||||
}
|
|
||||||
nova_config { 'xenapi_connection_password':
|
|
||||||
value => $xenapi_connection_password,
|
|
||||||
}
|
|
||||||
nova_config { 'xenapi_inject_image':
|
|
||||||
value => $xenapi_inject_image,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,5 +48,37 @@ class nova(
|
||||||
require => Package["python-greenlet"]
|
require => Package["python-greenlet"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nova_config {
|
||||||
|
'verbose': value => $verbose;
|
||||||
|
'nodaemon': value => $nodaemon;
|
||||||
|
'logdir': value => $logdir;
|
||||||
|
'sql_connection': value => $sql_connection;
|
||||||
|
'network_manager': value => $network_manager;
|
||||||
|
'image_service': value => $image_service;
|
||||||
|
# is flat_network_bridge valid if network_manager is not FlatManager?
|
||||||
|
'flat_network_bridge': value => $flat_network_bridge;
|
||||||
|
'glance_host': value => $glance_host;
|
||||||
|
'glance_port': value => $glance_port; # default is 9292
|
||||||
|
'allow_admin_api': value => $allow_admin_api;
|
||||||
|
'rabbit_host': value => $rabbit_host;
|
||||||
|
'rabbit_password': value => $rabbit_password;
|
||||||
|
'rabbit_port': value => $rabbit_port;
|
||||||
|
'rabbit_userid': value => $rabbit_userid;
|
||||||
|
'rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||||
|
# Following may need to be broken out to different nova services
|
||||||
|
'state_path': value => $state_path;
|
||||||
|
'lock_path': value => $lock_path;
|
||||||
|
'service_down_time': value => $service_down_time;
|
||||||
|
'quota_instances': value => $quota_instances;
|
||||||
|
'quota_cores': value => $quota_cores;
|
||||||
|
'quota_volumes': value => $quota_volumes;
|
||||||
|
'quota_gigabytes': value => $quota_gigabytes;
|
||||||
|
'quota_floating_ips': value => $quota_floating_ips;
|
||||||
|
'quota_metadata_items': value => $quota_metadata_items;
|
||||||
|
'quota_max_injected_files': value => $quota_max_injected_files;
|
||||||
|
'quota_max_injected_file_content_bytes': value => $quota_max_injected_file_content_bytes;
|
||||||
|
'quota_max_injected_file_path_bytes': value => $quota_max_injected_file_path_bytes
|
||||||
|
}
|
||||||
|
|
||||||
Nova_config<| |> { require +> Package["nova-common"] }
|
Nova_config<| |> { require +> Package["nova-common"] }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
Nova_config { target => '/tmp/nova.config' }
|
||||||
|
|
||||||
stage { 'repo-setup':
|
stage { 'repo-setup':
|
||||||
before => Stage['main'],
|
before => Stage['main'],
|
||||||
}
|
}
|
||||||
|
@ -19,13 +21,13 @@ class { 'nova::all':
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
network_manager => 'nova.network.manager.FlatManager',
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
image_service => 'nova.image.glance.GlanceImageService',
|
||||||
flat_network_bridge => 'xenbr0',
|
flat_network_bridge => 'xenbr0',
|
||||||
glance_host => '<glance ip address>',
|
glance_host => 'glance_ip_address',
|
||||||
glance_port => '9292',
|
glance_port => '9292',
|
||||||
allow_admin_api => 'true',
|
allow_admin_api => 'true',
|
||||||
rabbit_host => 'rabbit ip address>',
|
rabbit_host => 'rabbit_ip_address',
|
||||||
rabbit_password => 'rabbit password>',
|
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',
|
state_path => 'var/lib/nova',
|
||||||
lock_path => 'var/lock/nova',
|
lock_path => 'var/lock/nova',
|
||||||
|
@ -40,7 +42,7 @@ class { 'nova::all':
|
||||||
quota_max_injected_file_content_bytes => '1000000',
|
quota_max_injected_file_content_bytes => '1000000',
|
||||||
quota_max_injected_file_path_bytes => '1000000',
|
quota_max_injected_file_path_bytes => '1000000',
|
||||||
host => $ipaddress,
|
host => $ipaddress,
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
xenapi_connection_url => 'https://<XenServer_IP>',
|
||||||
xenapi_connection_username => 'root',
|
xenapi_connection_username => 'root',
|
||||||
xenapi_connection_password => 'password',
|
xenapi_connection_password => 'password',
|
||||||
xenapi_inject_image => 'false',
|
xenapi_inject_image => 'false',
|
||||||
|
|
Loading…
Reference in New Issue