Skip to content

Instantly share code, notes, and snippets.

@fishnix
Created June 21, 2012 19:33
Show Gist options
  • Select an option

  • Save fishnix/2967989 to your computer and use it in GitHub Desktop.

Select an option

Save fishnix/2967989 to your computer and use it in GitHub Desktop.
JBoss/JAVA Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# 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.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "minimal-centos-62"
config.vm.customize ["modifyvm", :id, "--memory", "1024"]
# 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 8080, 8080
config.vm.forward_port 8443, 8443
config.vm.forward_port 8888, 8888
config.vm.forward_port 22, 2222
# Enable provisioning with chef solo, specifying a cookbooks path (relative
# to this Vagrantfile), and adding some recipes and/or roles.
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef-repo-yu/cookbooks"
chef.roles_path = "chef-repo-yu/roles"
#chef.add_recipe "java"
#chef.add_recipe "jboss"
chef.add_role "jboss-vagrant"
# # You may also specify custom JSON attributes:
# chef.json.merge!({ :mysql_password => "foo" })
end
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment