-
Notifications
You must be signed in to change notification settings - Fork 107
/
default.pp
72 lines (59 loc) · 1.6 KB
/
default.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Update APT Cache
class { 'apt':
always_apt_update => true,
}
# Java is required
class { 'java': }
# Elasticsearch
class { 'elasticsearch':
manage_repo => true,
repo_version => '1.7',
}
elasticsearch::instance { 'es-01':
config => {
'cluster.name' => 'vagrant_elasticsearch',
'index.number_of_replicas' => '0',
'index.number_of_shards' => '1',
'network.host' => '0.0.0.0',
'marvel.agent.enabled' => false #DISABLE marvel data collection.
}, # Configuration hash
init_defaults => { }, # Init defaults hash
before => Exec['start kibana']
}
elasticsearch::plugin{'royrusso/elasticsearch-HQ':
instances => 'es-01'
}
elasticsearch::plugin{'elasticsearch/marvel/latest':
instances => 'es-01'
}
# Logstash
class { 'logstash':
# autoupgrade => true,
ensure => 'present',
manage_repo => true,
repo_version => '1.5',
require => [ Class['java'], Class['elasticsearch'] ],
}
# remove initial logstash config
#file { '/etc/logstash/conf.d/logstash':
#ensure => '/vagrant/confs/logstash/logstash.conf',
# require => [ Class['logstash'] ],
#}
# Kibana
package { 'curl':
ensure => 'present',
require => [ Class['apt'] ],
}
file { '/opt/kibana':
ensure => 'directory',
group => 'vagrant',
owner => 'vagrant',
}
exec { 'download_kibana':
command => '/usr/bin/curl -L https://download.elastic.co/kibana/kibana/kibana-4.1.1-linux-x64.tar.gz | /bin/tar xvz -C /opt/kibana --strip-components 1',
require => [ Package['curl'], File['/opt/kibana'], Class['elasticsearch'] ],
timeout => 1800
}
exec {'start kibana':
command => '/etc/init.d/kibana start',
}