1 $fuel_settings = parseyaml($astute_settings_yaml)
4 'keystone' => 'installed',
5 'glance' => 'installed',
6 'horizon' => 'installed',
8 'novncproxy' => 'installed',
9 'cinder' => 'installed',
12 tag("${::fuel_settings['deployment_id']}::${::fuel_settings['environment']}")
16 stage {'opncheck': } ->
18 stage {'openstack-custom-repo': } ->
19 stage {'netconfig': } ->
20 stage {'corosync_setup': } ->
21 stage {'openstack-firewall': } -> Stage['main']
23 class begin_deployment ()
25 $role = $::fuel_settings['role']
26 notify { "***** Beginning deployment of node ${::hostname} with role $role *****": }
29 class {'begin_deployment': stage => 'zero' }
31 stage {'glance-image':
32 require => Stage['main'],
35 if $::fuel_settings['nodes'] {
36 $nodes_hash = $::fuel_settings['nodes']
37 # OPNFV addition to add to hosts file
38 if ($::fuel_settings['opnfv'] and
39 $::fuel_settings['opnfv']['hosts']) {
40 $extras_hash = $::fuel_settings['opnfv']['hosts']
45 $dns_nameservers=$::fuel_settings['dns_nameservers']
46 $node = filter_nodes($nodes_hash,'name',$::hostname)
48 fail("Node $::hostname is not defined in the hash structure")
51 $default_gateway = $node[0]['default_gateway']
53 $base_syslog_hash = $::fuel_settings['base_syslog']
54 $syslog_hash = $::fuel_settings['syslog']
57 $use_quantum = $::fuel_settings['quantum']
58 if (!empty(filter_nodes($::fuel_settings['nodes'], 'role', 'ceph-osd')) or
59 $::fuel_settings['storage']['volumes_ceph'] or
60 $::fuel_settings['storage']['images_ceph'] or
61 $::fuel_settings['storage']['objects_ceph']
70 prepare_network_config($::fuel_settings['network_scheme'])
72 $internal_int = get_network_role_property('management', 'interface')
73 $internal_address = get_network_role_property('management', 'ipaddr')
74 $internal_netmask = get_network_role_property('management', 'netmask')
76 $public_int = get_network_role_property('ex', 'interface')
78 $public_address = get_network_role_property('ex', 'ipaddr')
79 $public_netmask = get_network_role_property('ex', 'netmask')
82 $storage_address = get_network_role_property('storage', 'ipaddr')
83 $storage_netmask = get_network_role_property('storage', 'netmask')
85 $internal_address = $node[0]['internal_address']
86 $internal_netmask = $node[0]['internal_netmask']
87 $public_address = $node[0]['public_address']
88 $public_netmask = $node[0]['public_netmask']
89 $storage_address = $node[0]['storage_address']
90 $storage_netmask = $node[0]['storage_netmask']
91 $public_br = $node[0]['public_br']
92 $internal_br = $node[0]['internal_br']
93 $public_int = $::fuel_settings['public_interface']
94 $internal_int = $::fuel_settings['management_interface']
98 if ($::fuel_settings['neutron_mellanox']) {
99 $mellanox_mode = $::fuel_settings['neutron_mellanox']['plugin']
101 $mellanox_mode = 'disabled'
104 # This parameter specifies the verbosity level of log messages
105 # in openstack components config.
106 # Debug would have set DEBUG level and ignore verbose settings, if any.
107 # Verbose would have set INFO level messages
108 # In case of non debug and non verbose - WARNING, default level would have set.
110 $debug = $::fuel_settings['debug']
112 ### Storage Settings ###
113 # Determine if any ceph parts have been asked for.
114 # This will ensure that monitors are set up on controllers, even if no
115 # ceph-osd roles during deployment
119 #TODO(bogdando) move logging options to astute.yaml
120 # Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
121 $use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
122 # Syslog facilities for main openstack services
123 # should vary (reserved usage)
124 # local1 is reserved for openstack-dashboard
125 $syslog_log_facility_glance = 'LOG_LOCAL2'
126 $syslog_log_facility_cinder = 'LOG_LOCAL3'
127 $syslog_log_facility_neutron = 'LOG_LOCAL4'
128 $syslog_log_facility_nova = 'LOG_LOCAL6'
129 $syslog_log_facility_keystone = 'LOG_LOCAL7'
131 # local0 is free for use
132 $syslog_log_facility_murano = 'LOG_LOCAL0'
133 $syslog_log_facility_heat = 'LOG_LOCAL0'
134 $syslog_log_facility_sahara = 'LOG_LOCAL0'
135 $syslog_log_facility_ceilometer = 'LOG_LOCAL0'
137 $nova_rate_limits = {
139 'POST_SERVERS' => 100000,
140 'PUT' => 1000, 'GET' => 100000,
143 $cinder_rate_limits = {
145 'POST_SERVERS' => 100000,
146 'PUT' => 100000, 'GET' => 100000,
151 class advanced_node_netconfig {
152 $sdn = generate_network_config()
153 notify {"SDN: ${sdn}": }
156 case $::operatingsystem {
158 $queue_provider = 'qpid'
159 $custom_mysql_setup_class = 'pacemaker_mysql'
162 $queue_provider='rabbitmq'
163 $custom_mysql_setup_class='galera'
168 # OPNFV check if pre_deploy.sh has been run, otherwise fail
169 class {'opnfv::opncheck': stage => 'opncheck' }
170 if ($::fuel_settings['neutron_mellanox']) and ($::fuel_settings['storage']['iser']) {
171 class { 'mellanox_openstack::iser_rename':
173 storage_parent => $::fuel_settings['neutron_mellanox']['storage_parent'],
174 iser_interface_name => $::fuel_settings['neutron_mellanox']['iser_interface_name'],
177 class {"l23network::hosts_file": stage => 'netconfig', nodes => $nodes_hash, extras => $extras_hash }
178 class {'l23network': use_ovs=>$use_quantum, stage=> 'netconfig'}
180 class {'advanced_node_netconfig': stage => 'netconfig' }
182 class {'osnailyfacter::network_setup': stage => 'netconfig'}
185 class { 'openstack::firewall':
186 stage => 'openstack-firewall',
187 nova_vnc_ip_range => $::fuel_settings['management_network_range'],
190 $base_syslog_rserver = {
191 'remote_type' => 'tcp',
192 'server' => $base_syslog_hash['syslog_server'],
193 'port' => $base_syslog_hash['syslog_port']
196 ### TCP connections keepalives and failover related parameters ###
197 # configure TCP keepalive for host OS.
198 # Send 3 probes each 8 seconds, if the connection was idle
199 # for a 30 seconds. Consider it dead, if there was no responces
200 # during the check time frame, i.e. 30+3*8=54 seconds overall.
201 # (note: overall check time frame should be lower then
202 # nova_report_interval).
203 class { 'openstack::keepalive' :
204 stage => 'netconfig',
211 # setting kernel reserved ports
212 # defaults are 49000,35357,41055,58882
213 class { 'openstack::reserved_ports':
214 stage => 'netconfig',
217 # setting service down time and report interval
218 # to 60 and 180 for Nova respectively to allow kernel
219 # to kill dead connections
220 # (see zendesk #1158 as well)
221 $nova_report_interval = '60'
222 $nova_service_down_time = '180'
225 'remote_type' => $syslog_hash['syslog_transport'],
226 'server' => $syslog_hash['syslog_server'],
227 'port' => $syslog_hash['syslog_port'],
229 if $syslog_hash['syslog_server'] != "" and $syslog_hash['syslog_port'] != "" and $syslog_hash['syslog_transport'] != "" {
230 $rservers = [$base_syslog_rserver, $syslog_rserver]
232 $rservers = [$base_syslog_rserver]
236 class { "::openstack::logging":
239 show_timezone => true,
240 # log both locally include auth, and remote
243 log_auth_local => true,
244 # keep four weekly log rotations, force rotate if 300M size have exceeded
245 rotation => 'weekly',
249 # remote servers to send logs to
250 rservers => $rservers,
251 # should be true, if client is running at virtual node
252 virtual => str2bool($::is_virtual),
253 # Rabbit doesn't support syslog directly
254 rabbit_log_level => 'NOTICE',
260 # /controller/: { $hostgroup = 'controller' }
261 # /swift-proxy/: { $hostgroup = 'swift-proxy' }
262 # /storage/:{ $hostgroup = 'swift-storage' }
263 # /compute/: { $hostgroup = 'compute' }
264 # /cinder/: { $hostgroup = 'cinder' }
265 # default: { $hostgroup = 'generic' }
268 # if $nagios != 'false' {
270 # proj_name => $proj_name,
272 # 'host-alive','nova-novncproxy','keystone', 'nova-scheduler',
273 # 'nova-consoleauth', 'nova-cert', 'haproxy', 'nova-api', 'glance-api',
274 # 'glance-registry','horizon', 'rabbitmq', 'mysql',
276 # whitelist => ['127.0.0.1', $nagios_master],
277 # hostgroup => $hostgroup ,
281 # Workaround for fuel bug with firewall
282 firewall {'003 remote rabbitmq ':
283 sport => [ 4369, 5672, 15672, 41055, 55672, 61613 ],
284 source => $::fuel_settings['master_ip'],
287 require => Class['openstack::firewall'],
290 firewall {'004 remote puppet ':
292 source => $master_ip,
295 require => Class['openstack::firewall'],
298 class { 'puppet::pull' :
299 master_ip => $::fuel_settings['master_ip'],
306 case $::fuel_settings['deployment_mode'] {
308 include "osnailyfacter::cluster_simple"
313 include "osnailyfacter::cluster_simple"
317 /^(ha|ha_compact)$/: {
318 include "osnailyfacter::cluster_ha"
320 class {'corosync::commitorder': stage=>'main'}
323 "rpmcache": { include osnailyfacter::rpmcache }