This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to use new funtoo-oddb box and vagrant 1.2
- Loading branch information
Showing
4 changed files
with
94 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,42 @@ | ||
GIT | ||
remote: git://github.com/ngiger/vagrant.git | ||
revision: fe7dbebc56d41c338ae2b77ad7fbb22ff50e91c8 | ||
specs: | ||
vagrant (1.2.3.dev) | ||
childprocess (~> 0.3.7) | ||
erubis (~> 2.7.0) | ||
i18n (~> 0.6.0) | ||
json (>= 1.5.1, < 1.8.0) | ||
log4r (~> 1.1.9) | ||
net-scp (~> 1.1.0) | ||
net-ssh (~> 2.6.6) | ||
|
||
GIT | ||
remote: git://github.com/rodjek/librarian-puppet.git | ||
revision: b707b1e609a1806e09fdce0a9d5c872a16ba1e20 | ||
specs: | ||
librarian-puppet (0.9.9) | ||
json | ||
thor (~> 0.15) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
archive-tar-minitar (0.5.2) | ||
childprocess (0.3.9) | ||
ffi (~> 1.0, >= 1.0.11) | ||
commonwatir (4.0.0) | ||
data_magic (0.14) | ||
faker (>= 1.1.2) | ||
yml_reader (>= 0.2) | ||
diff-lcs (1.2.2) | ||
erubis (2.7.0) | ||
facter (1.6.18) | ||
faker (1.1.2) | ||
i18n (~> 0.5) | ||
ffi (1.6.0) | ||
hiera (1.1.2) | ||
json_pure | ||
ffi (1.9.0) | ||
i18n (0.6.4) | ||
json (1.7.7) | ||
json_pure (1.7.7) | ||
librarian-puppet (0.9.8) | ||
json | ||
thor (~> 0.15) | ||
log4r (1.1.10) | ||
metaclass (0.0.1) | ||
mocha (0.13.3) | ||
metaclass (~> 0.0.1) | ||
multi_json (1.7.2) | ||
net-scp (1.0.4) | ||
net-ssh (>= 1.99.1) | ||
net-ssh (2.2.2) | ||
page-object (0.8.7) | ||
page_navigation (>= 0.7) | ||
selenium-webdriver (>= 2.31.0) | ||
watir-webdriver (>= 0.6.2) | ||
page_navigation (0.7) | ||
data_magic (>= 0.14) | ||
puppet (3.1.1) | ||
facter (~> 1.6) | ||
hiera (~> 1.0) | ||
rspec (2.13.0) | ||
rspec-core (~> 2.13.0) | ||
rspec-expectations (~> 2.13.0) | ||
rspec-mocks (~> 2.13.0) | ||
rspec-core (2.13.1) | ||
rspec-expectations (2.13.0) | ||
diff-lcs (>= 1.1.3, < 2.0) | ||
rspec-mocks (2.13.0) | ||
rspec-puppet (0.1.6) | ||
rspec | ||
rubyzip (0.9.9) | ||
selenium-webdriver (2.31.0) | ||
childprocess (>= 0.2.5) | ||
multi_json (~> 1.0) | ||
rubyzip | ||
websocket (~> 1.0.4) | ||
net-scp (1.1.1) | ||
net-ssh (>= 2.6.5) | ||
net-ssh (2.6.7) | ||
thor (0.18.1) | ||
vagrant (1.0.7) | ||
archive-tar-minitar (= 0.5.2) | ||
childprocess (~> 0.3.1) | ||
erubis (~> 2.7.0) | ||
i18n (~> 0.6.0) | ||
json (>= 1.5.1, < 1.8.0) | ||
log4r (~> 1.1.9) | ||
net-scp (~> 1.0.4) | ||
net-ssh (~> 2.2.2) | ||
vagrant-hiera (0.4.0) | ||
watir (4.0.2) | ||
commonwatir (~> 4) | ||
watir-webdriver | ||
watir-webdriver (0.6.2) | ||
selenium-webdriver (>= 2.18.0) | ||
websocket (1.0.7) | ||
yml_reader (0.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
librarian-puppet | ||
mocha | ||
page-object | ||
puppet | ||
rspec-puppet | ||
vagrant | ||
vagrant-hiera | ||
watir | ||
librarian-puppet! | ||
vagrant! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,75 @@ | ||
# see http://vagrantup.com | ||
# Copyright (c) Niklaus Giger, <niklaus.giger@member.fsf.org> | ||
# License: GPLv2 | ||
# Boxes are stored under ~/.vagrant.d/boxes/ | ||
|
||
boxUrl = 'http://ngiger.dyndns.org/downloads/funtoo-oddb.box' | ||
boxName = 'funtoo-oddb' | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
require 'yaml' | ||
|
||
#------------------------------------------------------------------------------------------------------------ | ||
# Some simple customization below | ||
#------------------------------------------------------------------------------------------------------------ | ||
funtooName = 'funtoo-oddb-20130617' | ||
privateFuntoo = "/opt/src/veewee-ngiger/funtoo-oddb-20130617.box" | ||
funtooBox = File.exists?(privateFuntoo) ? privateFuntoo : "http://ngiger.dyndns.org/downloads/#{funtooName}.box" | ||
|
||
debianName = 'Elexis-Wheezy-amd64-20130510' | ||
privateDebian = "/opt/src/veewee-elexis/#{debianName}.box" | ||
debianBox = File.exists?(privateDebian) ? privateDebian : "http://ngiger.dyndns.org/downloads/#{debianName}.box" | ||
|
||
|
||
bridgedNetworkAdapter = "eth0" # adapt it to your liking, e.g. on MacOSX it might | ||
# bridgedNetworkAdapter = "en0: Wi-Fi (AirPort)" # adapt it to your liking, e.g. on MacOSX it might | ||
hieraCfg = YAML.load(File.open( 'hieradata/private/config.yaml' ) ) | ||
|
||
Vagrant::Config.run do |config| | ||
# Setup the box | ||
config.vm.box = boxName | ||
config.vm.box_url = boxUrl if defined?(boxUrl) | ||
|
||
# Boot with a GUI so you can see the screen. (Default is headless) | ||
config.vm.boot_mode = :gui | ||
config.vm.provision :puppet, :options => "--debug" | ||
|
||
|
||
#------------------------------------------------------------------------------------------------------------ | ||
# End of simple customization | ||
#------------------------------------------------------------------------------------------------------------ | ||
# All Vagrant configuration is done here. The most common configuration | ||
# options are documented and commented below. For a complete reference, | ||
# please see the online documentation at vagrantup.com. | ||
|
||
# A good solution would be http://oddbfault.com/questions/418422/public-static-ip-for-vagrant-boxes | ||
|
||
Vagrant.configure("2") do |config| | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", 6200, "--cpus", 2, ] | ||
vb.gui = true | ||
end | ||
|
||
# This shell provisioner installs librarian-puppet and runs it to install | ||
# puppet modules. This has to be done before the puppet provisioning so that | ||
# the modules are available when puppet tries to parse its manifests. | ||
config.vm.provision :shell, :path => "shell/main.sh" | ||
|
||
config.vm.provision :puppet do |puppet| | ||
# Now run the puppet provisioner. Note that the modules directory is entirely | ||
# managed by librarian-puppet | ||
puppet.options = '--debug' | ||
puppet.manifests_path = "manifests" | ||
puppet.manifest_file = "site.pp" | ||
puppet.module_path = "modules" | ||
end | ||
|
||
if false | ||
# I cannot use the following three lines as specified by https://github.com/gposton/vagrant-hieradata | ||
# because this lead to trying to install apt usinge puppetlabs repository | ||
# config.hiera.config_path = File.join(Dir.pwd, 'hieradata') | ||
# config.hiera.config_file = 'hiera.yaml' | ||
# config.hiera.data_path = File.join(Dir.pwd, 'hieradata') | ||
else # use my workaround | ||
config.vm.share_folder "hieradata", "/etc/puppet/hieradata", File.join(Dir.pwd, 'hieradata') | ||
end | ||
|
||
config.vm.define :oddbFuntoo do |oddbFuntoo| | ||
oddbFuntoo.vm.box = funtooName | ||
oddbFuntoo.vm.box_url = funtooBox | ||
oddbFuntoo.vm.provider :virtualbox do |vb| vb.name = "oddb_funtoo" end | ||
puts "Using funtooBox #{funtooBox}" | ||
oddbFuntoo.vm.hostname = "oddb.#{`hostname -d`.chomp}" | ||
|
||
# cannot specify an ip. Only works with the default of 10.0.2.15 of vagrant | ||
# config.vm.network :hostonly, hieraCfg['::oddb_org::ip'] | ||
config.vm.host_name = hieraCfg['::oddb_org::hostname'] | ||
portBase ||= hieraCfg['::vagrant::portBase'] | ||
portBase ||= 44000 | ||
config.vm.forward_port 22, portBase + 22 # ssh | ||
config.vm.forward_port 80, portBase + 80 # apache | ||
config.vm.forward_port 81, portBase + 81 # shoe project | ||
portBase ||= hieraCfg['::vagrant::portBase'] | ||
portBase ||= 44000 | ||
oddbFuntoo.vm.network :private_network, ip: "192.168.50.#{portBase/1000}" | ||
oddbFuntoo.vm.network :forwarded_port, guest: 22, host: portBase + 22 # ssh | ||
oddbFuntoo.vm.network :forwarded_port, guest: 80, host: portBase + 80 # apache | ||
if false | ||
# I cannot use the following three lines as specified by https://github.com/gposton/vagrant-hieradata | ||
# because this lead to trying to install apt usinge puppetlabs repository | ||
# config.hiera.config_path = File.join(Dir.pwd, 'hieradata') | ||
# config.hiera.config_file = 'hiera.yaml' | ||
# config.hiera.data_path = File.join(Dir.pwd, 'hieradata') | ||
else # use my workaround | ||
# config.vm.synced_folder "src/", "/srv/website" | ||
config.vm.synced_folder "/etc/puppet/hieradata", File.join(File.dirname(__FILE__), 'hieradata') , disabled: true | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters