This repository has been archived by the owner on May 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
53 lines (43 loc) · 1.76 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Cache the debs so we can reduce network transfer.
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
# Set box
config.vm.provider "libvirt" do |v, override|
override.vm.box = "debian-8.7.1-64bit-libvirt-4.3.18-docker"
#config.vm.box_url = "http://vagrant.kumina.nl/boxes/debian-8.3.0-64bit-backports-libvirt.box"
end
config.vm.provider "virtualbox" do |v, override|
override.vm.box = "debian-8.2.0-64bit-vbox-4.3.18-docker"
override.vm.box_url = "http://vagrant.kumina.nl/boxes/debian-8.2.0-64bit-vbox-4.3.18-docker.box"
end
# Set box memory to 1024
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
config.vm.provider :libvirt do |lv|
lv.memory = 1024
end
# Always run apt-get update
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.provision "shell", inline: "export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get -y --force-yes dist-upgrade"
# Puppet provisioning
config.vm.provision :puppet,
:options => ["--verbose --disable_warnings=deprecations"] do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "site.pp"
end
# Node: docker host / webserver
config.vm.define :server do |conf|
conf.vm.hostname = 'web01.vagrant.local'
conf.vm.network :forwarded_port, guest: 5601, host: 5601
conf.vm.network :forwarded_port, guest: 8000, host: 8000
conf.vm.network :forwarded_port, guest: 9200, host: 9200
end
end