forked from lusis/chef-logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
120 lines (108 loc) · 3.91 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
log_level = :info
chef_run_list = %w(
java::default
curl::default
logstash::server
)
# logstash::agent
# minitest-handler::default
# kibana::default
chef_json = {
java: {
jdk_version: '7'
},
kibana: {
webserver_listen: '0.0.0.0',
webserver: 'nginx',
install_type: 'file'
},
logstash: {
instance: { server: {} }
}
}
Vagrant.configure('2') do |config|
# Common Settings
config.omnibus.chef_version = 'latest'
config.vm.hostname = 'logstash'
config.vm.network 'forwarded_port', guest: 9292, host: 9292
config.vm.network 'forwarded_port', guest: 9200, host: 9200
config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024']
end
config.vm.provider :lxc do |lxc|
lxc.customize 'cgroup.memory.limit_in_bytes', '1024M'
end
config.vm.define :precise64 do |dist_config|
dist_config.cache.scope = :box if Vagrant.has_plugin?('vagrant-cachier')
dist_config.vm.box = 'opscode-ubuntu-12.04'
dist_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
chef.run_list.unshift('apt')
end
end
config.vm.define :lucid64 do |dist_config|
dist_config.vm.box = 'lucid64'
dist_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
chef.run_list.unshift('apt')
end
end
config.vm.define :lucid32 do |dist_config|
dist_config.vm.box = 'lucid32'
dist_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04-i386_provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
chef.run_list.unshift('apt')
end
end
config.vm.define :centos6_64 do |dist_config|
dist_config.vm.box = 'opscode-centos-6.3' # centos6_64'
dist_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
end
end
config.vm.define :centos6_32 do |dist_config|
dist_config.vm.box = 'centos6_32'
dist_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4-i386_provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
end
end
config.vm.define :fedora18 do |dist_config|
dist_config.vm.box = 'fedora18'
dist_config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-18_chef-provisionerless.box'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['/tmp/logstash-cookbooks']
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = log_level
chef.run_list = chef_run_list
chef.json = chef_json
end
end
end