summaryrefslogtreecommitdiff
path: root/Vagrantfile
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-07 12:23:05 +0100
committervarac <varacanero@zeromail.org>2016-03-07 12:26:31 +0100
commite6e0b2b9c5cad7f7a66b0aedaf3ab67438eedf2d (patch)
tree5620cea2751d764af51534e9143f197a136ff2f4 /Vagrantfile
parent0ec326f27feecda1357ca7ba8b1c09ef2567a481 (diff)
[vagrant] Vagrant now can deploy a pixelated box
By default, a leap_platform-only box will get started. To start the pixelated box, use `vagrant up pixelated`.
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile70
1 files changed, 42 insertions, 28 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 3654b69e..a4398b77 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,39 +1,53 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
-Vagrant.configure("2") do |box|
+Vagrant.configure("2") do |config|
+
+ # shared config for all boxes
+
# Please verify the sha512 sum of the downloaded box before importing it into vagrant !
# see https://leap.se/en/docs/platform/details/development#Verify.vagrantbox.download
# for details
+ config.vm.box = "LEAP/jessie"
+
+ config.vm.provider "virtualbox" do |v|
+ v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+ v.name = "jessie"
+ v.memory = 1536
+ end
+ config.vm.provider "libvirt" do |v|
+ v.memory = 1536
+ end
+
+ # Fix annoying 'stdin: is not a tty' warning
+ # see http://foo-o-rama.com/vagrant--stdin-is-not-a-tty--fix.html
+ config.vm.provision "fix-no-tty", type: "shell" do |s|
+ s.privileged = false
+ s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
+ end
+
+ config.vm.provision "puppet" do |puppet|
+ puppet.manifests_path = "./vagrant"
+ puppet.module_path = "./puppet/modules"
+ puppet.manifest_file = "install-platform.pp"
+ puppet.options = "--verbose"
+ puppet.hiera_config_path = "hiera.yaml"
+ end
+ config.vm.provision "shell", path: "vagrant/configure-leap.sh"
+
+ config.ssh.username = "vagrant"
+
+ # forward leap_web ports
+ config.vm.network "forwarded_port", guest: 443, host:4443
+ # forward pixelated ports
+ config.vm.network "forwarded_port", guest: 8080, host:8080
+
+ config.vm.define :"leap_platform", primary: true do |leap_vagrant|
+ end
- box.vm.define :"jessie", primary: true do |config|
-
- config.vm.box = "LEAP/jessie"
- config.vm.provider "virtualbox" do |v|
- v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
- v.name = "jessie"
- v.memory = 1536
- end
-
- config.vm.provider "libvirt" do |v|
- v.memory = 1536
- end
-
- config.vm.provision "puppet" do |puppet|
- puppet.manifests_path = "./vagrant"
- puppet.module_path = "./puppet/modules"
- puppet.manifest_file = "install-platform.pp"
- puppet.options = "--verbose"
- puppet.hiera_config_path = "hiera.yaml"
- end
- config.vm.provision "shell", path: "vagrant/configure-leap.sh"
- config.ssh.username = "vagrant"
-
- # forward leap_web ports
- config.vm.network "forwarded_port", guest: 443, host:4443
- # forward pixelated ports
- config.vm.network "forwarded_port", guest: 8080, host:8080
+ config.vm.define :"pixelated", autostart: false do |pixelated_vagrant|
+ pixelated_vagrant.vm.provision "shell", path: "vagrant/add-pixelated.sh"
end
end