forked from comperiosearch/vagrant-elk-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
50 lines (42 loc) · 1.55 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
# Install wget
sudo apt-get install -qy wget;
# Update puppet installation
wget https://raw.githubusercontent.com/hashicorp/puppet-bootstrap/master/ubuntu.sh
sh ubuntu.sh
mkdir -p /etc/puppet/modules;
if [ ! -d /etc/puppet/modules/file_concat ]; then
puppet module install ispavailability/file_concat
fi
if [ ! -d /etc/puppet/modules/apt ]; then
puppet module install puppetlabs-apt
fi
if [ ! -d /etc/puppet/modules/java ]; then
puppet module install puppetlabs-java
fi
if [ ! -d /etc/puppet/modules/elasticsearch ]; then
puppet module install elasticsearch-elasticsearch
fi
if [ ! -d /etc/puppet/modules/logstash ]; then
puppet module install elasticsearch-logstash
fi
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# set to false, if you do NOT want to check the correct VirtualBox Guest Additions version when booting this box
if defined?(VagrantVbguest::Middleware)
config.vbguest.auto_update = true
end
config.vm.box = "hashicorp/precise64"
config.vm.network :forwarded_port, guest: 5601, host: 5601
config.vm.network :forwarded_port, guest: 9200, host: 9200
config.vm.network :forwarded_port, guest: 9300, host: 9300
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2", "--memory", "2048"]
end
config.vm.provision "shell", inline: $script
config.vm.provision "puppet", manifests_path: "manifests", manifest_file: "default.pp"
end