Browse Source

Merge remote branch 'cblument/openstack' into openstack

changes/27/26227/1
Dan Bode 10 years ago
parent
commit
0721fae13a
  1. 79
      nova/manifests/all.pp
  2. 2
      nova/manifests/api.pp
  3. 9
      nova/manifests/compute.pp
  4. 4
      nova/manifests/db.pp
  5. 33
      nova/manifests/init.pp
  6. 2
      nova/manifests/network.pp
  7. 2
      nova/manifests/objectstore.pp
  8. 2
      nova/manifests/scheduler.pp
  9. 34
      nova/tests/all.pp

79
nova/manifests/all.pp

@ -1,26 +1,77 @@
class nova::all(
$xenapi_connection_url,
$xenapi_connection_username,
$xenapi_connection_password,
$xenapi_inject_image = 'false',
$logdir,
$verbose,
$sql_connection,
$network_manager,
$image_service,
$verbose = 'undef',
$nodaemon = 'undef',
$flat_network_bridge = 'xenbr0',
$connection_type = 'xenapi',
$rescue_timeout = '86400',
$glance_host,
$glance_port,
$allow_admin_api = 'true',
$xenapi_inject_image = 'false',
$use_ipv6 = 'false',
$flat_injected = 'true',
$ipv6_backend = 'account_identifier'
$rabbit_host,
$rabbit_password,
$rabbit_port,
$rabbit_userid,
$rabbit_virtual_host,
$state_path,
$lock_path,
$service_down_time,
$quota_instances,
$quota_cores,
$quota_volumes,
$quota_gigabytes,
$quota_floating_ips,
$quota_metadata_items,
$quota_max_injected_files,
$quota_max_injected_file_content_bytes,
$quota_max_injected_file_path_bytes,
$host,
$connection_type,
$xenapi_connection_url,
$xenapi_connection_username,
$xenapi_connection_password,
$xenapi_inject_image = 'false'
) {
class { "nova": }
class { "nova":
logdir => $logdir,
verbose => $verbose,
sql_connection => $sql_connection,
network_manager => $network_manager,
image_service => $image_service,
flat_network_bridge => $flat_network_bridge,
glance_host => $glance_host,
glance_port => $glance_port,
allow_admin_api => $allow_admin_api,
rabbit_host => $rabbit_host,
rabbit_password => $rabbit_password,
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::compute": enabled => false }
class { "nova::compute":
host => $host,
connection_type => $connection_type,
xenapi_connection_url => $xenapi_connection_url,
xenapi_connection_username => $xenapi_connection_username,
xenapi_connection_password => $xenapi_connection_password,
xenapi_inject_image => $xenapi_inject_image,
enabled => false
}
class { "nova::network": enabled => false }
class { "nova::objectstore": enabled => false }
class { "nova::scheduler": enabled => false }

2
nova/manifests/api.pp

@ -14,6 +14,6 @@ class nova::api($enabled=false) inherits nova {
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-api"],
subscribe => File["/etc/nova/nova.conf"]
#subscribe => File["/etc/nova/nova.conf"]
}
}

9
nova/manifests/compute.pp

@ -1,6 +1,13 @@
class nova::compute(
$enabled = false,
$nova_config = '/etc/nova/nova.conf'
$nova_config = '/etc/nova/nova.conf',
$host,
$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
) {
Nova_config<| |>~>Service['nova_compute']

4
nova/manifests/db.pp

@ -5,8 +5,8 @@ class nova::db(
$host = 'localhost'
) {
mysql::db { $name:
user => $user,
password => $password,
db_user => $user,
db_pw => $password,
host => $host,
# I may want to inject some sql
# sql='',

33
nova/manifests/init.pp

@ -1,10 +1,33 @@
class nova(
$verbose = false,
$nodaemon = false
$logdir = ''
$sql_connection,
# just for network?
$network_manager
$nodaemon = false,
$logdir = '/var/log/nova',
$sql_connection,
$network_manager,
$image_service,
# is flat_network_bridge valid if network_manager is not FlatManager?
$flat_network_bridge,
$glance_host,
$glance_port, # default is 9292
$allow_admin_api,
$rabbit_host,
$rabbit_password,
$rabbit_port,
$rabbit_userid,
$rabbit_virtual_host,
# Following may need to be broken out to different nova services
$state_path,
$lock_path,
$service_down_time,
$quota_instances,
$quota_cores,
$quota_volumes,
$quota_gigabytes,
$quota_floating_ips,
$quota_metadata_items,
$quota_max_injected_files,
$quota_max_injected_file_content_bytes,
$quota_max_injected_file_path_bytes
) {
class { 'puppet': }

2
nova/manifests/network.pp

@ -15,6 +15,6 @@ class nova::network( $enabled=false ) inherits nova {
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-network"],
subscribe => File["/etc/nova/nova.conf"]
#subscribe => File["/etc/nova/nova.conf"]
}
}

2
nova/manifests/objectstore.pp

@ -15,6 +15,6 @@ class nova::objectstore( $enabled=false ) inherits nova {
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-objectstore"],
subscribe => File["/etc/nova/nova.conf"]
#subscribe => File["/etc/nova/nova.conf"]
}
}

2
nova/manifests/scheduler.pp

@ -15,6 +15,6 @@ class nova::scheduler( $enabled ) inherits nova {
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-scheduler"],
subscribe => File["/etc/nova/nova.conf"]
#subscribe => File["/etc/nova/nova.conf"]
}
}

34
nova/tests/all.pp

@ -3,31 +3,47 @@ stage { 'repo-setup':
}
class { 'apt':
disable_keys => true,
always_apt_update => true,
#always_apt_update => true,
stage => 'repo-setup',
}
class { 'nova::repo':
stage => 'repo-setup',
}
class { 'mysql::server':
root_password => 'password'
mysql_root_pw => 'password'
}
class { 'nova::all':
verbose => 'undef',
nodaemon => 'undef',
verbose => 'true',
logdir => '/var/log/nova',
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
network_manager => 'nova.network.manager.FlatManager',
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 => 'rabbit password>',
rabbit_port => '5672',
rabbit_userid => 'rabbit user>',
rabbit_virtual_host => '/',
state_path => 'var/lib/nova',
lock_path => 'var/lock/nova',
service_down_time => '180000000',
quota_instances => '1000000',
quota_cores => '1000000',
quota_volumes => '1000000',
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,
connection_type => 'xenapi',
xenapi_connection_url => 'https://<XenServer IP>',
xenapi_connection_username => 'root',
xenapi_connection_password => 'password',
xenapi_inject_image => 'false',
rescue_timeout => '86400',
allow_admin_api => 'true',
use_ipv6 => 'false',
flat_injected => 'true',
ipv6_backend => 'account_identifier',
}
Loading…
Cancel
Save