forked from redhat-openstack/packstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompute.pp
More file actions
73 lines (61 loc) · 2.12 KB
/
Copy pathcompute.pp
File metadata and controls
73 lines (61 loc) · 2.12 KB
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
stage { "init": before => Stage["main"] }
Exec { timeout => hiera('DEFAULT_EXEC_TIMEOUT') }
class {'::packstack::prereqs':
stage => init,
}
create_resources(sshkey, hiera('SSH_KEYS', {}))
if hiera('CONFIG_NTP_SERVERS', undef) != undef {
include '::packstack::chrony'
}
if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' {
include '::packstack::nova::ceilometer::rabbitmq'
include '::packstack::nova::ceilometer'
}
include '::packstack::nova'
include '::packstack::nova::common'
include '::packstack::nova::compute'
if hiera('CONFIG_VMWARE_BACKEND') == 'y' {
include '::packstack::nova::compute::vmware'
} elsif hiera('CONFIG_IRONIC_INSTALL') == 'y' {
include '::packstack::nova::compute::ironic'
} else {
include '::packstack::nova::compute::libvirt'
}
if hiera('CONFIG_VMWARE_BACKEND') == 'y' and
hiera('CONFIG_CINDER_INSTALL') == 'y' {
if 'gluster' in hiera_array('CONFIG_CINDER_BACKEND') {
include '::packstack::nova::gluster'
}
if 'nfs' in hiera_array('CONFIG_CINDER_BACKEND') {
include '::packstack::nova::nfs'
}
}
if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
include '::packstack::nova::neutron'
include '::packstack::neutron::rabbitmq'
case hiera('CONFIG_NEUTRON_L2_AGENT') {
'openvswitch': { include '::packstack::neutron::ovs_agent' }
'': { include '::packstack::neutron::lb_agent' }
default: { include '::packstack::neutron::ovs_agent' }
}
include '::packstack::neutron::bridge'
if 'sriovnicswitch' in hiera_array('CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS') and
hiera ('CONFIG_NEUTRON_L2_AGENT') == 'openvswitch' {
include '::packstack::neutron::sriov'
}
} else {
include '::packstack::nova::network::libvirt'
$multihost = hiera('CONFIG_NOVA_NETWORK_MULTIHOST')
$network_hosts = split(hiera('CONFIG_NETWORK_HOSTS'),',')
if $multihost {
if ! member($network_hosts, choose_my_ip(hiera('HOST_LIST'))) {
include '::packstack::nova::metadata'
}
}
if ! member($network_hosts, choose_my_ip(hiera('HOST_LIST'))) {
include '::packstack::nova::compute::flat'
}
}
if hiera('CONFIG_NAGIOS_INSTALL') == 'y' {
include '::packstack::nagios::nrpe'
}