forked from lusis/chef-kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
70 lines (58 loc) · 2.01 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_plugin "vagrant-berkshelf"
Vagrant.require_plugin "vagrant-omnibus"
Vagrant.configure("2") do |config|
# Berkshelf plugin configuration
config.berkshelf.enabled = true
# Omnibus plugin configuration
config.omnibus.chef_version = :latest
config.vm.provision :chef_solo do |chef|
chef.json =
{
kibana: {
webserver_listen: "0.0.0.0",
webserver: "nginx",
install_type: "file"
},
elasticsearch: {
min_mem: '64m',
max_mem: '64m',
limits: {
nofile: 1024,
memlock: 512
}
},
}
chef.run_list = [
"recipe[apt::default]",
"recipe[java::default]",
"recipe[elasticsearch::default]",
"recipe[kibana::default]"
]
end
config.vm.provision :shell, :inline => <<-FAKELOGSTASH
INDEX=logstash-`date +"%Y.%m.%d"`
TIMESTAMP=`date --iso-8601=seconds`
curl -s -XPUT "http://localhost:9200/${INDEX}/"
curl -s -XPOST "http://localhost:9200/${INDEX}/test/" -d '{ "@timestamp" : "'${TIMESTAMP}'", "message" : "I am not a real log" }'
FAKELOGSTASH
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 9200, host: 9200
# Ubuntu 12.04 Config
config.vm.define :ubuntu1204 do |ubuntu1204|
ubuntu1204.vm.hostname = "ubuntu1204"
ubuntu1204.vm.box = "opscode-ubuntu-12.04"
ubuntu1204.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box"
end
# Ubuntu 13.04 Config
config.vm.define :ubuntu1304 do |ubuntu1304|
ubuntu1304.vm.hostname = "ubuntu1304"
ubuntu1304.vm.box = "opscode-ubuntu-13.04"
ubuntu1304.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-13.04_provisionerless.box"
end
config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024']
end
config.vm.network "private_network", ip: "33.33.33.88"
end