|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +Vagrant::Config.run do |config| |
| 5 | + # All Vagrant configuration is done here. The most common configuration |
| 6 | + # options are documented and commented below. For a complete reference, |
| 7 | + # please see the online documentation at vagrantup.com. |
| 8 | + |
| 9 | + # Every Vagrant virtual environment requires a box to build off of. |
| 10 | + config.vm.box = "precise64" |
| 11 | + |
| 12 | + # The url from where the 'config.vm.box' box will be fetched if it |
| 13 | + # doesn't already exist on the user's system. |
| 14 | + config.vm.box_url = "http://files.vagrantup.com/precise64.box" |
| 15 | + |
| 16 | + # Boot with a GUI so you can see the screen. (Default is headless) |
| 17 | + # config.vm.boot_mode = :gui |
| 18 | + |
| 19 | + # Assign this VM to a host-only network IP, allowing you to access it |
| 20 | + # via the IP. Host-only networks can talk to the host machine as well as |
| 21 | + # any other machines on the same network, but cannot be accessed (through this |
| 22 | + # network interface) by any external networks. |
| 23 | + # config.vm.network :hostonly, "192.168.33.10" |
| 24 | + |
| 25 | + # Assign this VM to a bridged network, allowing you to connect directly to a |
| 26 | + # network using the host's network device. This makes the VM appear as another |
| 27 | + # physical device on your network. |
| 28 | + # config.vm.network :bridged |
| 29 | + |
| 30 | + # Forward a port from the guest to the host, which allows for outside |
| 31 | + # computers to access the VM, whereas host only networking does not. |
| 32 | + config.vm.forward_port 80, 8080 |
| 33 | + |
| 34 | + # Share an additional folder to the guest VM. The first argument is |
| 35 | + # an identifier, the second is the path on the guest to mount the |
| 36 | + # folder, and the third is the path on the host to the actual folder. |
| 37 | + config.vm.share_folder "www", "/var/www", "www" |
| 38 | + |
| 39 | + # Enable provisioning with chef solo, specifying a cookbooks path, roles |
| 40 | + # path, and data_bags path (all relative to this Vagrantfile), and adding |
| 41 | + # some recipes and/or roles. |
| 42 | + # |
| 43 | + config.vm.provision :chef_solo do |chef| |
| 44 | + chef.cookbooks_path = "recipes/cookbooks" |
| 45 | + # chef.roles_path = "../my-recipes/roles" |
| 46 | + # chef.add_role "web" |
| 47 | + # chef.data_bags_path = "../my-recipes/data_bags" |
| 48 | + chef.add_recipe("apt") |
| 49 | + chef.add_recipe("chef-dotdeb") |
| 50 | + chef.add_recipe("chef-dotdeb::php54") |
| 51 | + chef.add_recipe("apache2") |
| 52 | + chef.add_recipe("apache2::mod_php5") |
| 53 | + chef.add_recipe("apache2::mod_rewrite") |
| 54 | + chef.add_recipe("mysql") |
| 55 | + chef.add_recipe("sqlite") |
| 56 | + chef.add_recipe("php") |
| 57 | + chef.add_recipe("vim") |
| 58 | + chef.add_recipe("zsh") |
| 59 | + chef.add_recipe("cron") |
| 60 | + chef.add_recipe("ntp") |
| 61 | + chef.add_recipe("apt") |
| 62 | + # # You may also specify custom JSON attributes: |
| 63 | + # chef.json = { :mysql_password => "foo" } |
| 64 | + end |
| 65 | + |
| 66 | + # Enable provisioning with chef server, specifying the chef server URL, |
| 67 | + # and the path to the validation key (relative to this Vagrantfile). |
| 68 | + # |
| 69 | + # The Opscode Platform uses HTTPS. Substitute your organization for |
| 70 | + # ORGNAME in the URL and validation key. |
| 71 | + # |
| 72 | + # If you have your own Chef Server, use the appropriate URL, which may be |
| 73 | + # HTTP instead of HTTPS depending on your configuration. Also change the |
| 74 | + # validation key to validation.pem. |
| 75 | + # |
| 76 | + # config.vm.provision :chef_client do |chef| |
| 77 | + # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" |
| 78 | + # chef.validation_key_path = "ORGNAME-validator.pem" |
| 79 | + # end |
| 80 | + # |
| 81 | + # If you're using the Opscode platform, your validator client is |
| 82 | + # ORGNAME-validator, replacing ORGNAME with your organization name. |
| 83 | + # |
| 84 | + # IF you have your own Chef Server, the default validation client name is |
| 85 | + # chef-validator, unless you changed the configuration. |
| 86 | + # |
| 87 | + # chef.validation_client_name = "ORGNAME-validator" |
| 88 | +end |
0 commit comments