vagrant box add ubuntu12 http://files.vagrantup.com/precise64.box
vagrant init
vagrant up
vagrant ssh
Vagrant::Config.run do |config|
config.vm.box = "ubuntu12"
# Assign this VM to a host only network IP, allowing you to access it
# via the IP.
config.vm.network :hostonly, "10.0.10.34"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port 8161, 8161
config.vm.forward_port 6166, 6166
config.vm.forward_port 6163, 6163
config.vm.forward_port 8125, 8125, { :protocol => 'udp' }
end
config.vm.share_folder "minnebar", "~/minnebar", "./minnebar"
Vagrant::Config.run do |config|
config.vm.define :grailsService do |web_config|
web_config.vm.box = "ubuntu12"
web_config.vm.network :hostonly, "10.0.10.30"
config.vm.share_folder "minnebar", "~/minnebar", "./minnebar"
end
config.vm.define :redisServer do |redis_config|
redis_config.vm.box = "ubuntu12"
redis_config.vm.network :hostonly, "10.0.10.31"
end
end
config.vm.provision :puppet do |puppet|
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "development.pp"
#puppet.options = "--verbose --debug"
end
node default {
class { 'vagrant':}
class { 'java':
distribution => 'jdk',
version => 'latest',
}
package { "unzip":
ensure => "installed"
}
package { "curl":
ensure => "installed"
}
}
class vagrant {
exec { 'apt-get update':
command => '/usr/bin/apt-get update'
}
}
exec { 'rvm autolibs 4':
require => File['/home/vagrant/.rvmrc'],
command => '/usr/local/rvm/bin/rvm autolibs 4',
cwd => '/home/vagrant/minnebar',
}
exec { 'rvm requirements':
require => Exec['rvm autolibs 4'],
command => '/usr/local/rvm/bin/rvm requirements',
cwd => '/home/vagrant/minnebar',
}