Created
February 4, 2014 11:20
-
-
Save rrmartins/8801914 to your computer and use it in GitHub Desktop.
Vagrantfile
This file contains hidden or 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
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "cf" | |
| config.vm.synced_folder ".", "/Workspace", id: "vagrant-root" | |
| # config.vm.network :private_network, ip: "10.10.10.1" | |
| forward_port = ->(guest, host = guest) do | |
| config.vm.network :forwarded_port, | |
| guest: guest, | |
| host: host, | |
| auto_correct: true | |
| end | |
| forward_port[2000] | |
| forward_port[5432] | |
| forward_port[3000] # rails | |
| forward_port[3306] # mysql | |
| forward_port[1080] # mailcatcher | |
| forward_port[80] | |
| config.vm.provider :virtualbox do |vb| | |
| vb.customize ["modifyvm", :id, "--memory", "2048"] | |
| vb.customize ["modifyvm", :id, "--cpuexecutioncap", "90"] | |
| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
| vb.customize [ | |
| "setextradata", :id, | |
| "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1" | |
| ] | |
| vb.customize [ | |
| "setextradata", :id, | |
| "VBoxInternal/Devices/ahci/0/LUN#[0]/Config/IgnoreFlush", "1" | |
| ] | |
| end | |
| config.vm.provision :chef_solo do |chef| | |
| chef.cookbooks_path = "cookbooks" | |
| chef.json = { | |
| "postgresql" => { | |
| "password" => { | |
| "postgres" => "password" | |
| } | |
| }, | |
| "database" => { | |
| "create" => ["encased_dev"] | |
| }, | |
| "build_essential" => { | |
| "compiletime" => true | |
| } | |
| } | |
| chef.run_list = ['recipe[build-essential]', 'recipe[openssl]', 'recipe[postgresql::server]', 'recipe[database::postgresql]'] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment