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']}")
17 stage {'openstack-custom-repo': } ->
18 stage {'netconfig': } ->
19 stage {'corosync_setup': } ->
20 stage {'openstack-firewall': } -> Stage['main']
22 class begin_deployment ()
24 $role = $::fuel_settings['role']
25 notify { "***** Beginning deployment of node ${::hostname} with role $role *****": }
28 class {'begin_deployment': stage => 'zero' }
30 stage {'glance-image':
31 require => Stage['main'],
34 if $::fuel_settings['nodes'] {
35 $nodes_hash = $::fuel_settings['nodes']
36 $dns_nameservers=$::fuel_settings['dns_nameservers']
37 $node = filter_nodes($nodes_hash,'name',$::hostname)
39 fail("Node $::hostname is not defined in the hash structure")
42 $default_gateway = $node[0]['default_gateway']
44 $base_syslog_hash = $::fuel_settings['base_syslog']
45 $syslog_hash = $::fuel_settings['syslog']
47 $disable_offload = $::fuel_settings['disable_offload']
49 L23network::L3::Ifconfig<||> {
51 'K' => ['gso off', 'gro off'],
56 $use_neutron = $::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')
81 # TODO(Xarses): remove this after completing merge of
82 # multiple-cluster-networks
83 L23network::L3::Ifconfig<| title == $public_int |> {
84 default_gateway => true
87 # TODO(Xarses): remove this after completing merge of
88 # multiple-cluster-networks
89 $fw_admin_int = get_network_role_property('fw-admin', 'interface')
90 L23network::L3::Ifconfig<| title == $fw_admin_int |> {
91 default_gateway => true
95 $storage_address = get_network_role_property('storage', 'ipaddr')
96 $storage_netmask = get_network_role_property('storage', 'netmask')
98 $internal_address = $node[0]['internal_address']
99 $internal_netmask = $node[0]['internal_netmask']
100 $public_address = $node[0]['public_address']
101 $public_netmask = $node[0]['public_netmask']
102 $storage_address = $node[0]['storage_address']
103 $storage_netmask = $node[0]['storage_netmask']
104 $public_br = $node[0]['public_br']
105 $internal_br = $node[0]['internal_br']
106 $public_int = $::fuel_settings['public_interface']
107 $internal_int = $::fuel_settings['management_interface']
109 # TODO(Xarses): remove this after completing merge of
110 # multiple-cluster-networks
111 L23network::L3::Ifconfig<| title == $public_int |> {
112 default_gateway => true
118 if ($::fuel_settings['neutron_mellanox']) {
119 $mellanox_mode = $::fuel_settings['neutron_mellanox']['plugin']
121 $mellanox_mode = 'disabled'
124 # This parameter specifies the verbosity level of log messages
125 # in openstack components config.
126 # Debug would have set DEBUG level and ignore verbose settings, if any.
127 # Verbose would have set INFO level messages
128 # In case of non debug and non verbose - WARNING, default level would have set.
130 $debug = $::fuel_settings['debug']
132 ### Storage Settings ###
133 # Determine if any ceph parts have been asked for.
134 # This will ensure that monitors are set up on controllers, even if no
135 # ceph-osd roles during deployment
139 #TODO(bogdando) move logging options to astute.yaml
140 # Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
141 $use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
142 # Syslog facilities for main openstack services
143 # should vary (reserved usage)
144 # local1 is reserved for openstack-dashboard
145 $syslog_log_facility_glance = 'LOG_LOCAL2'
146 $syslog_log_facility_cinder = 'LOG_LOCAL3'
147 $syslog_log_facility_neutron = 'LOG_LOCAL4'
148 $syslog_log_facility_nova = 'LOG_LOCAL6'
149 $syslog_log_facility_keystone = 'LOG_LOCAL7'
151 # local0 is free for use
152 $syslog_log_facility_murano = 'LOG_LOCAL0'
153 $syslog_log_facility_heat = 'LOG_LOCAL0'
154 $syslog_log_facility_sahara = 'LOG_LOCAL0'
155 $syslog_log_facility_ceilometer = 'LOG_LOCAL0'
156 $syslog_log_facility_ceph = 'LOG_LOCAL0'
159 # Monit for compute nodes.
160 # If enabled, will install monit and configure its watchdogs to track
161 # nova-compute/api/network (and openvswitch service, if neutron enabled)
163 # TODO(bogdando) set to true once monit package shipped with Fuel ISO
166 $nova_rate_limits = {
168 'POST_SERVERS' => 100000,
169 'PUT' => 1000, 'GET' => 100000,
172 $cinder_rate_limits = {
174 'POST_SERVERS' => 100000,
175 'PUT' => 100000, 'GET' => 100000,
180 class advanced_node_netconfig {
181 $sdn = generate_network_config()
182 notify {"SDN: ${sdn}": }
185 case $::operatingsystem {
187 $queue_provider = 'qpid'
188 $custom_mysql_setup_class = 'pacemaker_mysql'
191 $queue_provider='rabbitmq'
192 $custom_mysql_setup_class='galera'
197 if ($::fuel_settings['neutron_mellanox']) {
198 if ($::mellanox_mode != 'disabled') {
199 class { 'mellanox_openstack::ofed_recompile' :
203 if ($::fuel_settings['storage']['iser']) {
204 class { 'mellanox_openstack::iser_rename':
206 storage_parent => $::fuel_settings['neutron_mellanox']['storage_parent'],
207 iser_interface_name => $::fuel_settings['neutron_mellanox']['iser_interface_name'],
209 Class['mellanox_openstack::ofed_recompile'] -> Class['mellanox_openstack::iser_rename']
213 class {"l23network::hosts_file": stage => 'netconfig', nodes => $nodes_hash }
214 class {'l23network': use_ovs=>$use_neutron, stage=> 'netconfig'}
216 class {'advanced_node_netconfig': stage => 'netconfig' }
218 class {'osnailyfacter::network_setup': stage => 'netconfig'}
221 if ($::osfamily == 'RedHat') {
222 package {'irqbalance': ensure => present} -> service {'irqbalance': ensure => running }
225 class { 'openstack::firewall':
226 stage => 'openstack-firewall',
227 nova_vnc_ip_range => $::fuel_settings['management_network_range'],
230 $base_syslog_rserver = {
231 'remote_type' => 'tcp',
232 'server' => $base_syslog_hash['syslog_server'],
233 'port' => $base_syslog_hash['syslog_port']
236 # setting kernel reserved ports
237 # defaults are 49000,35357,41055,58882
238 class { 'openstack::reserved_ports':
239 stage => 'netconfig',
242 # setting service down time and report interval
243 # to 60 and 180 for Nova respectively to allow kernel
244 # to kill dead connections
245 # (see zendesk #1158 as well)
246 $nova_report_interval = '60'
247 $nova_service_down_time = '180'
250 'remote_type' => $syslog_hash['syslog_transport'],
251 'server' => $syslog_hash['syslog_server'],
252 'port' => $syslog_hash['syslog_port'],
254 if $syslog_hash['syslog_server'] != "" and $syslog_hash['syslog_port'] != "" and $syslog_hash['syslog_transport'] != "" {
255 $rservers = [$base_syslog_rserver, $syslog_rserver]
257 $rservers = [$base_syslog_rserver]
261 class { "::openstack::logging":
264 show_timezone => true,
265 # log both locally include auth, and remote
268 log_auth_local => true,
269 # keep four weekly log rotations, force rotate if 300M size have exceeded
270 rotation => 'weekly',
274 # remote servers to send logs to
275 rservers => $rservers,
276 # should be true, if client is running at virtual node
277 virtual => str2bool($::is_virtual),
278 # Rabbit doesn't support syslog directly
279 rabbit_log_level => 'NOTICE',
284 class { 'osnailyfacter::atop':
288 class { 'osnailyfacter::ssh': }
291 # /controller/: { $hostgroup = 'controller' }
292 # /swift-proxy/: { $hostgroup = 'swift-proxy' }
293 # /storage/:{ $hostgroup = 'swift-storage' }
294 # /compute/: { $hostgroup = 'compute' }
295 # /cinder/: { $hostgroup = 'cinder' }
296 # default: { $hostgroup = 'generic' }
299 # if $nagios != 'false' {
301 # proj_name => $proj_name,
303 # 'host-alive','nova-novncproxy','keystone', 'nova-scheduler',
304 # 'nova-consoleauth', 'nova-cert', 'haproxy', 'nova-api', 'glance-api',
305 # 'glance-registry','horizon', 'rabbitmq', 'mysql',
307 # whitelist => ['127.0.0.1', $nagios_master],
308 # hostgroup => $hostgroup ,
312 # Workaround for fuel bug with firewall
313 firewall {'003 remote rabbitmq ':
314 sport => [ 4369, 5672, 15672, 41055, 55672, 61613 ],
315 source => $::fuel_settings['master_ip'],
318 require => Class['openstack::firewall'],
321 firewall {'004 remote puppet ':
323 source => $master_ip,
326 require => Class['openstack::firewall'],
329 class { 'puppet::pull' :
330 modules_source => $::fuel_settings['puppet_modules_source'],
331 manifests_source => $::fuel_settings['puppet_manifests_source'],
338 case $::fuel_settings['deployment_mode'] {
340 include "osnailyfacter::cluster_simple"
344 include "osnailyfacter::cluster_simple"
347 /^(ha|ha_compact)$/: {
348 include "osnailyfacter::cluster_ha"
351 "rpmcache": { include osnailyfacter::rpmcache }