Last active
August 29, 2015 14:04
-
-
Save danemacaulay/ce5f244913cabc209ef3 to your computer and use it in GitHub Desktop.
DnB360 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
# Prerequisites | |
# git, svn, and working credentials | |
# [vagrant](https://www.vagrantup.com/downloads.html) | |
# [virtualbox](https://www.virtualbox.org/wiki/Downloads) | |
# [node](http://nodejs.org/download/) | |
# [bower](http://bower.io) | |
# [grunt](http://gruntjs.com/getting-started) | |
# Installation | |
# mkdir DnB360 && cd DnB360 | |
# wget https://gist.githubusercontent.com/danemacaulay/ce5f244913cabc209ef3/raw/43147e15e8697643cdf6371be61d8cbadab9251d/Vagrantfile | |
# svn co http://svn.hoovers.com/poa/env/jboss6/standalone/branches/local jboss | |
# git clone http://LastnameY@stash.dnbint.net/stash/scm/dnb360/uiagent.git | |
# git clone http://LastnameY@stash.dnbint.net/stash/scm/dnb360/content.git | |
# vagrant up | |
# cd content | |
# npm install | |
# bower install | |
# grunt serve | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
echo I am provisioning... | |
sudo apt-get -y -q update | |
sudo apt-get -y -q install openjdk-6-jdk scala ant | |
cd /uiagent | |
ant deploy | |
/data/jboss/bin/standalone.sh & | |
SCRIPT | |
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| | |
# Enable the use of a host VPN connection on a guest VM | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end | |
# Create a forwarded port mapping which allows access to a specific port | |
# within the machine from a port on the host machine. In the example below, | |
# accessing "localhost:8080" will access port 80 on the guest machine. | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
# Share an additional folder to the guest VM. The first argument is | |
# the path on the host to the actual folder. The second argument is | |
# the path on the guest to mount the folder. And the optional third | |
# argument is a set of non-required options. | |
config.vm.synced_folder "jboss", "/data/jboss", create: true | |
config.vm.synced_folder "uiagent", "/uiagent" | |
# Use the shell provisioner to set up the machine for jboss and uiagent | |
config.vm.provision "shell", inline: $script | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment