Add Nova Compute configuration
This commit is contained in:
parent
4e4a4ca83f
commit
951ae08f0b
@ -47,7 +47,12 @@ class kickstack (
|
||||
$nic_data = $kickstack::params::nic_data,
|
||||
$nic_external = $kickstack::params::nic_external,
|
||||
$quantum_router_id = $kickstack::params::quantum_router_id,
|
||||
$quantum_gateway_external_network_id = $kickstack::params::quantum_gateway_external_network_id
|
||||
$quantum_gateway_external_network_id = $kickstack::params::quantum_gateway_external_network_id,
|
||||
$nova_compute_driver = $kickstack::params::nova_compute_driver,
|
||||
$nova_compute_libvirt_type = $kickstack::params::nova_compute_libvirt_type,
|
||||
$xenapi_connection_url = $kickstack::params::xenapi_connection_url,
|
||||
$xenapi_connection_username = $kickstack::params::xenapi_connection_username,
|
||||
$xenapi_connection_password = $kickstack::params::xenapi_connection_password
|
||||
) inherits kickstack::params {
|
||||
|
||||
include exportfact
|
||||
|
@ -1,3 +1,4 @@
|
||||
class kickstack::node::compute inherits kickstack {
|
||||
include kickstack::quantum::agent::l2
|
||||
include kickstack::nova::compute
|
||||
}
|
||||
|
43
manifests/nova/compute.pp
Normal file
43
manifests/nova/compute.pp
Normal file
@ -0,0 +1,43 @@
|
||||
class kickstack::nova::compute inherits kickstack {
|
||||
|
||||
include kickstack::nova::config
|
||||
|
||||
$keystone_internal_address = getvar("${fact_prefix}keystone_internal_address")
|
||||
$quantum_admin_password = getvar("${fact_prefix}quantum_keystone_password")
|
||||
$quantum_host = getvar("${fact_prefix}quantum_host")
|
||||
$vncproxy_host = getvar("${fact_prefix}vncproxy_host")
|
||||
|
||||
class { '::nova::compute':
|
||||
enabled => true,
|
||||
vnc_enabled => true,
|
||||
vncserver_proxyclient_address => getvar("ipaddress_${::kickstack::nic_management}"),
|
||||
vncproxy_host => $vncproxy_host,
|
||||
virtio_nic => true,
|
||||
}
|
||||
|
||||
case "$::kickstack::nova_compute_driver" {
|
||||
'libvirt': {
|
||||
class { '::nova::compute::libvirt':
|
||||
libvirt_type => "$::kickstack::nova_compute_libvirt_type",
|
||||
}
|
||||
}
|
||||
'xenserver': {
|
||||
class { '::nova::compute::xenserver':
|
||||
xenapi_connection_url => "$::kickstack::nova_compute_xenapi_connection_url",
|
||||
xenapi_connection_username => "$::kickstack::nova_compute_xenapi_connection_username",
|
||||
xenapi_connection_password => "$::kickstack::nova_compute_xenapi_connection_password"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class { '::nova::network::quantum':
|
||||
quantum_admin_password => $quantum_admin_password,
|
||||
quantum_auth_strategy => 'keystone',
|
||||
quantum_url => "http://${quantum_host}:9696",
|
||||
quantum_admin_tenant_name => "$::kickstack::keystone_service_tenant",
|
||||
quantum_region_name => "$::kickstack::keystone_region",
|
||||
quantum_admin_username => 'quantum',
|
||||
quantum_admin_auth_url => "http://${keystone_internal_address}:35357/v2.0",
|
||||
security_group_api => 'quantum',
|
||||
}
|
||||
}
|
@ -4,4 +4,10 @@ class kickstack::nova::vncproxy inherits kickstack {
|
||||
|
||||
kickstack::nova::service { 'vncproxy': }
|
||||
|
||||
kickstack::exportfact::export { "vncproxy_host":
|
||||
value => "${hostname}",
|
||||
tag => "nova",
|
||||
require => Kickstack::Nova::Service["vncproxy"]
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -131,4 +131,22 @@ class kickstack::params {
|
||||
$quantum_router_id = getvar("::${variable_prefix}quantum_router_id")
|
||||
|
||||
$quantum_gateway_external_network_id = getvar("::${variable_prefix}gateway_external_network_id")
|
||||
|
||||
# The nova-compute backend driver.
|
||||
# Supported: libvirt (default), xenserver
|
||||
$nova_compute_driver = pick(getvar("::${variable_prefix}nova_compute_driver"),'libvirt')
|
||||
|
||||
# The hypervisor to use with libvirt (ignored unless nova_compute_driver==libvirt)
|
||||
# Supported: kvm (default), qemu
|
||||
$nova_compute_libvirt_type = pick(getvar("::${variable_prefix}nova_compute_libvirt_type"),'kvm')
|
||||
|
||||
# The XenAPI connection URL (ignored unless nova_compute_driver==xenserver)
|
||||
$xenapi_connection_url = getvar("::${variable_prefix}xenapi_connection_url")
|
||||
|
||||
# The XenAPI user name (ignored unless nova_compute_driver==xenserver)
|
||||
$xenapi_connection_username = getvar("::${variable_prefix}xenapi_connection_username")
|
||||
|
||||
# The XenAPI password (ignored unless nova_compute_driver==xenserver)
|
||||
$xenapi_connection_password = getvar("::${variable_prefix}xenapi_connection_password")
|
||||
|
||||
}
|
||||
|
@ -12,4 +12,10 @@ class kickstack::quantum::server inherits kickstack {
|
||||
auth_host => $keystone_internal_address
|
||||
}
|
||||
|
||||
kickstack::exportfact::export { "quantum_host":
|
||||
value => "${hostname}",
|
||||
tag => 'quantum',
|
||||
require => Class['::quantum::server']
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user