Last active
August 29, 2015 14:16
-
-
Save pragyanatvade/98e4ceb11ca8f30c909f to your computer and use it in GitHub Desktop.
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
domain = "example.com" | |
settings = { | |
:hostname => "adam", | |
:box => "ubuntu/trusty64", | |
:ip => "192.268.20.20", | |
} | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = settings[:box] # Name of the vagrant box | |
config.vm.host_name = "#{settings[:hostname]}.#{domain}" # Hostname | |
config.vm.box = "#{settings[:box]}" # URL of vagrant box | |
config.vm.network :forwarded_port, guest: 80, host: 8080 # Forwarding port | |
config.vm.network :forwarded_port, guest: 9000, host: 9000 # Forwarding port | |
config.vm.network :forwarded_port, guest: 9001, host: 9001 # Forwarding port | |
config.vm.network :forwarded_port, guest: 35729, host: 35729 # Forwarding port | |
config.vm.network :private_network, ip: settings[:ip] # Access allowed to the host only, private network | |
#config.vm.synced_folder "src/", "/var/www/#{settings[:hostname]}.#{domain}/src" # Shared folders | |
config.omnibus.chef_version = :latest # Install | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = "cookbooks" | |
chef.add_recipe "vagrant_main" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment