From dc87df7ca0eac492fcd65638b8e72b6e02f7bb4f Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 28 Sep 2015 13:29:43 +0200 Subject: [feat] Vagrant: forward leap_web ports 443 ad 80 --- Vagrantfile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index c9c68284..ba5451aa 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,6 +9,11 @@ Vagrant.configure("2") do |vagrant_config| config.vm.box = "LEAP/wheezy" #config.vm.network :private_network, ip: "10.5.5.102" + + # forward leap_web ports + config.vm.network "forwarded_port", guest: 80, host:8080 + config.vm.network "forwarded_port", guest: 443, host:4443 + config.vm.provider "virtualbox" do |v| v.memory = 1024 v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] -- cgit v1.2.3 From 62edc7545669aaa39066967fbd7a301667e17777 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 30 Apr 2015 11:10:41 +0200 Subject: Vagrantfile now contains one box for wheezy and one for jessie (wheezy is default) Change-Id: Ib58f7d002427a190474896445c884bb55080c143 --- Vagrantfile | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index ba5451aa..cb9392e3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,23 +1,39 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -Vagrant.configure("2") do |vagrant_config| - vagrant_config.vm.define :node1 do |config| - # 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 +Vagrant.configure("2") do |config| + # 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.define :"wheezy", primary: true do |config| config.vm.box = "LEAP/wheezy" - #config.vm.network :private_network, ip: "10.5.5.102" + config.vm.provider "virtualbox" do |v| + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + v.name = "wheezy" + 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" + end + config.vm.provision "shell", path: "vagrant/configure-leap.sh" + config.ssh.username = "vagrant" # forward leap_web ports config.vm.network "forwarded_port", guest: 80, host:8080 config.vm.network "forwarded_port", guest: 443, host:4443 + end + + config.vm.define :"jessie", autostart: false do |config| + config.vm.box = "LEAP/jessie" config.vm.provider "virtualbox" do |v| - v.memory = 1024 v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.name = "node1" + v.name = "jessie" end config.vm.provision "puppet" do |puppet| @@ -27,8 +43,11 @@ Vagrant.configure("2") do |vagrant_config| puppet.options = "--verbose" end config.vm.provision "shell", path: "vagrant/configure-leap.sh" - config.ssh.username = "vagrant" + # forward leap_web ports + config.vm.network "forwarded_port", guest: 80, host:8080 + config.vm.network "forwarded_port", guest: 443, host:4443 end + end -- cgit v1.2.3 From afdce78e2a1128cf9590df9c1f1623f029cedd55 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 23 Dec 2015 15:43:53 +0100 Subject: [feat] Vagrantfile now contains a jessie box jessie is now the default box --- Vagrantfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index cb9392e3..c8ebc687 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,17 +1,18 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -Vagrant.configure("2") do |config| +Vagrant.configure("2") do |box| # 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.define :"wheezy", primary: true do |config| - config.vm.box = "LEAP/wheezy" + 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 = "wheezy" + v.name = "jessie" end config.vm.provision "puppet" do |puppet| @@ -28,12 +29,12 @@ Vagrant.configure("2") do |config| config.vm.network "forwarded_port", guest: 443, host:4443 end - config.vm.define :"jessie", autostart: false do |config| + box.vm.define :"wheezy", autostart: false do |config| - config.vm.box = "LEAP/jessie" + config.vm.box = "LEAP/wheezy" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.name = "jessie" + v.name = "wheezy" end config.vm.provision "puppet" do |puppet| @@ -49,5 +50,4 @@ Vagrant.configure("2") do |config| config.vm.network "forwarded_port", guest: 80, host:8080 config.vm.network "forwarded_port", guest: 443, host:4443 end - end -- cgit v1.2.3 From 38a99f39e7a037cc4c316c87529ebaec6689170b Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 23 Dec 2015 19:07:12 +0100 Subject: Vagrant boxes need 1g of ram --- Vagrantfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index c8ebc687..e6699424 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -12,7 +12,12 @@ Vagrant.configure("2") do |box| config.vm.box = "LEAP/jessie" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.name = "jessie" + v.name = "jessie" + v.memory = 1024 + end + + config.vm.provider "libvirt" do |v| + v.memory = 1024 end config.vm.provision "puppet" do |puppet| @@ -34,7 +39,12 @@ Vagrant.configure("2") do |box| config.vm.box = "LEAP/wheezy" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.name = "wheezy" + v.name = "wheezy" + v.memory = 1024 + end + + config.vm.provider "libvirt" do |v| + v.memory = 1024 end config.vm.provision "puppet" do |puppet| -- cgit v1.2.3 From 63f32607b663d8878c72f8d656fd5577df3fbd5d Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 20 Jan 2016 13:24:48 +0100 Subject: leap redirects port 80 to an invalid url on vagrant, we use example.org as domain and all requests to http are redirected to https://example.org thats why this does not work on vagrant. we connect to localhost:8080 and get redirected to https://example.org thats why we do not need this port forwarded --- Vagrantfile | 2 -- 1 file changed, 2 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index e6699424..82863c42 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -30,7 +30,6 @@ Vagrant.configure("2") do |box| config.ssh.username = "vagrant" # forward leap_web ports - config.vm.network "forwarded_port", guest: 80, host:8080 config.vm.network "forwarded_port", guest: 443, host:4443 end @@ -57,7 +56,6 @@ Vagrant.configure("2") do |box| config.ssh.username = "vagrant" # forward leap_web ports - config.vm.network "forwarded_port", guest: 80, host:8080 config.vm.network "forwarded_port", guest: 443, host:4443 end end -- cgit v1.2.3 From 50dc1b0b8e4a1c28ce13d2e761e527afd68f14c0 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 20 Jan 2016 11:12:56 +0100 Subject: forward port to pixelated pixelated needs to be accessible when running inside vagrant problem is, that we can't add the forwarding anywhere else because vagrant always overwrites virtualbox settings. --- Vagrantfile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 82863c42..ba4cf595 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -31,6 +31,8 @@ Vagrant.configure("2") do |box| # 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 end box.vm.define :"wheezy", autostart: false do |config| -- cgit v1.2.3 From c2b7f3c5ba8089bb3d4d07cba374f06020674927 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 25 Jan 2016 21:34:05 +0100 Subject: Also increase ram of Vagrantfileto 1,5g otherwise, machines will be out-of-mememory on deploy --- Vagrantfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index ba4cf595..c21bcea3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,11 +13,11 @@ Vagrant.configure("2") do |box| config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] v.name = "jessie" - v.memory = 1024 + v.memory = 1536 end config.vm.provider "libvirt" do |v| - v.memory = 1024 + v.memory = 1536 end config.vm.provision "puppet" do |puppet| @@ -41,11 +41,11 @@ Vagrant.configure("2") do |box| config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] v.name = "wheezy" - v.memory = 1024 + v.memory = 1536 end config.vm.provider "libvirt" do |v| - v.memory = 1024 + v.memory = 1536 end config.vm.provision "puppet" do |puppet| -- cgit v1.2.3 From f6297a1b8f776875689deaab9b1fb0c76b4b21a3 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 23 Feb 2016 12:54:02 +0100 Subject: Remove wheezy vagrant box --- Vagrantfile | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index c21bcea3..43f3ab15 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -35,29 +35,4 @@ Vagrant.configure("2") do |box| config.vm.network "forwarded_port", guest: 8080, host:8080 end - box.vm.define :"wheezy", autostart: false do |config| - - config.vm.box = "LEAP/wheezy" - config.vm.provider "virtualbox" do |v| - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.name = "wheezy" - 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" - 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 - end end -- cgit v1.2.3 From 7c12520c65f4efc6342a77eb208772c1be006286 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 23 Feb 2016 13:05:49 +0100 Subject: Add hiera.yaml so vagrant provision doesn't complain about it missing Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults --- Vagrantfile | 1 + 1 file changed, 1 insertion(+) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 43f3ab15..3654b69e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,6 +25,7 @@ Vagrant.configure("2") do |box| 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" -- cgit v1.2.3 From e6e0b2b9c5cad7f7a66b0aedaf3ab67438eedf2d Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 7 Mar 2016 12:23:05 +0100 Subject: [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`. --- Vagrantfile | 70 ++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 28 deletions(-) (limited to 'Vagrantfile') 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 -- cgit v1.2.3 From 4e7376a70b30f488a707a3ddfff34a31b24b3370 Mon Sep 17 00:00:00 2001 From: Christoph Kluenter Date: Tue, 8 Mar 2016 15:03:41 +0100 Subject: make Vagrantfile compatible with older vagrant versions --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index a4398b77..25f26b3b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -22,7 +22,7 @@ Vagrant.configure("2") do |config| # 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| + config.vm.provision "shell" do |s| s.privileged = false s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" end -- cgit v1.2.3