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']
48 $use_quantum = $::fuel_settings['quantum']
49 if (!empty(filter_nodes($::fuel_settings['nodes'], 'role', 'ceph-osd')) or
50 $::fuel_settings['storage']['volumes_ceph'] or
51 $::fuel_settings['storage']['images_ceph'] or
52 $::fuel_settings['storage']['objects_ceph']
61 prepare_network_config($::fuel_settings['network_scheme'])
63 $internal_int = get_network_role_property('management', 'interface')
64 $internal_address = get_network_role_property('management', 'ipaddr')
65 $internal_netmask = get_network_role_property('management', 'netmask')
67 $public_int = get_network_role_property('ex', 'interface')
69 $public_address = get_network_role_property('ex', 'ipaddr')
70 $public_netmask = get_network_role_property('ex', 'netmask')
73 $storage_address = get_network_role_property('storage', 'ipaddr')
74 $storage_netmask = get_network_role_property('storage', 'netmask')
76 $internal_address = $node[0]['internal_address']
77 $internal_netmask = $node[0]['internal_netmask']
78 $public_address = $node[0]['public_address']
79 $public_netmask = $node[0]['public_netmask']
80 $storage_address = $node[0]['storage_address']
81 $storage_netmask = $node[0]['storage_netmask']
82 $public_br = $node[0]['public_br']
83 $internal_br = $node[0]['internal_br']
84 $public_int = $::fuel_settings['public_interface']
85 $internal_int = $::fuel_settings['management_interface']
89 if ($::fuel_settings['neutron_mellanox']) {
90 $mellanox_mode = $::fuel_settings['neutron_mellanox']['plugin']
92 $mellanox_mode = 'disabled'
95 # This parameter specifies the verbosity level of log messages
96 # in openstack components config.
97 # Debug would have set DEBUG level and ignore verbose settings, if any.
98 # Verbose would have set INFO level messages
99 # In case of non debug and non verbose - WARNING, default level would have set.
101 $debug = $::fuel_settings['debug']
103 ### Storage Settings ###
104 # Determine if any ceph parts have been asked for.
105 # This will ensure that monitors are set up on controllers, even if no
106 # ceph-osd roles during deployment
110 #TODO(bogdando) move logging options to astute.yaml
111 # Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
112 $use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
113 # Syslog facilities for main openstack services
114 # should vary (reserved usage)
115 # local1 is reserved for openstack-dashboard
116 $syslog_log_facility_glance = 'LOG_LOCAL2'
117 $syslog_log_facility_cinder = 'LOG_LOCAL3'
118 $syslog_log_facility_neutron = 'LOG_LOCAL4'
119 $syslog_log_facility_nova = 'LOG_LOCAL6'
120 $syslog_log_facility_keystone = 'LOG_LOCAL7'
122 # local0 is free for use
123 $syslog_log_facility_murano = 'LOG_LOCAL0'
124 $syslog_log_facility_heat = 'LOG_LOCAL0'
125 $syslog_log_facility_sahara = 'LOG_LOCAL0'
126 $syslog_log_facility_ceilometer = 'LOG_LOCAL0'
128 $nova_rate_limits = {
130 'POST_SERVERS' => 100000,
131 'PUT' => 1000, 'GET' => 100000,
134 $cinder_rate_limits = {
136 'POST_SERVERS' => 100000,
137 'PUT' => 100000, 'GET' => 100000,
142 class advanced_node_netconfig {
143 $sdn = generate_network_config()
144 notify {"SDN: ${sdn}": }
147 case $::operatingsystem {
149 $queue_provider = 'qpid'
150 $custom_mysql_setup_class = 'pacemaker_mysql'
153 $queue_provider='rabbitmq'
154 $custom_mysql_setup_class='galera'
159 if ($::fuel_settings['neutron_mellanox']) and ($::fuel_settings['storage']['iser']) {
160 class { 'mellanox_openstack::iser_rename':
162 storage_parent => $::fuel_settings['neutron_mellanox']['storage_parent'],
163 iser_interface_name => $::fuel_settings['neutron_mellanox']['iser_interface_name'],
166 class {"l23network::hosts_file": stage => 'netconfig', nodes => $nodes_hash }
167 class {'l23network': use_ovs=>$use_quantum, stage=> 'netconfig'}
169 class {'advanced_node_netconfig': stage => 'netconfig' }
171 class {'osnailyfacter::network_setup': stage => 'netconfig'}
174 class { 'openstack::firewall':
175 stage => 'openstack-firewall',
176 nova_vnc_ip_range => $::fuel_settings['management_network_range'],
179 $base_syslog_rserver = {
180 'remote_type' => 'tcp',
181 'server' => $base_syslog_hash['syslog_server'],
182 'port' => $base_syslog_hash['syslog_port']
185 ### TCP connections keepalives and failover related parameters ###
186 # configure TCP keepalive for host OS.
187 # Send 3 probes each 8 seconds, if the connection was idle
188 # for a 30 seconds. Consider it dead, if there was no responces
189 # during the check time frame, i.e. 30+3*8=54 seconds overall.
190 # (note: overall check time frame should be lower then
191 # nova_report_interval).
192 class { 'openstack::keepalive' :
193 stage => 'netconfig',
200 # setting kernel reserved ports
201 # defaults are 49000,35357,41055,58882
202 class { 'openstack::reserved_ports':
203 stage => 'netconfig',
206 # setting service down time and report interval
207 # to 60 and 180 for Nova respectively to allow kernel
208 # to kill dead connections
209 # (see zendesk #1158 as well)
210 $nova_report_interval = '60'
211 $nova_service_down_time = '180'
214 'remote_type' => $syslog_hash['syslog_transport'],
215 'server' => $syslog_hash['syslog_server'],
216 'port' => $syslog_hash['syslog_port'],
218 if $syslog_hash['syslog_server'] != "" and $syslog_hash['syslog_port'] != "" and $syslog_hash['syslog_transport'] != "" {
219 $rservers = [$base_syslog_rserver, $syslog_rserver]
221 $rservers = [$base_syslog_rserver]
225 class { "::openstack::logging":
228 show_timezone => true,
229 # log both locally include auth, and remote
232 log_auth_local => true,
233 # keep four weekly log rotations, force rotate if 300M size have exceeded
234 rotation => 'weekly',
238 # remote servers to send logs to
239 rservers => $rservers,
240 # should be true, if client is running at virtual node
241 virtual => str2bool($::is_virtual),
242 # Rabbit doesn't support syslog directly
243 rabbit_log_level => 'NOTICE',
249 # /controller/: { $hostgroup = 'controller' }
250 # /swift-proxy/: { $hostgroup = 'swift-proxy' }
251 # /storage/:{ $hostgroup = 'swift-storage' }
252 # /compute/: { $hostgroup = 'compute' }
253 # /cinder/: { $hostgroup = 'cinder' }
254 # default: { $hostgroup = 'generic' }
257 # if $nagios != 'false' {
259 # proj_name => $proj_name,
261 # 'host-alive','nova-novncproxy','keystone', 'nova-scheduler',
262 # 'nova-consoleauth', 'nova-cert', 'haproxy', 'nova-api', 'glance-api',
263 # 'glance-registry','horizon', 'rabbitmq', 'mysql',
265 # whitelist => ['127.0.0.1', $nagios_master],
266 # hostgroup => $hostgroup ,
270 # Workaround for fuel bug with firewall
271 firewall {'003 remote rabbitmq ':
272 sport => [ 4369, 5672, 15672, 41055, 55672, 61613 ],
273 source => $::fuel_settings['master_ip'],
276 require => Class['openstack::firewall'],
279 firewall {'004 remote puppet ':
281 source => $master_ip,
284 require => Class['openstack::firewall'],
287 class { 'puppet::pull' :
288 master_ip => $::fuel_settings['master_ip'],
295 case $::fuel_settings['deployment_mode'] {
297 include "osnailyfacter::cluster_simple"
301 include "osnailyfacter::cluster_simple"
304 /^(ha|ha_compact)$/: {
305 include "osnailyfacter::cluster_ha"
307 class {'corosync::commitorder': stage=>'main'}
309 "rpmcache": { include osnailyfacter::rpmcache }