Created
July 8, 2012 17:00
-
-
Save fishnix/3071775 to your computer and use it in GitHub Desktop.
s9y vagrant dev sandbox
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
| -- Install Virtualbox | |
| https://www.virtualbox.org/wiki/Downloads | |
| -- Install a git client if you don't have one | |
| -- Install Vagrant | |
| http://vagrantup.com/ | |
| -- get a copy of my chef cookbooks | |
| cd ~/tmp/vagrant_projects | |
| git clone git@github.com:fishnix/chef-repo.git -b vagrant-cookbooks | |
| or | |
| cd chef-repo && git pull | |
| -- Setup box | |
| git clone git://gist.github.com/3071775.git s9y-vagrant | |
| cd s9y-vagrant | |
| -- Setup some shared folders | |
| mkdir -p s9y/www | |
| -- Fire and go | |
| vagrant up |
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
| # -*- 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 = "centos62min" | |
| config.vm.box_url = "http://leleupi.its.yale.edu:8181/PKG/centos62min.box" | |
| 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. | |
| # HTTP | |
| config.vm.forward_port 80, 8080 | |
| # SSH | |
| 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/cookbooks" | |
| chef.roles_path = "../chef-repo/roles" | |
| chef.data_bags_path = "../chef-repo/data_bags" | |
| chef.add_role "s9y-vagrant" | |
| chef.json.merge!({ | |
| :apache2 => { :user => "vagrant" }, | |
| :mysql => { :server_root_password => "vagrant" } | |
| }) | |
| 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 "s9y-www", "/var/www/vhost", "./s9y/www" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment