2013-05-29 17:34:18 +02:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2017-01-12 10:40:27 +01:00
|
|
|
# Icinga Web 2 | (c) 2013 Icinga Development Team | GPLv2+
|
2015-02-03 16:27:59 +01:00
|
|
|
|
2014-05-30 16:21:04 +02:00
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
2014-12-18 13:53:22 +01:00
|
|
|
VAGRANT_REQUIRED_VERSION = "1.5.0"
|
2014-05-30 16:21:04 +02:00
|
|
|
|
|
|
|
if ! defined? Vagrant.require_version
|
|
|
|
if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new(VAGRANT_REQUIRED_VERSION)
|
|
|
|
puts "Vagrant >= " + VAGRANT_REQUIRED_VERSION + " required. Your version is " + Vagrant::VERSION
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
else
|
|
|
|
Vagrant.require_version ">= " + VAGRANT_REQUIRED_VERSION
|
|
|
|
end
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
2014-12-15 18:02:13 +01:00
|
|
|
config.vm.network "forwarded_port", guest: 80, host: 8080,
|
|
|
|
auto_correct: true
|
2016-02-26 14:01:15 +01:00
|
|
|
config.vm.network "forwarded_port", guest: 443, host: 8443,
|
|
|
|
auto_correct: true
|
2013-05-29 17:34:18 +02:00
|
|
|
|
2017-10-18 14:45:38 +02:00
|
|
|
config.vm.box = "boxcutter/centos7"
|
|
|
|
|
2014-12-15 18:02:13 +01:00
|
|
|
config.vm.provision :shell, :path => ".puppet/manifests/puppet.sh"
|
2013-05-29 17:34:18 +02:00
|
|
|
|
2014-12-15 18:02:13 +01:00
|
|
|
config.vm.provider :parallels do |p, override|
|
|
|
|
p.name = "Icinga Web 2 Development"
|
2013-05-29 17:34:18 +02:00
|
|
|
|
2017-07-26 17:17:06 +02:00
|
|
|
# Update Parallels Tools automatically ...
|
|
|
|
p.update_guest_tools = false
|
|
|
|
# ... but don't fail completely. (see the shell script)
|
|
|
|
override.vm.provision :shell, :run => "always", :path => ".puppet/manifests/parallels-upgrade-guest-tools.sh"
|
2013-05-29 17:34:18 +02:00
|
|
|
|
2014-12-15 18:02:13 +01:00
|
|
|
# Set power consumption mode to "Better Performance"
|
|
|
|
p.optimize_power_consumption = false
|
2013-07-23 16:26:14 +02:00
|
|
|
|
2014-12-15 18:02:13 +01:00
|
|
|
p.memory = 1024
|
|
|
|
p.cpus = 2
|
2013-07-23 16:26:14 +02:00
|
|
|
end
|
|
|
|
|
2016-01-18 12:44:12 +01:00
|
|
|
config.vm.provider :vmware_workstation do |v, override|
|
|
|
|
v.vmx["memsize"] = "1024"
|
|
|
|
v.vmx["numvcpus"] = "1"
|
|
|
|
end
|
|
|
|
|
|
|
|
config.vm.provider :virtualbox do |vb, override|
|
|
|
|
vb.customize ["modifyvm", :id, "--memory", "1024"]
|
|
|
|
vb.customize ["modifyvm", :id, "--cpus", "2"]
|
2015-09-18 10:48:21 +02:00
|
|
|
end
|
|
|
|
|
2013-05-29 17:34:18 +02:00
|
|
|
config.vm.provision :puppet do |puppet|
|
2014-12-15 18:02:13 +01:00
|
|
|
puppet.hiera_config_path = ".puppet/hiera/hiera.yaml"
|
|
|
|
puppet.module_path = [ ".puppet/modules", ".puppet/profiles" ]
|
|
|
|
puppet.manifests_path = ".puppet/manifests"
|
|
|
|
puppet.manifest_file = "site.pp"
|
2015-07-23 12:37:23 +02:00
|
|
|
puppet.options = "--parser=future"
|
2013-06-28 13:45:13 +02:00
|
|
|
end
|
2017-10-18 14:45:58 +02:00
|
|
|
|
|
|
|
if File.exists?(".Vagrantfile.local") then
|
|
|
|
eval(IO.read(".Vagrantfile.local"), binding)
|
|
|
|
end
|
2013-05-29 17:34:18 +02:00
|
|
|
end
|