From a17e05475d21338628e8c632b610746a6f35afd9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Oct 2010 09:46:37 -0700 Subject: [PATCH] Init Vagrantfile is now heavily commented with various available options. [closes GH-171] --- CHANGELOG.md | 2 + templates/Vagrantfile.erb | 14 ------- templates/commands/init/Vagrantfile.erb | 50 ++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 20 deletions(-) delete mode 100644 templates/Vagrantfile.erb diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb6ad7f8..5cdf96503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.6.4 (unreleased) + - Initial Vagrantfile is now heavily commented with various available + options. [GH-171] - Box add checks if a box already exists before the download. [GH-170] - NFS no longer attempts to clean exports file if VM is not created, which was causing a stack trace during recovery. [related to GH-166] diff --git a/templates/Vagrantfile.erb b/templates/Vagrantfile.erb deleted file mode 100644 index cfb7b66bb..000000000 --- a/templates/Vagrantfile.erb +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant::Config.run do |config| - # All Vagrant configuration is done here. For a detailed explanation - # and listing of configuration options, please view the documentation - # online. - - # Every Vagrant virtual environment requires a box to build off of. - config.vm.box = "<%= default_box %>" - <% if !default_box_url.nil? -%> - - # The url from where the 'config.vm.box' box will be fetched if it - # doesn't already exist on the user's system - config.vm.box_url = "<%= default_box_url %>" - <% end -%> -end diff --git a/templates/commands/init/Vagrantfile.erb b/templates/commands/init/Vagrantfile.erb index f8efe3f03..11ffe3aeb 100644 --- a/templates/commands/init/Vagrantfile.erb +++ b/templates/commands/init/Vagrantfile.erb @@ -1,13 +1,51 @@ Vagrant::Config.run do |config| - # All Vagrant configuration is done here. For a detailed explanation - # and listing of configuration options, please view the documentation - # online. + # 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 = "<%= box_name %>" - <% if !box_url.nil? %> # The url from where the 'config.vm.box' box will be fetched if it - # doesn't already exist on the user's system - config.vm.box_url = "<%= box_url %>"<% end %> + # doesn't already exist on the user's system. + <% if box_url.nil? %># <% end %>config.vm.box_url = "<%= box_url || "http://domain.com/path/to/above.box" %>" + + # Boot with a GUI so you can see the screen. (Default is headless) + # config.vm.boot_mode = :gui + + # Assign this VM to a host only network IP, allowing you to access it + # via the IP. + # config.vm.network "33.33.33.10" + + # Forward a port from the guest to the host, which allows for outside + # computers to access the VM, whereas host only networking does not. + # config.vm.forward_port "http", 80, 8080 + + # 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 "v-data", "/vagrant_data", "../data") + + # Enable provisioning with chef solo, specifying a cookbooks path (relative + # to this Vagrantfile), and adding some recipes and/or roles. + # + # config.vm.provisioner = :chef_solo + # config.chef.cookbooks_path = "cookbooks" + # config.chef.add_recipe "mysql" + # config.chef.add_role "web" + # + # You may also specify custom JSON attributes: + # config.chef.json = { :mysql_password => "foo" } + + # Enable provisioning with chef server, specifying the chef server URL, + # and the path to the validation key (relative to this Vagrantfile). + # + # config.vm.provisioner = :chef_server + # config.chef.chef_server_url = "http://api.opscode.com/organizations/organization" + # config.chef.validation_key_path = "kiip-validator.pem" + # + # If you're using the OpsCode platform, you'll have to set this as well. + # If you're using your own chef server, you may have to set it, but it depends + # on how your Chef server is configured. + # config.chef.validation_client_name = "organization-validator" end