Merge pull request #114 from bodepd/fix_cinder
refactor of openstack module
This commit is contained in:
298
manifests/all.pp
298
manifests/all.pp
@@ -59,60 +59,66 @@
|
|||||||
class openstack::all (
|
class openstack::all (
|
||||||
# Network Required
|
# Network Required
|
||||||
$public_address,
|
$public_address,
|
||||||
# MySQL Required
|
|
||||||
$mysql_root_password = 'sql_pass',
|
|
||||||
# Rabbit Required
|
|
||||||
$rabbit_password = 'rabbitpw',
|
|
||||||
# Keystone Required
|
|
||||||
$keystone_db_password = 'keystone_pass',
|
|
||||||
$keystone_admin_token = 'keystone_admin_token',
|
|
||||||
$admin_email = 'some_user@some_fake_email_address.foo',
|
|
||||||
$admin_password = 'ChangeMe',
|
|
||||||
# Nova Required
|
|
||||||
$nova_db_password = 'nova_pass',
|
|
||||||
$nova_user_password = 'nova_pass',
|
|
||||||
# Glance Required
|
|
||||||
$glance_db_password = 'glance_pass',
|
|
||||||
$glance_user_password = 'glance_pass',
|
|
||||||
# Horizon Required
|
|
||||||
$secret_key = 'dummy_secret_key',
|
|
||||||
# Network
|
|
||||||
$public_interface = 'eth0',
|
$public_interface = 'eth0',
|
||||||
$private_interface = 'eth1',
|
$private_interface = 'eth1',
|
||||||
$fixed_range = '10.0.0.0/24',
|
# Database
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$mysql_root_password = 'sql_pass',
|
||||||
$network_config = {},
|
|
||||||
$auto_assign_floating_ip = false,
|
|
||||||
$floating_range = false,
|
|
||||||
$create_networks = true,
|
|
||||||
$num_networks = 1,
|
|
||||||
# MySQL
|
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
$mysql_account_security = true,
|
$mysql_account_security = true,
|
||||||
$allowed_hosts = ['127.0.0.%'],
|
$allowed_hosts = ['127.0.0.%'],
|
||||||
# Rabbit
|
|
||||||
$rabbit_user = 'nova',
|
|
||||||
# Keystone
|
# Keystone
|
||||||
|
$admin_email = 'some_user@some_fake_email_address.foo',
|
||||||
|
$admin_password = 'ChangeMe',
|
||||||
|
$keystone_db_password = 'keystone_pass',
|
||||||
$keystone_db_user = 'keystone',
|
$keystone_db_user = 'keystone',
|
||||||
$keystone_db_dbname = 'keystone',
|
$keystone_db_dbname = 'keystone',
|
||||||
|
$keystone_admin_token = 'keystone_admin_token',
|
||||||
$keystone_admin_tenant = 'admin',
|
$keystone_admin_tenant = 'admin',
|
||||||
# Nova
|
$region = 'RegionOne',
|
||||||
$nova_db_user = 'nova',
|
# Glance Required
|
||||||
$nova_db_dbname = 'nova',
|
$glance_db_password = 'glance_pass',
|
||||||
$purge_nova_config = true,
|
|
||||||
# Glance
|
|
||||||
$glance_db_user = 'glance',
|
$glance_db_user = 'glance',
|
||||||
$glance_db_dbname = 'glance',
|
$glance_db_dbname = 'glance',
|
||||||
|
$glance_user_password = 'glance_pass',
|
||||||
|
# Nova
|
||||||
|
$nova_db_password = 'nova_pass',
|
||||||
|
$nova_db_user = 'nova',
|
||||||
|
$nova_db_dbname = 'nova',
|
||||||
|
$nova_user_password = 'nova_pass',
|
||||||
|
$purge_nova_config = true,
|
||||||
|
# Network
|
||||||
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$fixed_range = '10.0.0.0/24',
|
||||||
|
$floating_range = false,
|
||||||
|
$create_networks = true,
|
||||||
|
$num_networks = 1,
|
||||||
|
$auto_assign_floating_ip = false,
|
||||||
|
$network_config = {},
|
||||||
|
$quantum = true,
|
||||||
|
# Rabbit
|
||||||
|
$rabbit_password = 'rabbit_pw',
|
||||||
|
$rabbit_user = 'nova',
|
||||||
# Horizon
|
# Horizon
|
||||||
|
$secret_key = 'dummy_secret_key',
|
||||||
$cache_server_ip = '127.0.0.1',
|
$cache_server_ip = '127.0.0.1',
|
||||||
$cache_server_port = '11211',
|
$cache_server_port = '11211',
|
||||||
$swift = false,
|
$swift = false,
|
||||||
$quantum = false,
|
|
||||||
$horizon_app_links = undef,
|
$horizon_app_links = undef,
|
||||||
|
# if the cinder management components should be installed
|
||||||
|
$cinder = true,
|
||||||
|
$cinder_user_password = 'cinder_user_pass',
|
||||||
|
$cinder_db_password = 'cinder_db_pass',
|
||||||
|
$cinder_db_user = 'cinder',
|
||||||
|
$cinder_db_dbname = 'cinder',
|
||||||
|
$volume_group = 'cinder-volumes',
|
||||||
|
$cinder_test = false,
|
||||||
|
#
|
||||||
|
$quantum_user_password = 'quantum_user_pass',
|
||||||
|
$quantum_db_password = 'quantum_db_pass',
|
||||||
|
$quantum_db_user = 'quantum',
|
||||||
|
$quantum_db_dbname = 'quantum',
|
||||||
# Virtaulization
|
# Virtaulization
|
||||||
$libvirt_type = 'kvm',
|
$libvirt_type = 'kvm',
|
||||||
# Volume
|
|
||||||
$nova_volume = 'nova-volumes',
|
|
||||||
# VNC
|
# VNC
|
||||||
$vnc_enabled = true,
|
$vnc_enabled = true,
|
||||||
# General
|
# General
|
||||||
@@ -123,26 +129,36 @@ class openstack::all (
|
|||||||
# Ensure things are run in order
|
# Ensure things are run in order
|
||||||
Class['openstack::db::mysql'] -> Class['openstack::keystone']
|
Class['openstack::db::mysql'] -> Class['openstack::keystone']
|
||||||
Class['openstack::db::mysql'] -> Class['openstack::glance']
|
Class['openstack::db::mysql'] -> Class['openstack::glance']
|
||||||
Class['openstack::db::mysql'] -> Class['openstack::nova::controller']
|
|
||||||
|
|
||||||
# set up mysql server
|
# set up mysql server
|
||||||
case $db_type {
|
if ($db_type == 'mysql') {
|
||||||
'mysql': {
|
if ($enabled) {
|
||||||
class { 'openstack::db::mysql':
|
Class['glance::db::mysql'] -> Class['glance::registry']
|
||||||
mysql_root_password => $mysql_root_password,
|
$nova_db = "mysql://${nova_db_user}:${nova_db_password}@127.0.0.1/nova?charset=utf8"
|
||||||
mysql_bind_address => '127.0.0.1',
|
} else {
|
||||||
mysql_account_security => $mysql_account_security,
|
$nova_db = false
|
||||||
keystone_db_user => $keystone_db_user,
|
}
|
||||||
keystone_db_password => $keystone_db_password,
|
class { 'openstack::db::mysql':
|
||||||
keystone_db_dbname => $keystone_db_dbname,
|
mysql_root_password => $mysql_root_password,
|
||||||
glance_db_user => $glance_db_user,
|
mysql_account_security => $mysql_account_security,
|
||||||
glance_db_password => $glance_db_password,
|
keystone_db_user => $keystone_db_user,
|
||||||
glance_db_dbname => $glance_db_dbname,
|
keystone_db_password => $keystone_db_password,
|
||||||
nova_db_user => $nova_db_user,
|
keystone_db_dbname => $keystone_db_dbname,
|
||||||
nova_db_password => $nova_db_password,
|
glance_db_user => $glance_db_user,
|
||||||
nova_db_dbname => $nova_db_dbname,
|
glance_db_password => $glance_db_password,
|
||||||
allowed_hosts => $allowed_hosts,
|
glance_db_dbname => $glance_db_dbname,
|
||||||
}
|
nova_db_user => $nova_db_user,
|
||||||
|
nova_db_password => $nova_db_password,
|
||||||
|
nova_db_dbname => $nova_db_dbname,
|
||||||
|
cinder => $cinder,
|
||||||
|
cinder_db_user => $cinder_db_user,
|
||||||
|
cinder_db_password => $cinder_db_password,
|
||||||
|
cinder_db_dbname => $cinder_db_dbname,
|
||||||
|
quantum => $quantum,
|
||||||
|
quantum_db_user => $quantum_db_user,
|
||||||
|
quantum_db_password => $quantum_db_password,
|
||||||
|
quantum_db_dbname => $quantum_db_dbname,
|
||||||
|
allowed_hosts => $allowed_hosts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,18 +167,23 @@ class openstack::all (
|
|||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
db_type => $db_type,
|
db_type => $db_type,
|
||||||
db_host => '127.0.0.1',
|
db_host => '127.0.0.1',
|
||||||
keystone_db_password => $keystone_db_password,
|
db_password => $keystone_db_password,
|
||||||
keystone_db_dbname => $keystone_db_dbname,
|
db_name => $keystone_db_dbname,
|
||||||
keystone_db_user => $keystone_db_user,
|
db_user => $keystone_db_user,
|
||||||
keystone_admin_token => $keystone_admin_token,
|
admin_token => $keystone_admin_token,
|
||||||
keystone_admin_tenant => $keystone_admin_tenant,
|
admin_tenant => $keystone_admin_tenant,
|
||||||
admin_email => $admin_email,
|
admin_email => $admin_email,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
internal_address => '127.0.0.1',
|
internal_address => '127.0.0.1',
|
||||||
admin_address => '127.0.0.1',
|
admin_address => '127.0.0.1',
|
||||||
|
region => $region,
|
||||||
glance_user_password => $glance_user_password,
|
glance_user_password => $glance_user_password,
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
|
cinder => $cinder,
|
||||||
|
cinder_user_password => $cinder_user_password,
|
||||||
|
quantum => $quantum,
|
||||||
|
quantum_user_password => $quantum_user_password,
|
||||||
}
|
}
|
||||||
|
|
||||||
######## GLANCE ##########
|
######## GLANCE ##########
|
||||||
@@ -174,6 +195,7 @@ class openstack::all (
|
|||||||
glance_db_dbname => $glance_db_dbname,
|
glance_db_dbname => $glance_db_dbname,
|
||||||
glance_db_password => $glance_db_password,
|
glance_db_password => $glance_db_password,
|
||||||
glance_user_password => $glance_user_password,
|
glance_user_password => $glance_user_password,
|
||||||
|
enabled => $enabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
######## NOVA ###########
|
######## NOVA ###########
|
||||||
@@ -188,68 +210,108 @@ class openstack::all (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'openstack::nova::controller':
|
# Install / configure rabbitmq
|
||||||
# Network
|
class { 'nova::rabbitmq':
|
||||||
network_manager => $network_manager,
|
userid => $rabbit_user,
|
||||||
network_config => $network_config,
|
password => $rabbit_password,
|
||||||
private_interface => $private_interface,
|
enabled => $enabled,
|
||||||
public_interface => $public_interface,
|
|
||||||
floating_range => $floating_range,
|
|
||||||
fixed_range => $fixed_range,
|
|
||||||
public_address => $public_address,
|
|
||||||
admin_address => '127.0.0.1',
|
|
||||||
internal_address => '127.0.0.1',
|
|
||||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
|
||||||
create_networks => $create_networks,
|
|
||||||
num_networks => $num_networks,
|
|
||||||
multi_host => false,
|
|
||||||
# Database
|
|
||||||
db_host => '127.0.0.1',
|
|
||||||
# Nova
|
|
||||||
nova_user_password => $nova_user_password,
|
|
||||||
nova_db_password => $nova_db_password,
|
|
||||||
nova_db_user => $nova_db_user,
|
|
||||||
nova_db_dbname => $nova_db_dbname,
|
|
||||||
# Rabbit
|
|
||||||
rabbit_user => $rabbit_user,
|
|
||||||
rabbit_password => $rabbit_password,
|
|
||||||
# Glance
|
|
||||||
glance_api_servers => '127.0.0.1:9292',
|
|
||||||
# VNC
|
|
||||||
vnc_enabled => $vnc_enabled,
|
|
||||||
# General
|
|
||||||
verbose => $verbose,
|
|
||||||
enabled => $enabled,
|
|
||||||
exported_resources => false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'openstack::nova::compute':
|
# Configure Nova
|
||||||
# Network
|
class { 'nova':
|
||||||
public_address => $public_address,
|
sql_connection => $nova_db,
|
||||||
private_interface => $private_interface,
|
rabbit_userid => $rabbit_user,
|
||||||
public_interface => $public_interface,
|
rabbit_password => $rabbit_password,
|
||||||
fixed_range => $fixed_range,
|
image_service => 'nova.image.glance.GlanceImageService',
|
||||||
network_manager => $network_manager,
|
glance_api_servers => 'localhost:9292',
|
||||||
network_config => $network_config,
|
verbose => $verbose,
|
||||||
multi_host => false,
|
rabbit_host => $internal_address,
|
||||||
internal_address => '127.0.0.1',
|
}
|
||||||
# Virtualization
|
|
||||||
libvirt_type => $libvirt_type,
|
# Configure nova-api
|
||||||
# Volumes
|
class { 'nova::api':
|
||||||
nova_volume => $nova_volume,
|
enabled => $enabled,
|
||||||
manage_volumes => true,
|
admin_password => $nova_user_password,
|
||||||
iscsi_ip_address => '127.0.0.1',
|
auth_host => 'localhost',
|
||||||
# VNC
|
}
|
||||||
vnc_enabled => $vnc_enabled,
|
|
||||||
vncproxy_host => $public_address,
|
if $enabled {
|
||||||
# Nova
|
$really_create_networks = $create_networks
|
||||||
nova_user_password => $nova_user_password,
|
} else {
|
||||||
# Rabbit
|
$really_create_networks = false
|
||||||
rabbit_password => $rabbit_password,
|
}
|
||||||
# General
|
|
||||||
verbose => $verbose,
|
if $quantum == false {
|
||||||
exported_resources => false,
|
# Configure nova-network
|
||||||
|
class { 'nova::network':
|
||||||
|
private_interface => $private_interface,
|
||||||
|
public_interface => $public_interface,
|
||||||
|
fixed_range => $fixed_range,
|
||||||
|
floating_range => $floating_range,
|
||||||
|
network_manager => $network_manager,
|
||||||
|
config_overrides => $network_config,
|
||||||
|
create_networks => $really_create_networks,
|
||||||
|
num_networks => $num_networks,
|
||||||
|
enabled => $enabled,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# Set up Quantum
|
||||||
|
}
|
||||||
|
|
||||||
|
if $auto_assign_floating_ip {
|
||||||
|
nova_config { 'auto_assign_floating_ip': value => 'True' }
|
||||||
|
}
|
||||||
|
|
||||||
|
class { [
|
||||||
|
'nova::scheduler',
|
||||||
|
'nova::objectstore',
|
||||||
|
'nova::cert',
|
||||||
|
'nova::consoleauth'
|
||||||
|
]:
|
||||||
|
enabled => $enabled,
|
||||||
|
}
|
||||||
|
|
||||||
|
if $vnc_enabled {
|
||||||
|
class { 'nova::vncproxy':
|
||||||
|
host => $public_address,
|
||||||
|
enabled => $enabled,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
######### Cinder Controller Services ########
|
||||||
|
if ($cinder) {
|
||||||
|
class { "cinder::base":
|
||||||
|
verbose => $verbose,
|
||||||
|
sql_connection => "mysql://${cinder_db_user}:${cinder_db_password}@127.0.0.1/${cinder_db_dbname}?charset=utf8",
|
||||||
|
rabbit_password => $rabbit_password,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'cinder::api':
|
||||||
|
keystone_password => $cinder_user_password,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'cinder::scheduler': }
|
||||||
|
class { 'cinder::volume': }
|
||||||
|
class { 'cinder::volume::iscsi':
|
||||||
|
volume_group => $volume_group,
|
||||||
|
test => $cinder_test,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# Set up nova-volume
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install / configure nova-compute
|
||||||
|
class { '::nova::compute':
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
|
vnc_enabled => $vnc_enabled,
|
||||||
|
vncserver_proxyclient_address => $internal_address,
|
||||||
|
vncproxy_host => 'localhost',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configure libvirt for nova-compute
|
||||||
|
class { 'nova::compute::libvirt':
|
||||||
|
libvirt_type => $libvirt_type,
|
||||||
|
vncserver_listen => $internal_address,
|
||||||
}
|
}
|
||||||
|
|
||||||
######## Horizon ########
|
######## Horizon ########
|
||||||
|
@@ -22,13 +22,20 @@ class openstack::compute (
|
|||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
# Required Rabbit
|
# Required Rabbit
|
||||||
$rabbit_password,
|
$rabbit_password,
|
||||||
# Network
|
|
||||||
# DB
|
# DB
|
||||||
$sql_connection = false,
|
$sql_connection,
|
||||||
|
# Network
|
||||||
|
$quantum = true,
|
||||||
|
$public_interface = undef,
|
||||||
|
$private_interface = undef,
|
||||||
|
$fixed_range = undef,
|
||||||
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$network_config = {},
|
||||||
|
$multi_host = false,
|
||||||
# Nova
|
# Nova
|
||||||
$purge_nova_config = true,
|
$purge_nova_config = true,
|
||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_host = false,
|
$rabbit_host = '127.0.0.1',
|
||||||
$rabbit_user = 'nova',
|
$rabbit_user = 'nova',
|
||||||
# Glance
|
# Glance
|
||||||
$glance_api_servers = false,
|
$glance_api_servers = false,
|
||||||
@@ -37,11 +44,26 @@ class openstack::compute (
|
|||||||
# VNC
|
# VNC
|
||||||
$vnc_enabled = true,
|
$vnc_enabled = true,
|
||||||
$vncproxy_host = undef,
|
$vncproxy_host = undef,
|
||||||
|
$vncserver_listen = false,
|
||||||
|
# cinder / volumes
|
||||||
|
$cinder = true,
|
||||||
|
$cinder_sql_connection = undef,
|
||||||
|
$manage_volumes = true,
|
||||||
|
$nova_volume = 'cinder-volumes',
|
||||||
|
$iscsi_ip_address = '127.0.0.1',
|
||||||
# General
|
# General
|
||||||
|
$migration_support = false,
|
||||||
$verbose = 'False',
|
$verbose = 'False',
|
||||||
$enabled = true
|
$enabled = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $vncserver_listen {
|
||||||
|
$vncserver_listen_real = $vncserver_listen
|
||||||
|
} else {
|
||||||
|
$vncserver_listen_real = $internal_address
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# indicates that all nova config entries that we did
|
# indicates that all nova config entries that we did
|
||||||
# not specifify in Puppet should be purged from file
|
# not specifify in Puppet should be purged from file
|
||||||
@@ -54,10 +76,6 @@ class openstack::compute (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$final_sql_connection = $sql_connection
|
|
||||||
$glance_connection = $glance_api_servers
|
|
||||||
$rabbit_connection = $rabbit_host
|
|
||||||
|
|
||||||
class { 'nova':
|
class { 'nova':
|
||||||
sql_connection => $sql_connection,
|
sql_connection => $sql_connection,
|
||||||
rabbit_userid => $rabbit_user,
|
rabbit_userid => $rabbit_user,
|
||||||
@@ -78,47 +96,70 @@ class openstack::compute (
|
|||||||
|
|
||||||
# Configure libvirt for nova-compute
|
# Configure libvirt for nova-compute
|
||||||
class { 'nova::compute::libvirt':
|
class { 'nova::compute::libvirt':
|
||||||
libvirt_type => $libvirt_type,
|
libvirt_type => $libvirt_type,
|
||||||
vncserver_listen => $internal_address,
|
vncserver_listen => $vncserver_listen_real,
|
||||||
|
migration_support => $migration_support,
|
||||||
}
|
}
|
||||||
|
|
||||||
# if the compute node should be configured as a multi-host
|
# if the compute node should be configured as a multi-host
|
||||||
# compute installation
|
# compute installation
|
||||||
if $multi_host {
|
if $quantum == false {
|
||||||
include keystone::python
|
if $multi_host {
|
||||||
#nova_config {
|
include keystone::python
|
||||||
# 'multi_host': value => 'True';
|
nova_config {
|
||||||
# 'send_arp_for_ha': value => 'True';
|
'multi_host': value => 'True';
|
||||||
#}
|
'send_arp_for_ha': value => 'True';
|
||||||
#if ! $public_interface {
|
}
|
||||||
# fail('public_interface must be defined for multi host compute nodes')
|
if ! $public_interface {
|
||||||
#}
|
fail('public_interface must be defined for multi host compute nodes')
|
||||||
#$enable_network_service = true
|
}
|
||||||
class { 'nova::api':
|
$enable_network_service = true
|
||||||
enabled => true,
|
class { 'nova::api':
|
||||||
admin_tenant_name => 'services',
|
enabled => true,
|
||||||
admin_user => 'nova',
|
admin_tenant_name => 'services',
|
||||||
admin_password => $nova_user_password,
|
admin_user => 'nova',
|
||||||
# TODO override enabled_apis
|
admin_password => $nova_user_password,
|
||||||
|
# TODO override enabled_apis
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$enable_network_service = false
|
||||||
|
nova_config {
|
||||||
|
'multi_host': value => 'False';
|
||||||
|
'send_arp_for_ha': value => 'False';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'nova::network':
|
||||||
|
private_interface => $private_interface,
|
||||||
|
public_interface => $public_interface,
|
||||||
|
fixed_range => $fixed_range,
|
||||||
|
floating_range => false,
|
||||||
|
network_manager => $network_manager,
|
||||||
|
config_overrides => $network_config,
|
||||||
|
create_networks => false,
|
||||||
|
enabled => $enable_network_service,
|
||||||
|
install_service => $enable_network_service,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#$enable_network_service = false
|
# TODO install quantum
|
||||||
#nova_config {
|
|
||||||
# 'multi_host': value => 'False';
|
|
||||||
# 'send_arp_for_ha': value => 'False';
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#class { 'nova::network':
|
if ($cinder) {
|
||||||
# private_interface => $private_interface,
|
class { 'cinder::base':
|
||||||
# public_interface => $public_interface,
|
rabbit_password => $rabbit_password,
|
||||||
# fixed_range => $fixed_range,
|
rabbit_host => $rabbit_host,
|
||||||
# floating_range => false,
|
sql_connection => $cinder_sql_connection,
|
||||||
# network_manager => $network_manager,
|
verbose => $verbose,
|
||||||
# config_overrides => $network_config,
|
}
|
||||||
# create_networks => false,
|
class { 'cinder::volume': }
|
||||||
# enabled => $enable_network_service,
|
class { 'cinder::volume::iscsi':
|
||||||
# install_service => $enable_network_service,
|
iscsi_ip_address => $internal_address,
|
||||||
#}
|
volume_group => $nova_volume,
|
||||||
|
}
|
||||||
|
|
||||||
|
nova_config { 'volume_api_class': value => 'nova.volume.cinder.API' }
|
||||||
|
} else {
|
||||||
|
# Set up nova-volume
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
# [network_config] Hash that can be used to pass implementation specifc
|
# [network_config] Hash that can be used to pass implementation specifc
|
||||||
# network settings. Optioal. Defaults to {}
|
# network settings. Optioal. Defaults to {}
|
||||||
# [verbose] Whether to log services at verbose.
|
# [verbose] Whether to log services at verbose.
|
||||||
# [export_resources] Rather to export resources.
|
|
||||||
# Horizon related config - assumes puppetlabs-horizon code
|
# Horizon related config - assumes puppetlabs-horizon code
|
||||||
# [secret_key] secret key to encode cookies, …
|
# [secret_key] secret key to encode cookies, …
|
||||||
# [cache_server_ip] local memcached instance ip
|
# [cache_server_ip] local memcached instance ip
|
||||||
@@ -67,35 +66,27 @@ class openstack::controller (
|
|||||||
$public_address,
|
$public_address,
|
||||||
$public_interface,
|
$public_interface,
|
||||||
$private_interface,
|
$private_interface,
|
||||||
# Required Database
|
$admin_email,
|
||||||
$mysql_root_password = 'sql_pass',
|
# required password
|
||||||
# Required Keystone
|
$admin_password,
|
||||||
$admin_email = 'some_user@some_fake_email_address.foo',
|
$rabbit_password,
|
||||||
$admin_password = 'ChangeMe',
|
$keystone_db_password,
|
||||||
$keystone_db_password = 'keystone_pass',
|
$keystone_admin_token,
|
||||||
$keystone_admin_token = 'keystone_admin_token',
|
$glance_db_password,
|
||||||
# Required Glance
|
$glance_user_password,
|
||||||
$glance_db_password = 'glance_pass',
|
$nova_db_password,
|
||||||
$glance_user_password = 'glance_pass',
|
$nova_user_password,
|
||||||
# Required Nova
|
$secret_key,
|
||||||
$nova_db_password = 'nova_pass',
|
# cinder and quantum password are not required b/c they are
|
||||||
$nova_user_password = 'nova_pass',
|
# optional. Not sure what to do about this.
|
||||||
# Required Horizon
|
$cinder_user_password = 'cinder_pass',
|
||||||
$secret_key = 'dummy_secret_key',
|
$cinder_db_password = 'cinder_pass',
|
||||||
# not sure if this works correctly
|
$quantum_user_password = 'quantum_pass',
|
||||||
$internal_address = $public_address,
|
$quantum_db_password = 'quantum_pass',
|
||||||
$admin_address = $public_address,
|
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
|
||||||
$fixed_range = '10.0.0.0/24',
|
|
||||||
$floating_range = false,
|
|
||||||
$create_networks = true,
|
|
||||||
$num_networks = 1,
|
|
||||||
$multi_host = false,
|
|
||||||
$auto_assign_floating_ip = false,
|
|
||||||
$network_config = {},
|
|
||||||
# Database
|
# Database
|
||||||
$db_host = '127.0.0.1',
|
$db_host = '127.0.0.1',
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
|
$mysql_root_password = 'sql_pass',
|
||||||
$mysql_account_security = true,
|
$mysql_account_security = true,
|
||||||
$mysql_bind_address = '0.0.0.0',
|
$mysql_bind_address = '0.0.0.0',
|
||||||
$allowed_hosts = '%',
|
$allowed_hosts = '%',
|
||||||
@@ -103,6 +94,7 @@ class openstack::controller (
|
|||||||
$keystone_db_user = 'keystone',
|
$keystone_db_user = 'keystone',
|
||||||
$keystone_db_dbname = 'keystone',
|
$keystone_db_dbname = 'keystone',
|
||||||
$keystone_admin_tenant = 'admin',
|
$keystone_admin_tenant = 'admin',
|
||||||
|
$region = 'RegionOne',
|
||||||
# Glance
|
# Glance
|
||||||
$glance_db_user = 'glance',
|
$glance_db_user = 'glance',
|
||||||
$glance_db_dbname = 'glance',
|
$glance_db_dbname = 'glance',
|
||||||
@@ -111,32 +103,50 @@ class openstack::controller (
|
|||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
$nova_db_dbname = 'nova',
|
$nova_db_dbname = 'nova',
|
||||||
$purge_nova_config = true,
|
$purge_nova_config = true,
|
||||||
|
# Network
|
||||||
|
$internal_address = false,
|
||||||
|
$admin_address = false,
|
||||||
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$fixed_range = '10.0.0.0/24',
|
||||||
|
$floating_range = false,
|
||||||
|
$create_networks = true,
|
||||||
|
$num_networks = 1,
|
||||||
|
$multi_host = false,
|
||||||
|
$auto_assign_floating_ip = false,
|
||||||
|
$network_config = {},
|
||||||
|
$quantum = true,
|
||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_password = 'rabbit_pw',
|
|
||||||
$rabbit_user = 'nova',
|
$rabbit_user = 'nova',
|
||||||
# Horizon
|
# Horizon
|
||||||
$cache_server_ip = '127.0.0.1',
|
$cache_server_ip = '127.0.0.1',
|
||||||
$cache_server_port = '11211',
|
$cache_server_port = '11211',
|
||||||
$swift = false,
|
|
||||||
$quantum = false,
|
|
||||||
$cinder = false,
|
|
||||||
$horizon_app_links = undef,
|
$horizon_app_links = undef,
|
||||||
|
$swift = false,
|
||||||
|
# VNC
|
||||||
|
$vnc_enabled = true,
|
||||||
# General
|
# General
|
||||||
$verbose = 'False',
|
$verbose = 'False',
|
||||||
$export_resources = true,
|
|
||||||
# if the cinder management components should be installed
|
# if the cinder management components should be installed
|
||||||
$cinder_user_password = 'cinder_user_pass',
|
$cinder = false,
|
||||||
$cinder_db_password = 'cinder_db_pass',
|
|
||||||
$cinder_db_user = 'cinder',
|
$cinder_db_user = 'cinder',
|
||||||
$cinder_db_dbname = 'cinder',
|
$cinder_db_dbname = 'cinder',
|
||||||
#
|
#
|
||||||
$quantum_user_password = 'quantum_user_pass',
|
|
||||||
$quantum_db_password = 'quantum_db_pass',
|
|
||||||
$quantum_db_user = 'quantum',
|
$quantum_db_user = 'quantum',
|
||||||
$quantum_db_dbname = 'quantum',
|
$quantum_db_dbname = 'quantum',
|
||||||
$enabled = true
|
$enabled = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $internal_address {
|
||||||
|
$internal_address_real = $internal_address
|
||||||
|
} else {
|
||||||
|
$internal_address_real = $public_address
|
||||||
|
}
|
||||||
|
if $admin_address {
|
||||||
|
$admin_address_real = $admin_address
|
||||||
|
} else {
|
||||||
|
$admin_address_real = $public_address
|
||||||
|
}
|
||||||
|
|
||||||
# Ensure things are run in order
|
# Ensure things are run in order
|
||||||
Class['openstack::db::mysql'] -> Class['openstack::keystone']
|
Class['openstack::db::mysql'] -> Class['openstack::keystone']
|
||||||
Class['openstack::db::mysql'] -> Class['openstack::glance']
|
Class['openstack::db::mysql'] -> Class['openstack::glance']
|
||||||
@@ -187,8 +197,9 @@ class openstack::controller (
|
|||||||
admin_email => $admin_email,
|
admin_email => $admin_email,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
internal_address => $internal_address,
|
internal_address => $internal_address_real,
|
||||||
admin_address => $admin_address,
|
admin_address => $admin_address,
|
||||||
|
region => $region,
|
||||||
glance_user_password => $glance_user_password,
|
glance_user_password => $glance_user_password,
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
cinder => $cinder,
|
cinder => $cinder,
|
||||||
@@ -227,15 +238,18 @@ class openstack::controller (
|
|||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
# Network
|
# Network
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
|
network_config => $network_config,
|
||||||
floating_range => $floating_range,
|
floating_range => $floating_range,
|
||||||
fixed_range => $fixed_range,
|
fixed_range => $fixed_range,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
admin_address => $admin_address,
|
admin_address => $admin_address,
|
||||||
internal_address => $internal_address,
|
internal_address => $internal_address_real,
|
||||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||||
create_networks => $create_networks,
|
create_networks => $create_networks,
|
||||||
num_networks => $num_networks,
|
num_networks => $num_networks,
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
|
public_interface => $public_interface,
|
||||||
|
private_interface => $private_interface,
|
||||||
quantum => $quantum,
|
quantum => $quantum,
|
||||||
# Nova
|
# Nova
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
@@ -247,10 +261,11 @@ class openstack::controller (
|
|||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
# Glance
|
# Glance
|
||||||
glance_api_servers => $glance_api_servers,
|
glance_api_servers => $glance_api_servers,
|
||||||
|
# VNC
|
||||||
|
vnc_enabled => $vnc_enabled,
|
||||||
# General
|
# General
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
exported_resources => $export_resources,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
######### Cinder Controller Services ########
|
######### Cinder Controller Services ########
|
||||||
|
@@ -54,6 +54,7 @@ class openstack::keystone (
|
|||||||
$admin_tenant = 'admin',
|
$admin_tenant = 'admin',
|
||||||
$verbose = 'False',
|
$verbose = 'False',
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
|
$region = 'RegionOne',
|
||||||
$internal_address = false,
|
$internal_address = false,
|
||||||
$admin_address = false,
|
$admin_address = false,
|
||||||
$glance_public_address = false,
|
$glance_public_address = false,
|
||||||
@@ -177,6 +178,7 @@ class openstack::keystone (
|
|||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
admin_address => $admin_real,
|
admin_address => $admin_real,
|
||||||
internal_address => $internal_real,
|
internal_address => $internal_real,
|
||||||
|
region => $region,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure Glance endpoint in Keystone
|
# Configure Glance endpoint in Keystone
|
||||||
@@ -186,6 +188,7 @@ class openstack::keystone (
|
|||||||
public_address => $glance_public_real,
|
public_address => $glance_public_real,
|
||||||
admin_address => $glance_admin_real,
|
admin_address => $glance_admin_real,
|
||||||
internal_address => $glance_internal_real,
|
internal_address => $glance_internal_real,
|
||||||
|
region => $region,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,6 +199,7 @@ class openstack::keystone (
|
|||||||
public_address => $nova_public_real,
|
public_address => $nova_public_real,
|
||||||
admin_address => $nova_admin_real,
|
admin_address => $nova_admin_real,
|
||||||
internal_address => $nova_internal_real,
|
internal_address => $nova_internal_real,
|
||||||
|
region => $region,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,6 +210,7 @@ class openstack::keystone (
|
|||||||
public_address => $cinder_public_real,
|
public_address => $cinder_public_real,
|
||||||
admin_address => $cinder_admin_real,
|
admin_address => $cinder_admin_real,
|
||||||
internal_address => $cinder_internal_real,
|
internal_address => $cinder_internal_real,
|
||||||
|
region => $region,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $quantum {
|
if $quantum {
|
||||||
@@ -214,6 +219,7 @@ class openstack::keystone (
|
|||||||
public_address => $quantum_public_real,
|
public_address => $quantum_public_real,
|
||||||
admin_address => $quantum_admin_real,
|
admin_address => $quantum_admin_real,
|
||||||
internal_address => $quantum_internal_real,
|
internal_address => $quantum_internal_real,
|
||||||
|
region => $region,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,15 +30,18 @@ class openstack::nova::controller (
|
|||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
$nova_db_password,
|
$nova_db_password,
|
||||||
# Network
|
# Network
|
||||||
$fixed_range = '10.0.0.0/24',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$network_config = {},
|
||||||
$floating_range = false,
|
$floating_range = false,
|
||||||
$internal_address = $public_address,
|
$fixed_range = '10.0.0.0/24',
|
||||||
$admin_address = $public_address,
|
$admin_address = $public_address,
|
||||||
|
$internal_address = $public_address,
|
||||||
$auto_assign_floating_ip = false,
|
$auto_assign_floating_ip = false,
|
||||||
$create_networks = true,
|
$create_networks = true,
|
||||||
$num_networks = 1,
|
$num_networks = 1,
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$public_interface = undef,
|
||||||
|
$private_interface = undef,
|
||||||
$quantum = true,
|
$quantum = true,
|
||||||
# Nova
|
# Nova
|
||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
@@ -55,7 +58,6 @@ class openstack::nova::controller (
|
|||||||
$keystone_host = '127.0.0.1',
|
$keystone_host = '127.0.0.1',
|
||||||
$verbose = 'False',
|
$verbose = 'False',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$exported_resources = true
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Configure the db string
|
# Configure the db string
|
||||||
@@ -70,25 +72,10 @@ class openstack::nova::controller (
|
|||||||
} else {
|
} else {
|
||||||
$real_glance_api_servers = $glance_api_servers
|
$real_glance_api_servers = $glance_api_servers
|
||||||
}
|
}
|
||||||
if ($exported_resources) {
|
|
||||||
# export all of the things that will be needed by the clients
|
|
||||||
@@nova_config { 'rabbit_host': value => $internal_address }
|
|
||||||
Nova_config <| title == 'rabbit_host' |>
|
|
||||||
|
|
||||||
@@nova_config { 'sql_connection': value => $nova_db }
|
$sql_connection = $nova_db
|
||||||
Nova_config <| title == 'sql_connection' |>
|
$glance_connection = $real_glance_api_servers
|
||||||
|
$rabbit_connection = $internal_address
|
||||||
@@nova_config { 'glance_api_servers': value => $real_glance_api_servers }
|
|
||||||
Nova_config <| title == 'glance_api_servers' |>
|
|
||||||
|
|
||||||
$sql_connection = false
|
|
||||||
$glance_connection = false
|
|
||||||
$rabbit_connection = false
|
|
||||||
} else {
|
|
||||||
$sql_connection = $nova_db
|
|
||||||
$glance_connection = $real_glance_api_servers
|
|
||||||
$rabbit_connection = $internal_address
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install / configure rabbitmq
|
# Install / configure rabbitmq
|
||||||
class { 'nova::rabbitmq':
|
class { 'nova::rabbitmq':
|
||||||
@@ -115,17 +102,6 @@ class openstack::nova::controller (
|
|||||||
auth_host => $keystone_host,
|
auth_host => $keystone_host,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure nova-network
|
|
||||||
if $multi_host {
|
|
||||||
nova_config { 'multi_host': value => 'True' }
|
|
||||||
$enable_network_service = false
|
|
||||||
} else {
|
|
||||||
if $enabled {
|
|
||||||
$enable_network_service = true
|
|
||||||
} else {
|
|
||||||
$enable_network_service = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $enabled {
|
if $enabled {
|
||||||
$really_create_networks = $create_networks
|
$really_create_networks = $create_networks
|
||||||
@@ -134,6 +110,18 @@ class openstack::nova::controller (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $quantum == false {
|
if $quantum == false {
|
||||||
|
# Configure nova-network
|
||||||
|
if $multi_host {
|
||||||
|
nova_config { 'multi_host': value => 'True' }
|
||||||
|
$enable_network_service = false
|
||||||
|
} else {
|
||||||
|
if $enabled {
|
||||||
|
$enable_network_service = true
|
||||||
|
} else {
|
||||||
|
$enable_network_service = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class { 'nova::network':
|
class { 'nova::network':
|
||||||
private_interface => $private_interface,
|
private_interface => $private_interface,
|
||||||
public_interface => $public_interface,
|
public_interface => $public_interface,
|
||||||
@@ -146,6 +134,8 @@ class openstack::nova::controller (
|
|||||||
enabled => $enable_network_service,
|
enabled => $enable_network_service,
|
||||||
install_service => $enable_network_service,
|
install_service => $enable_network_service,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
# Set up Quantum
|
||||||
}
|
}
|
||||||
|
|
||||||
if $auto_assign_floating_ip {
|
if $auto_assign_floating_ip {
|
||||||
|
Reference in New Issue
Block a user