-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
37 lines (32 loc) · 1.2 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
pref = YAML.load_file("config.yaml")
if !pref.has_key?('32bit') or !pref.has_key?('memory')
abort("Your config.yaml must specify a '32bit' and 'memory' setting.")
end
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = pref['proxyhttp']
config.proxy.https = pref['proxyhttps']
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
if pref['32bit']
config.vm.box = "ubuntu/xenial32"
else
config.vm.box = "ubuntu/xenial64"
end
config.vm.network :private_network, ip: "192.168.68.8"
# config.vm.network "forwarded_port", guest: 80, host: 8080, id: "nginx", auto_correct: true
# config.vm.network "forwarded_port", guest: 5601, host: 5601
# config.vm.network "forwarded_port", guest: 9200, host: 9200
config.vm.provider :virtualbox do |vb|
vb.name = "elasticBox"
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", pref["memory"]]
end
config.vm.provision "shell", path: "elasticsearch.sh"
config.vm.provision "shell", path: "kibana.sh"
config.vm.provision "shell", path: "nginx.sh"
end