forked from vvaldez/astapor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compute.pp
80 lines (70 loc) · 3.03 KB
/
compute.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Common trystack configurations
class trystack::compute (
$fixed_network_range = $trystack::params::fixed_network_range,
$floating_network_range = $trystack::params::floating_network_range,
$nova_db_password = $trystack::params::nova_db_password,
$nova_user_password = $trystack::params::nova_user_password,
$pacemaker_priv_floating_ip = $trystack::params::pacemaker_priv_floating_ip,
$private_interface = $trystack::params::private_interface,
$public_interface = $trystack::params::public_interface,
$verbose = $trystack::params::verbose,
) inherits trystack::params {
# Configure Nova
nova_config{
'DEFAULT/auto_assign_floating_ip': value => 'True';
#"DEFAULT/network_host": value => ${pacemaker_priv_floating_ip;
"DEFAULT/network_host": value => "$::ipaddress";
"DEFAULT/libvirt_inject_partition": value => "-1";
#"DEFAULT/metadata_host": value => "$pacemaker_priv_floating_ip";
"DEFAULT/metadata_host": value => "$::ipaddress";
"DEFAULT/multi_host": value => "True";
}
class { 'nova':
sql_connection => "mysql:https://nova:${nova_db_password}@${pacemaker_priv_floating_ip}/nova",
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "https://$pacemaker_priv_floating_ip:9292/v1",
rpc_backend => 'nova.openstack.common.rpc.impl_qpid',
qpid_hostname => $pacemaker_priv_floating_ip,
verbose => $verbose,
}
# uncomment if on a vm
# GSutclif: Maybe wrap this in a Facter['is-virtual'] test ?
#file { "/usr/bin/qemu-system-x86_64":
# ensure => link,
# target => "/usr/libexec/qemu-kvm",
# notify => Service["nova-compute"],
#}
#nova_config{
# "libvirt_cpu_mode": value => "none";
#}
class { 'nova::compute::libvirt':
#libvirt_type => "qemu", # uncomment if on a vm
vncserver_listen => "$::ipaddress",
}
class {"nova::compute":
enabled => true,
vncproxy_host => "$pacemaker_priv_floating_ip",
vncserver_proxyclient_address => "$ipaddress",
}
class { 'nova::api':
enabled => true,
admin_password => "$nova_user_password",
auth_host => "$pacemaker_priv_floating_ip",
}
class { 'nova::network':
private_interface => "$private_interface",
public_interface => "$public_interface",
fixed_range => "$fixed_network_range",
floating_range => "$floating_network_range",
network_manager => "nova.network.manager.FlatDHCPManager",
config_overrides => {"force_dhcp_release" => false},
create_networks => true,
enabled => true,
install_service => true,
}
firewall { '001 nove compute incoming':
proto => 'tcp',
dport => '5900-5999',
action => 'accept',
}
}