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 # setting kernel reserved ports
247 # defaults are 49000,35357,41055,58882
248 class { 'openstack::reserved_ports':
249 stage => 'netconfig',
252 # setting service down time and report interval
253 # to 60 and 180 for Nova respectively to allow kernel
254 # to kill dead connections
255 # (see zendesk #1158 as well)
256 $nova_report_interval = '60'
257 $nova_service_down_time = '180'
260 'remote_type' => $syslog_hash['syslog_transport'],
261 'server' => $syslog_hash['syslog_server'],
262 'port' => $syslog_hash['syslog_port'],
264 if $syslog_hash['syslog_server'] != "" and $syslog_hash['syslog_port'] != "" and $syslog_hash['syslog_transport'] != "" {
265 $rservers = [$base_syslog_rserver, $syslog_rserver]
267 $rservers = [$base_syslog_rserver]
271 class { "::openstack::logging":
274 show_timezone => true,
275 # log both locally include auth, and remote
278 log_auth_local => true,
279 # keep four weekly log rotations, force rotate if 300M size have exceeded
280 rotation => 'weekly',
284 # remote servers to send logs to
285 rservers => $rservers,
286 # should be true, if client is running at virtual node
287 virtual => str2bool($::is_virtual),
288 # Rabbit doesn't support syslog directly
289 rabbit_log_level => 'NOTICE',
294 class { 'osnailyfacter::atop':
298 class { 'osnailyfacter::ssh': }
301 # /controller/: { $hostgroup = 'controller' }
302 # /swift-proxy/: { $hostgroup = 'swift-proxy' }
303 # /storage/:{ $hostgroup = 'swift-storage' }
304 # /compute/: { $hostgroup = 'compute' }
305 # /cinder/: { $hostgroup = 'cinder' }
306 # default: { $hostgroup = 'generic' }
309 # if $nagios != 'false' {
311 # proj_name => $proj_name,
313 # 'host-alive','nova-novncproxy','keystone', 'nova-scheduler',
314 # 'nova-consoleauth', 'nova-cert', 'haproxy', 'nova-api', 'glance-api',
315 # 'glance-registry','horizon', 'rabbitmq', 'mysql',
317 # whitelist => ['127.0.0.1', $nagios_master],
318 # hostgroup => $hostgroup ,
322 # Workaround for fuel bug with firewall
323 firewall {'003 remote rabbitmq ':
324 sport => [ 4369, 5672, 15672, 41055, 55672, 61613 ],
325 source => $::fuel_settings['master_ip'],
328 require => Class['openstack::firewall'],
331 firewall {'004 remote puppet ':
333 source => $master_ip,
336 require => Class['openstack::firewall'],
339 class { 'puppet::pull' :
340 modules_source => $::fuel_settings['puppet_modules_source'],
341 manifests_source => $::fuel_settings['puppet_manifests_source'],
348 case $::fuel_settings['deployment_mode'] {
350 include "osnailyfacter::cluster_simple"
355 include "osnailyfacter::cluster_simple"
359 /^(ha|ha_compact)$/: {
360 include "osnailyfacter::cluster_ha"
364 "rpmcache": { include osnailyfacter::rpmcache }