Created
April 24, 2015 20:17
-
-
Save danemacaulay/25df47eb32e18bf17a9f to your computer and use it in GitHub Desktop.
java6 vagrantfile
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
require 'rbconfig' | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise32" | |
# Provider-specific configuration so you can fine-tune various | |
# backing providers for Vagrant. These expose provider-specific options. | |
config.vm.provider :virtualbox do |vb| | |
vb.name = "dnb360" | |
vb.memory = 1024 | |
# Enable the use of a host VPN connection on a guest VM | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end | |
config.vm.network "private_network", ip: "192.168.50.4" | |
# jboss specific configuration | |
config.vm.synced_folder "uiagent", "/vagrant/uiagent" | |
config.vm.synced_folder "jboss", "/vagrant/jboss" | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
config.vm.provision "shell", inline: $jboss | |
end | |
$jboss = <<SCRIPT | |
if ! type -p java; then | |
# Update apt and install dependencies | |
sudo apt-get -y -q update | |
sudo apt-get -y -q install openjdk-6-jdk ant scala curl git vim | |
fi | |
SCRIPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment