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']
56 $disable_offload = $::fuel_settings['disable_offload']
58 L23network::L3::Ifconfig<||> {
60 'K' => ['gso off', 'gro off'],
65 $use_neutron = $::fuel_settings['quantum']
67 if (!empty(filter_nodes($::fuel_settings['nodes'], 'role', 'ceph-osd')) or
68 $::fuel_settings['storage']['volumes_ceph'] or
69 $::fuel_settings['storage']['images_ceph'] or
70 $::fuel_settings['storage']['objects_ceph']
79 prepare_network_config($::fuel_settings['network_scheme'])
81 $internal_int = get_network_role_property('management', 'interface')
82 $internal_address = get_network_role_property('management', 'ipaddr')
83 $internal_netmask = get_network_role_property('management', 'netmask')
85 $public_int = get_network_role_property('ex', 'interface')
87 $public_address = get_network_role_property('ex', 'ipaddr')
88 $public_netmask = get_network_role_property('ex', 'netmask')
90 # TODO(Xarses): remove this after completing merge of
91 # multiple-cluster-networks
92 L23network::L3::Ifconfig<| title == $public_int |> {
93 default_gateway => true
96 # TODO(Xarses): remove this after completing merge of
97 # multiple-cluster-networks
98 $fw_admin_int = get_network_role_property('fw-admin', 'interface')
99 L23network::L3::Ifconfig<| title == $fw_admin_int |> {
100 default_gateway => true
104 $storage_address = get_network_role_property('storage', 'ipaddr')
105 $storage_netmask = get_network_role_property('storage', 'netmask')
107 $internal_address = $node[0]['internal_address']
108 $internal_netmask = $node[0]['internal_netmask']
109 $public_address = $node[0]['public_address']
110 $public_netmask = $node[0]['public_netmask']
111 $storage_address = $node[0]['storage_address']
112 $storage_netmask = $node[0]['storage_netmask']
113 $public_br = $node[0]['public_br']
114 $internal_br = $node[0]['internal_br']
115 $public_int = $::fuel_settings['public_interface']
116 $internal_int = $::fuel_settings['management_interface']
118 # TODO(Xarses): remove this after completing merge of
119 # multiple-cluster-networks
120 L23network::L3::Ifconfig<| title == $public_int |> {
121 default_gateway => true
127 if ($::fuel_settings['neutron_mellanox']) {
128 $mellanox_mode = $::fuel_settings['neutron_mellanox']['plugin']
130 $mellanox_mode = 'disabled'
133 # This parameter specifies the verbosity level of log messages
134 # in openstack components config.
135 # Debug would have set DEBUG level and ignore verbose settings, if any.
136 # Verbose would have set INFO level messages
137 # In case of non debug and non verbose - WARNING, default level would have set.
139 $debug = $::fuel_settings['debug']
141 ### Storage Settings ###
142 # Determine if any ceph parts have been asked for.
143 # This will ensure that monitors are set up on controllers, even if no
144 # ceph-osd roles during deployment
148 #TODO(bogdando) move logging options to astute.yaml
149 # Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
150 $use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
151 # Syslog facilities for main openstack services
152 # should vary (reserved usage)
153 # local1 is reserved for openstack-dashboard
154 $syslog_log_facility_glance = 'LOG_LOCAL2'
155 $syslog_log_facility_cinder = 'LOG_LOCAL3'
156 $syslog_log_facility_neutron = 'LOG_LOCAL4'
157 $syslog_log_facility_nova = 'LOG_LOCAL6'
158 $syslog_log_facility_keystone = 'LOG_LOCAL7'
160 # local0 is free for use
161 $syslog_log_facility_murano = 'LOG_LOCAL0'
162 $syslog_log_facility_heat = 'LOG_LOCAL0'
163 $syslog_log_facility_sahara = 'LOG_LOCAL0'
164 $syslog_log_facility_ceilometer = 'LOG_LOCAL0'
165 $syslog_log_facility_ceph = 'LOG_LOCAL0'
168 # Monit for compute nodes.
169 # If enabled, will install monit and configure its watchdogs to track
170 # nova-compute/api/network (and openvswitch service, if neutron enabled)
172 # TODO(bogdando) set to true once monit package shipped with Fuel ISO
175 $nova_rate_limits = {
177 'POST_SERVERS' => 100000,
178 'PUT' => 1000, 'GET' => 100000,
181 $cinder_rate_limits = {
183 'POST_SERVERS' => 100000,
184 'PUT' => 100000, 'GET' => 100000,
189 class advanced_node_netconfig {
190 $sdn = generate_network_config()
191 notify {"SDN: ${sdn}": }
194 case $::operatingsystem {
196 $queue_provider = 'qpid'
197 $custom_mysql_setup_class = 'pacemaker_mysql'
200 $queue_provider='rabbitmq'
201 $custom_mysql_setup_class='galera'
206 # OPNFV check if pre_deploy.sh has been run, otherwise fail
207 class {'opnfv::opncheck': stage => 'opncheck' }
208 if ($::fuel_settings['neutron_mellanox']) {
209 if ($::mellanox_mode != 'disabled') {
210 class { 'mellanox_openstack::ofed_recompile' :
214 if ($::fuel_settings['storage']['iser']) {
215 class { 'mellanox_openstack::iser_rename':
217 storage_parent => $::fuel_settings['neutron_mellanox']['storage_parent'],
218 iser_interface_name => $::fuel_settings['neutron_mellanox']['iser_interface_name'],
220 Class['mellanox_openstack::ofed_recompile'] -> Class['mellanox_openstack::iser_rename']
223 class {"l23network::hosts_file": stage => 'netconfig', nodes => $nodes_hash, extras => $extras_hash }
224 class {'l23network': use_ovs=>$use_neutron, stage=> 'netconfig'}
226 class {'advanced_node_netconfig': stage => 'netconfig' }
228 class {'osnailyfacter::network_setup': stage => 'netconfig'}
231 if ($::osfamily == 'RedHat') {
232 package {'irqbalance': ensure => present} -> service {'irqbalance': ensure => running }
235 class { 'openstack::firewall':
236 stage => 'openstack-firewall',
237 nova_vnc_ip_range => $::fuel_settings['management_network_range'],
240 $base_syslog_rserver = {
241 'remote_type' => 'tcp',
242 'server' => $base_syslog_hash['syslog_server'],
243 'port' => $base_syslog_hash['syslog_port']
246 ### TCP connections keepalives and failover related parameters ###
247 # configure TCP keepalive for host OS.
248 # Send 3 probes each 8 seconds, if the connection was idle
249 # for a 30 seconds. Consider it dead, if there was no responces
250 # during the check time frame, i.e. 30+3*8=54 seconds overall.
251 # (note: overall check time frame should be lower then
252 # nova_report_interval).
253 class { 'openstack::keepalive' :
254 stage => 'netconfig',
261 # setting kernel reserved ports
262 # defaults are 49000,35357,41055,58882
263 class { 'openstack::reserved_ports':
264 stage => 'netconfig',
267 # setting service down time and report interval
268 # to 60 and 180 for Nova respectively to allow kernel
269 # to kill dead connections
270 # (see zendesk #1158 as well)
271 $nova_report_interval = '60'
272 $nova_service_down_time = '180'
275 'remote_type' => $syslog_hash['syslog_transport'],
276 'server' => $syslog_hash['syslog_server'],
277 'port' => $syslog_hash['syslog_port'],
279 if $syslog_hash['syslog_server'] != "" and $syslog_hash['syslog_port'] != "" and $syslog_hash['syslog_transport'] != "" {
280 $rservers = [$base_syslog_rserver, $syslog_rserver]
282 $rservers = [$base_syslog_rserver]
286 class { "::openstack::logging":
289 show_timezone => true,
290 # log both locally include auth, and remote
293 log_auth_local => true,
294 # keep four weekly log rotations, force rotate if 300M size have exceeded
295 rotation => 'weekly',
299 # remote servers to send logs to
300 rservers => $rservers,
301 # should be true, if client is running at virtual node
302 virtual => str2bool($::is_virtual),
303 # Rabbit doesn't support syslog directly
304 rabbit_log_level => 'NOTICE',
309 class { 'osnailyfacter::atop':
313 class { 'osnailyfacter::ssh': }
316 # /controller/: { $hostgroup = 'controller' }
317 # /swift-proxy/: { $hostgroup = 'swift-proxy' }
318 # /storage/:{ $hostgroup = 'swift-storage' }
319 # /compute/: { $hostgroup = 'compute' }
320 # /cinder/: { $hostgroup = 'cinder' }
321 # default: { $hostgroup = 'generic' }
324 # if $nagios != 'false' {
326 # proj_name => $proj_name,
328 # 'host-alive','nova-novncproxy','keystone', 'nova-scheduler',
329 # 'nova-consoleauth', 'nova-cert', 'haproxy', 'nova-api', 'glance-api',
330 # 'glance-registry','horizon', 'rabbitmq', 'mysql',
332 # whitelist => ['127.0.0.1', $nagios_master],
333 # hostgroup => $hostgroup ,
337 # Workaround for fuel bug with firewall
338 firewall {'003 remote rabbitmq ':
339 sport => [ 4369, 5672, 15672, 41055, 55672, 61613 ],
340 source => $::fuel_settings['master_ip'],
343 require => Class['openstack::firewall'],
346 firewall {'004 remote puppet ':
348 source => $master_ip,
351 require => Class['openstack::firewall'],
354 class { 'puppet::pull' :
355 modules_source => $::fuel_settings['puppet_modules_source'],
356 manifests_source => $::fuel_settings['puppet_manifests_source'],
363 case $::fuel_settings['deployment_mode'] {
365 include "osnailyfacter::cluster_simple"
370 include "osnailyfacter::cluster_simple"
374 /^(ha|ha_compact)$/: {
375 include "osnailyfacter::cluster_ha"
379 "rpmcache": { include osnailyfacter::rpmcache }