Created
September 29, 2014 22:39
-
-
Save vinyar/4cc734e6b20578f5bbb2 to your computer and use it in GitHub Desktop.
Vagrant file for working on VPN
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 : | |
cookbook_name = "centrify" | |
box = "windows2008r2" | |
box_url = "http://bla.com/windows2008r2.box" | |
hostname = "server_name" | |
Vagrant.configure("2") do |config| | |
#config.omnibus.chef_version = :latest | |
config.vm.define cookbook_name do |config| | |
config.vm.box = box | |
config.vm.box_url = box_url | |
config.vm.hostname = hostname | |
config.vm.guest = :windows | |
config.windows.halt_timeout = 25 | |
config.winrm.username = "vagrant" | |
config.winrm.password = "vagrant" | |
# config.berkshelf.enabled = true | |
# config.cookbooks_path = '../' | |
#Set WinRM Timeout in seconds (Default 30) | |
config.winrm.timeout = 1800 | |
# New veature in vagrant 1.6. Makes windows much easier. | |
config.vm.communicator = "winrm" | |
# Port forward WinRM and RDP | |
config.vm.network :forwarded_port, { :guest=>3389, :host=>3389, :id=>"rdp"}#, :auto_correct=>true } | |
config.vm.network :forwarded_port, { :guest=>5985, :host=>5985, :id=>"winrm"}#, :auto_correct=>true } | |
config.vm.network :private_network, ip: "192.168.33.10" # needed for Consultants/Contractors to spin up vagrant on VPN. | |
config.vm.provider :virtualbox do |p| | |
p.gui = true | |
# adding nat flag to make it work over VPN (may only be needed for consultants). Works in conjunction with private_network above. | |
p.customize ["modifyvm", :id, "--memory", "1500", "--clipboard", "bidirectional", "--natdnshostresolver1", "on"] | |
end | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = '../' | |
chef.log_level = :debug | |
chef.run_list = ["recipe[" + cookbook_name + "]"] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment