forked from vvaldez/astapor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compute.pp
112 lines (98 loc) · 4.41 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Common quickstack configurations
class quickstack::neutron::compute (
$admin_password = $quickstack::params::admin_password,
$ceilometer_metering_secret = $quickstack::params::ceilometer_metering_secret,
$ceilometer_user_password = $quickstack::params::ceilometer_user_password,
$fixed_network_range = $quickstack::params::fixed_network_range,
$floating_network_range = $quickstack::params::floating_network_range,
$neutron_db_password = $quickstack::params::neutron_db_password,
$neutron_user_password = $quickstack::params::neutron_user_password,
$nova_db_password = $quickstack::params::nova_db_password,
$nova_user_password = $quickstack::params::nova_user_password,
$controller_priv_floating_ip = $quickstack::params::controller_priv_floating_ip,
$controller_pub_floating_ip = $quickstack::params::controller_pub_floating_ip,
$private_interface = $quickstack::params::private_interface,
$public_interface = $quickstack::params::public_interface,
$verbose = $quickstack::params::verbose,
) inherits quickstack::params {
# Configure Nova
nova_config{
'DEFAULT/libvirt_inject_partition': value => '-1';
'keystone_authtoken/admin_tenant_name': value => 'admin';
'keystone_authtoken/admin_user': value => 'admin';
'keystone_authtoken/admin_password': value => $admin_password;
'keystone_authtoken/auth_host': value => $controller_priv_floating_ip;
}
class { 'nova':
sql_connection => "mysql:https://nova:${nova_db_password}@${controller_priv_floating_ip}/nova",
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "http:https://${controller_priv_floating_ip}:9292/v1",
rpc_backend => 'nova.openstack.common.rpc.impl_qpid',
qpid_hostname => $controller_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 => $controller_pub_floating_ip,
vncserver_proxyclient_address => $::ipaddress,
}
class { 'nova::api':
enabled => true,
admin_password => $nova_user_password,
auth_host => $controller_priv_floating_ip,
}
class { 'ceilometer':
metering_secret => $ceilometer_metering_secret,
qpid_hostname => $controller_priv_floating_ip,
rpc_backend => 'ceilometer.openstack.common.rpc.impl_qpid',
verbose => $verbose,
}
class { 'ceilometer::agent::compute':
auth_url => "http:https://${controller_priv_floating_ip}:35357/v2.0",
auth_password => $ceilometer_user_password,
}
class { '::neutron':
allow_overlapping_ips => true,
rpc_backend => 'neutron.openstack.common.rpc.impl_qpid',
qpid_hostname => $controller_priv_floating_ip,
}
neutron_config {
'database/connection': value => "mysql:https://neutron:${neutron_db_password}@${controller_priv_floating_ip}/neutron";
'keystone_authtoken/auth_host': value => $controller_priv_floating_ip;
'keystone_authtoken/admin_tenant_name': value => 'admin';
'keystone_authtoken/admin_user': value => 'admin';
'keystone_authtoken/admin_password': value => $admin_password;
}
class { '::neutron::plugins::ovs':
sql_connection => "mysql:https://neutron:${neutron_db_password}@${controller_priv_floating_ip}/neutron",
tenant_network_type => 'gre',
}
class { '::neutron::agents::ovs':
local_ip => getvar("ipaddress_${private_interface}"),
enable_tunneling => true,
}
class { '::nova::network::neutron':
neutron_admin_password => $neutron_user_password,
neutron_url => "http:https://${controller_priv_floating_ip}:9696",
neutron_admin_auth_url => "http:https://${controller_priv_floating_ip}:35357/v2.0",
}
firewall { '001 nova compute incoming':
proto => 'tcp',
dport => '5900-5999',
action => 'accept',
}
}