vagrant 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. data/.gitignore +1 -0
  2. data/.yardopts +1 -0
  3. data/CHANGELOG.md +56 -0
  4. data/Gemfile +14 -3
  5. data/Gemfile.lock +38 -11
  6. data/README.md +1 -1
  7. data/bin/vagrant +20 -5
  8. data/config/default.rb +6 -8
  9. data/lib/vagrant.rb +40 -13
  10. data/lib/vagrant/action.rb +56 -16
  11. data/lib/vagrant/action/box/destroy.rb +3 -1
  12. data/lib/vagrant/action/box/download.rb +8 -13
  13. data/lib/vagrant/action/box/unpackage.rb +8 -11
  14. data/lib/vagrant/action/box/verify.rb +3 -3
  15. data/lib/vagrant/action/builder.rb +3 -30
  16. data/lib/vagrant/action/builtin.rb +6 -1
  17. data/lib/vagrant/action/environment.rb +14 -62
  18. data/lib/vagrant/action/general/package.rb +29 -22
  19. data/lib/vagrant/action/vm/boot.rb +5 -12
  20. data/lib/vagrant/action/vm/check_box.rb +4 -4
  21. data/lib/vagrant/action/vm/check_guest_additions.rb +4 -6
  22. data/lib/vagrant/action/vm/clear_forwarded_ports.rb +2 -2
  23. data/lib/vagrant/action/vm/clear_nfs_exports.rb +1 -1
  24. data/lib/vagrant/action/vm/clear_shared_folders.rb +1 -1
  25. data/lib/vagrant/action/vm/customize.rb +1 -1
  26. data/lib/vagrant/action/vm/destroy.rb +1 -2
  27. data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +1 -1
  28. data/lib/vagrant/action/vm/disable_networks.rb +11 -9
  29. data/lib/vagrant/action/vm/discard_state.rb +2 -2
  30. data/lib/vagrant/action/vm/export.rb +10 -11
  31. data/lib/vagrant/action/vm/forward_ports.rb +21 -9
  32. data/lib/vagrant/action/vm/halt.rb +3 -8
  33. data/lib/vagrant/action/vm/import.rb +16 -14
  34. data/lib/vagrant/action/vm/match_mac_address.rb +1 -1
  35. data/lib/vagrant/action/vm/network.rb +9 -16
  36. data/lib/vagrant/action/vm/nfs.rb +14 -18
  37. data/lib/vagrant/action/vm/provision.rb +5 -5
  38. data/lib/vagrant/action/vm/resume.rb +1 -1
  39. data/lib/vagrant/action/vm/share_folders.rb +6 -44
  40. data/lib/vagrant/action/vm/suspend.rb +1 -1
  41. data/lib/vagrant/action/warden.rb +74 -0
  42. data/lib/vagrant/box.rb +18 -82
  43. data/lib/vagrant/box_collection.rb +47 -0
  44. data/lib/vagrant/cli.rb +55 -0
  45. data/lib/vagrant/command/base.rb +106 -0
  46. data/lib/vagrant/command/box.rb +33 -0
  47. data/lib/vagrant/command/destroy.rb +17 -0
  48. data/lib/vagrant/command/group_base.rb +99 -0
  49. data/lib/vagrant/command/halt.rb +18 -0
  50. data/lib/vagrant/command/helpers.rb +33 -0
  51. data/lib/vagrant/command/init.rb +14 -0
  52. data/lib/vagrant/command/named_base.rb +14 -0
  53. data/lib/vagrant/command/package.rb +41 -0
  54. data/lib/vagrant/command/provision.rb +17 -0
  55. data/lib/vagrant/command/reload.rb +17 -0
  56. data/lib/vagrant/command/resume.rb +17 -0
  57. data/lib/vagrant/command/ssh.rb +41 -0
  58. data/lib/vagrant/command/ssh_config.rb +21 -0
  59. data/lib/vagrant/command/status.rb +23 -0
  60. data/lib/vagrant/command/suspend.rb +17 -0
  61. data/lib/vagrant/command/up.rb +20 -0
  62. data/lib/vagrant/command/upgrade_to_060.rb +45 -0
  63. data/lib/vagrant/command/version.rb +13 -0
  64. data/lib/vagrant/config.rb +107 -189
  65. data/lib/vagrant/config/base.rb +67 -0
  66. data/lib/vagrant/config/error_recorder.rb +19 -0
  67. data/lib/vagrant/config/nfs.rb +10 -0
  68. data/lib/vagrant/config/package.rb +9 -0
  69. data/lib/vagrant/config/ssh.rb +28 -0
  70. data/lib/vagrant/config/vagrant.rb +21 -0
  71. data/lib/vagrant/config/vm.rb +111 -0
  72. data/lib/vagrant/data_store.rb +68 -0
  73. data/lib/vagrant/downloaders/file.rb +3 -3
  74. data/lib/vagrant/downloaders/http.rb +5 -5
  75. data/lib/vagrant/environment.rb +246 -243
  76. data/lib/vagrant/errors.rb +306 -0
  77. data/lib/vagrant/hosts/base.rb +1 -1
  78. data/lib/vagrant/hosts/bsd.rb +3 -9
  79. data/lib/vagrant/hosts/linux.rb +3 -9
  80. data/lib/vagrant/plugin.rb +50 -0
  81. data/lib/vagrant/provisioners/base.rb +0 -6
  82. data/lib/vagrant/provisioners/chef.rb +63 -58
  83. data/lib/vagrant/provisioners/chef_server.rb +9 -11
  84. data/lib/vagrant/provisioners/chef_solo.rb +2 -2
  85. data/lib/vagrant/ssh.rb +34 -37
  86. data/lib/vagrant/systems/base.rb +0 -13
  87. data/lib/vagrant/systems/linux.rb +10 -33
  88. data/lib/vagrant/systems/solaris.rb +59 -0
  89. data/lib/vagrant/test_helpers.rb +109 -0
  90. data/lib/vagrant/ui.rb +65 -0
  91. data/lib/vagrant/util.rb +9 -19
  92. data/lib/vagrant/util/glob_loader.rb +19 -17
  93. data/lib/vagrant/util/hash_with_indifferent_access.rb +63 -0
  94. data/lib/vagrant/util/plain_logger.rb +2 -0
  95. data/lib/vagrant/util/platform.rb +2 -0
  96. data/lib/vagrant/util/resource_logger.rb +5 -70
  97. data/lib/vagrant/util/retryable.rb +25 -0
  98. data/lib/vagrant/util/template_renderer.rb +1 -1
  99. data/lib/vagrant/version.rb +1 -1
  100. data/lib/vagrant/vm.rb +27 -13
  101. data/templates/commands/init/Vagrantfile.erb +13 -0
  102. data/templates/config/validation_failed.erb +7 -0
  103. data/templates/locales/en.yml +402 -0
  104. data/templates/package_Vagrantfile.erb +1 -1
  105. data/test/locales/en.yml +8 -0
  106. data/test/test_helper.rb +19 -103
  107. data/test/vagrant/action/box/destroy_test.rb +7 -19
  108. data/test/vagrant/action/box/download_test.rb +9 -25
  109. data/test/vagrant/action/box/package_test.rb +2 -2
  110. data/test/vagrant/action/box/unpackage_test.rb +8 -34
  111. data/test/vagrant/action/box/verify_test.rb +10 -19
  112. data/test/vagrant/action/builder_test.rb +0 -15
  113. data/test/vagrant/action/env/set_test.rb +1 -1
  114. data/test/vagrant/action/environment_test.rb +8 -26
  115. data/test/vagrant/action/general/package_test.rb +53 -53
  116. data/test/vagrant/action/vm/boot_test.rb +5 -22
  117. data/test/vagrant/action/vm/check_box_test.rb +35 -25
  118. data/test/vagrant/action/vm/clean_machine_folder_test.rb +1 -1
  119. data/test/vagrant/action/vm/clear_forwarded_ports_test.rb +1 -1
  120. data/test/vagrant/action/vm/clear_nfs_exports_test.rb +1 -1
  121. data/test/vagrant/action/vm/clear_shared_folders_test.rb +1 -1
  122. data/test/vagrant/action/vm/customize_test.rb +2 -1
  123. data/test/vagrant/action/vm/destroy_test.rb +1 -2
  124. data/test/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +1 -1
  125. data/test/vagrant/action/vm/disable_networks_test.rb +10 -1
  126. data/test/vagrant/action/vm/discard_state_test.rb +10 -1
  127. data/test/vagrant/action/vm/export_test.rb +9 -37
  128. data/test/vagrant/action/vm/forward_ports_helpers_test.rb +2 -2
  129. data/test/vagrant/action/vm/forward_ports_test.rb +19 -16
  130. data/test/vagrant/action/vm/halt_test.rb +11 -1
  131. data/test/vagrant/action/vm/import_test.rb +37 -21
  132. data/test/vagrant/action/vm/match_mac_address_test.rb +1 -1
  133. data/test/vagrant/action/vm/network_test.rb +8 -7
  134. data/test/vagrant/action/vm/nfs_helpers_test.rb +6 -3
  135. data/test/vagrant/action/vm/nfs_test.rb +20 -45
  136. data/test/vagrant/action/vm/package_test.rb +1 -1
  137. data/test/vagrant/action/vm/package_vagrantfile_test.rb +1 -1
  138. data/test/vagrant/action/vm/provision_test.rb +10 -17
  139. data/test/vagrant/action/vm/resume_test.rb +1 -1
  140. data/test/vagrant/action/vm/share_folders_test.rb +25 -106
  141. data/test/vagrant/action/vm/suspend_test.rb +1 -1
  142. data/test/vagrant/action/warden_test.rb +105 -0
  143. data/test/vagrant/action_test.rb +5 -27
  144. data/test/vagrant/box_collection_test.rb +44 -0
  145. data/test/vagrant/box_test.rb +5 -105
  146. data/test/vagrant/cli_test.rb +35 -0
  147. data/test/vagrant/command/base_test.rb +23 -0
  148. data/test/vagrant/command/group_base_test.rb +15 -0
  149. data/test/vagrant/command/helpers_test.rb +88 -0
  150. data/test/vagrant/config/base_test.rb +52 -0
  151. data/test/vagrant/config/error_recorder_test.rb +18 -0
  152. data/test/vagrant/config/ssh_test.rb +12 -0
  153. data/test/vagrant/config/vagrant_test.rb +11 -0
  154. data/test/vagrant/config/vm_test.rb +70 -0
  155. data/test/vagrant/config_test.rb +113 -206
  156. data/test/vagrant/data_store_test.rb +68 -0
  157. data/test/vagrant/downloaders/base_test.rb +1 -1
  158. data/test/vagrant/downloaders/file_test.rb +4 -3
  159. data/test/vagrant/downloaders/http_test.rb +14 -4
  160. data/test/vagrant/environment_test.rb +290 -590
  161. data/test/vagrant/errors_test.rb +42 -0
  162. data/test/vagrant/hosts/base_test.rb +1 -1
  163. data/test/vagrant/hosts/bsd_test.rb +3 -6
  164. data/test/vagrant/hosts/linux_test.rb +3 -5
  165. data/test/vagrant/plugin_test.rb +9 -0
  166. data/test/vagrant/provisioners/base_test.rb +1 -1
  167. data/test/vagrant/provisioners/chef_server_test.rb +31 -35
  168. data/test/vagrant/provisioners/chef_solo_test.rb +1 -1
  169. data/test/vagrant/provisioners/chef_test.rb +7 -7
  170. data/test/vagrant/ssh_session_test.rb +3 -10
  171. data/test/vagrant/ssh_test.rb +25 -33
  172. data/test/vagrant/systems/linux_test.rb +6 -71
  173. data/test/vagrant/ui_test.rb +29 -0
  174. data/test/vagrant/util/hash_with_indifferent_access_test.rb +39 -0
  175. data/test/vagrant/util/resource_logger_test.rb +14 -81
  176. data/test/vagrant/util/retryable_test.rb +38 -0
  177. data/test/vagrant/util/template_renderer_test.rb +4 -4
  178. data/test/vagrant/vm_test.rb +47 -26
  179. data/vagrant.gemspec +14 -12
  180. metadata +142 -108
  181. data/bin/.gitignore +0 -0
  182. data/lib/vagrant/action/action_exception.rb +0 -16
  183. data/lib/vagrant/action/env/error_halt.rb +0 -16
  184. data/lib/vagrant/action/exception_catcher.rb +0 -14
  185. data/lib/vagrant/action/vm/persist.rb +0 -22
  186. data/lib/vagrant/active_list.rb +0 -83
  187. data/lib/vagrant/command.rb +0 -27
  188. data/lib/vagrant/commands/base.rb +0 -181
  189. data/lib/vagrant/commands/box.rb +0 -16
  190. data/lib/vagrant/commands/box/add.rb +0 -30
  191. data/lib/vagrant/commands/box/list.rb +0 -30
  192. data/lib/vagrant/commands/box/remove.rb +0 -30
  193. data/lib/vagrant/commands/box/repackage.rb +0 -35
  194. data/lib/vagrant/commands/destroy.rb +0 -37
  195. data/lib/vagrant/commands/halt.rb +0 -43
  196. data/lib/vagrant/commands/init.rb +0 -36
  197. data/lib/vagrant/commands/package.rb +0 -81
  198. data/lib/vagrant/commands/provision.rb +0 -31
  199. data/lib/vagrant/commands/reload.rb +0 -36
  200. data/lib/vagrant/commands/resume.rb +0 -35
  201. data/lib/vagrant/commands/ssh.rb +0 -78
  202. data/lib/vagrant/commands/ssh_config.rb +0 -45
  203. data/lib/vagrant/commands/status.rb +0 -125
  204. data/lib/vagrant/commands/suspend.rb +0 -36
  205. data/lib/vagrant/commands/up.rb +0 -44
  206. data/lib/vagrant/exceptions/uncallable_action.rb +0 -17
  207. data/lib/vagrant/util/translator.rb +0 -35
  208. data/templates/strings.yml +0 -341
  209. data/templates/unison/crontab_entry.erb +0 -1
  210. data/templates/unison/script.erb +0 -71
  211. data/test/vagrant/action/env/error_halt_test.rb +0 -21
  212. data/test/vagrant/action/exception_catcher_test.rb +0 -30
  213. data/test/vagrant/action/vm/persist_test.rb +0 -50
  214. data/test/vagrant/active_list_test.rb +0 -173
  215. data/test/vagrant/command_test.rb +0 -53
  216. data/test/vagrant/commands/base_test.rb +0 -139
  217. data/test/vagrant/commands/box/add_test.rb +0 -34
  218. data/test/vagrant/commands/box/list_test.rb +0 -32
  219. data/test/vagrant/commands/box/remove_test.rb +0 -41
  220. data/test/vagrant/commands/box/repackage_test.rb +0 -52
  221. data/test/vagrant/commands/destroy_test.rb +0 -44
  222. data/test/vagrant/commands/halt_test.rb +0 -50
  223. data/test/vagrant/commands/init_test.rb +0 -71
  224. data/test/vagrant/commands/package_test.rb +0 -97
  225. data/test/vagrant/commands/provision_test.rb +0 -60
  226. data/test/vagrant/commands/reload_test.rb +0 -47
  227. data/test/vagrant/commands/resume_test.rb +0 -44
  228. data/test/vagrant/commands/ssh_config_test.rb +0 -77
  229. data/test/vagrant/commands/ssh_test.rb +0 -129
  230. data/test/vagrant/commands/status_test.rb +0 -40
  231. data/test/vagrant/commands/suspend_test.rb +0 -44
  232. data/test/vagrant/commands/up_test.rb +0 -49
  233. data/test/vagrant/util/translator_test.rb +0 -61
  234. data/test/vagrant/util_test.rb +0 -27
@@ -1,45 +0,0 @@
1
- module Vagrant
2
- class Commands
3
- # Outputs a valid entry for .ssh/config which can be used to connect
4
- # to this environment.
5
- class SSHConfig < Base
6
- Base.subcommand "ssh-config", self
7
- description "outputs .ssh/config valid syntax for connecting to this environment via ssh"
8
-
9
- def execute(args=[])
10
- env.require_root_path
11
-
12
- args = parse_options(args)
13
- show_single(args[0])
14
- end
15
-
16
- def show_single(name)
17
- if name.nil? && env.multivm?
18
- error_and_exit(:ssh_config_multivm)
19
- return # for tests
20
- end
21
-
22
- vm = name.nil? ? env.vms.values.first : env.vms[name.to_sym]
23
- if vm.nil?
24
- error_and_exit(:unknown_vm, :vm => name)
25
- return # for tests
26
- end
27
-
28
- puts TemplateRenderer.render("ssh_config", {
29
- :host_key => options[:host] || "vagrant",
30
- :ssh_user => vm.env.config.ssh.username,
31
- :ssh_port => vm.ssh.port,
32
- :private_key_path => vm.env.config.ssh.private_key_path
33
- })
34
- end
35
-
36
- def options_spec(opts)
37
- opts.banner = "Usage: vagrant ssh-config [--host NAME]"
38
-
39
- opts.on("-h", "--host [HOST]", "Host name for the SSH config") do |h|
40
- options[:host] = h
41
- end
42
- end
43
- end
44
- end
45
- end
@@ -1,125 +0,0 @@
1
- module Vagrant
2
- class Commands
3
- # Outputs the status of the current environment. This command outputs
4
- # useful information such as whether or not the environment is created
5
- # and if its running, suspended, etc.
6
- class Status < Base
7
- Base.subcommand "status", self
8
- description "Shows the status of the Vagrant environment."
9
-
10
- def execute(args=[])
11
- args = parse_options(args)
12
- if args.length > 1
13
- # There should never be more than 1 arg
14
- show_help
15
- return
16
- end
17
-
18
- if !options[:global]
19
- show_local_status(*args)
20
- else
21
- show_global_status
22
- end
23
- end
24
-
25
- # Shows the status of the CURRENT environment (the current working
26
- # directory). If a specific VM was given, it will print out
27
- # detailed information regarding that VM. If no single VM was
28
- # specified and it is a multi-VM environment, it will simply
29
- # show a listing of all the VMs and their short one word
30
- # statuses.
31
- def show_local_status(vm=nil)
32
- if !env.root_path
33
- wrap_output { puts Translator.t(:status_no_environment) }
34
- return
35
- end
36
-
37
- if vm.nil?
38
- if env.multivm?
39
- # No specific VM was specified in a multi-vm environment,
40
- # so show short info for each VM
41
- show_list
42
- return
43
- else
44
- # Set the VM to just be the root VM
45
- vm = env.vms.values.first
46
- end
47
- else
48
- # Try to get the vm based on the name. If the specified VM
49
- # doesn't exist, then error saying so
50
- vm = env.vms[vm.to_sym] || error_and_exit(:unknown_vm, :vm => vm)
51
- end
52
-
53
- show_single(vm)
54
- end
55
-
56
- # Lists the available VMs and brief statuses about each.
57
- def show_list
58
- wrap_output do
59
- puts Translator.t(:status_listing)
60
- puts ""
61
-
62
- env.vms.each do |name, vm|
63
- state = vm.created? ? vm.vm.state : "not created"
64
- puts "#{name.to_s.ljust(30)}#{state}"
65
- end
66
- end
67
- end
68
-
69
- # Shows a paragraph of information based on the current state of
70
- # a single, specified VM.
71
- def show_single(vm)
72
- string_key = nil
73
-
74
- if !vm.created?
75
- string_key = :status_not_created
76
- else
77
- additional_key = nil
78
- if vm.vm.running?
79
- additional_key = :status_created_running
80
- elsif vm.vm.saved?
81
- additional_key = :status_created_saved
82
- elsif vm.vm.powered_off?
83
- additional_key = :status_created_powered_off
84
- end
85
-
86
- string_key = [:status_created, {
87
- :vm_state => vm.vm.state,
88
- :additional_message => additional_key ? Translator.t(additional_key) : ""
89
- }]
90
- end
91
-
92
- wrap_output { puts Translator.t(*string_key) }
93
- end
94
-
95
- # Shows the status of the GLOBAL Vagrant environment. This prints out
96
- # a listing of the virtual machines which Vagrant manages (running or
97
- # not).
98
- def show_global_status
99
- entries = []
100
-
101
- env.active_list.list.each do |uuid, data|
102
- vm = Vagrant::VM.find(uuid, env)
103
- entries << Translator.t(:status_global_entry, {
104
- :vm => vm,
105
- :data => data
106
- })
107
- end
108
-
109
- wrap_output { puts Translator.t(:status_global, :entries => entries) }
110
- end
111
-
112
- def options_spec(opts)
113
- opts.banner = "Usage: vagrant status [--global]"
114
-
115
- # Defaults
116
- options[:global] = false
117
- options[:vm] = nil
118
-
119
- opts.on("-g", "--global", "Show global status of Vagrant (running VMs managed by Vagrant)") do |v|
120
- options[:global] = true
121
- end
122
- end
123
- end
124
- end
125
- end
@@ -1,36 +0,0 @@
1
- module Vagrant
2
- class Commands
3
- # Suspend a running vagrant instance. This suspends the instance, saving
4
- # the state of the VM and "pausing" it. The instance can be resumed
5
- # again with {resume}.
6
- #
7
- # This command requires that an instance already be brought up with
8
- # `vagrant up`.
9
- class Suspend < Base
10
- Base.subcommand "suspend", self
11
- description "Suspends the currently running vagrant environment"
12
-
13
- def execute(args=[])
14
- all_or_single(args, :suspend)
15
- end
16
-
17
- def suspend_single(name)
18
- vm = env.vms[name.to_sym]
19
- if vm.nil?
20
- error_and_exit(:unknown_vm, :vm => name)
21
- return # for tests
22
- end
23
-
24
- if vm.created?
25
- vm.suspend
26
- else
27
- vm.env.logger.info "VM '#{name}' not created. Ignoring."
28
- end
29
- end
30
-
31
- def options_spec(opts)
32
- opts.banner = "Usage: vagrant suspend"
33
- end
34
- end
35
- end
36
- end
@@ -1,44 +0,0 @@
1
- module Vagrant
2
- class Commands
3
- # Bring up a vagrant instance. This handles everything from importing
4
- # the base VM, setting up shared folders, forwarded ports, etc to
5
- # provisioning the instance with chef. {up} also starts the instance,
6
- # running it in the background.
7
- class Up < Base
8
- Base.subcommand "up", self
9
- description "Creates the vagrant environment"
10
-
11
- def execute(args=[])
12
- env.require_root_path
13
- all_or_single(args, :up)
14
- end
15
-
16
- def up_single(name)
17
- vm = env.vms[name.to_sym]
18
- if vm.nil?
19
- error_and_exit(:unknown_vm, :vm => name)
20
- return # for tests
21
- end
22
-
23
- if vm.created?
24
- vm.env.logger.info "VM '#{name}' already created. Booting if its not already running..."
25
- vm.start
26
- else
27
- vm.env.logger.info "Creating VM '#{name}'"
28
- vm.up
29
- end
30
- end
31
-
32
- def options_spec(opts)
33
- opts.banner = "Usage: vagrant up [--no-provision]"
34
-
35
- # Defaults
36
- options[:provision] = true
37
-
38
- opts.on("--no-provision", "Do not provision during this up.") do |v|
39
- options[:provision] = false
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,17 +0,0 @@
1
- module Vagrant
2
- module Exceptions
3
- # Raised when an action sequence is trying to be run for an uncallable
4
- # action (not a lambda, middleware, or registered sequence).
5
- class UncallableAction < ::Exception
6
- def initialize(callable)
7
- super()
8
-
9
- @callable = callable
10
- end
11
-
12
- def to_s
13
- @callable.inspect
14
- end
15
- end
16
- end
17
- end
@@ -1,35 +0,0 @@
1
- require 'yaml'
2
-
3
- module Vagrant
4
- module Util
5
- # This class is responsible for reading static messages from the strings.yml file.
6
- class Translator
7
- @@strings = nil
8
-
9
- class << self
10
- # Resets the internal strings hash to nil, forcing a reload on the next
11
- # access of {strings}.
12
- def reset!
13
- @@strings = nil
14
- end
15
-
16
- # Returns the hash of strings from the error YML files. This only loads once,
17
- # then returns a cached value until {reset!} is called.
18
- #
19
- # @return [Hash]
20
- def strings
21
- @@strings ||= YAML.load_file(File.join(PROJECT_ROOT, "templates", "strings.yml"))
22
- end
23
-
24
- # Renders the string with the given key and data parameters and returns
25
- # the rendered result.
26
- #
27
- # @return [String]
28
- def t(key, data = {})
29
- template = strings[key] || "Unknown strings key: #{key}"
30
- TemplateRenderer.render_string(template, data)
31
- end
32
- end
33
- end
34
- end
35
- end
@@ -1,341 +0,0 @@
1
- # Using YAMLs Block Literals to preserve new lines
2
- # http://en.wikipedia.org/wiki/YAML#Newlines_preserved
3
- # In short, | means keep new lines, trim whitespace left and right
4
- # The |- does the above, but trims the new line at the end of all text
5
-
6
- #---------------------------------------------------------------------
7
- # CATEGORY: Status Messages
8
- #---------------------------------------------------------------------
9
- :status_listing: |-
10
- This environment represents multiple VMs. The VMs will be listed
11
- below with a short status. For more detailed information about a
12
- VM, run `vagrant status NAME`.
13
- :status_no_environment: |-
14
- No vagrant environment detected. Run `vagrant init` to setup a Vagrantfile
15
- in the current directory to get started with Vagrant.
16
- :status_not_created: |-
17
- The environment has not yet been created. Run `vagrant up` to create the
18
- environment.
19
- :status_created: |-
20
- The environment has been created. The status of the current environment's
21
- virtual machine is: "<%= vm_state %>"
22
-
23
- <%= additional_message %>
24
- :status_created_running: |-
25
- To stop this VM, you can run `vagrant halt` to shut it down forcefully,
26
- or you can run `vagrant suspend` to simply suspend the virtual machine.
27
- In either case, to restart it again, simply run a `vagrant up`.
28
- :status_created_saved: |-
29
- To resume this VM, simply run `vagrant up`.
30
- :status_created_powered_off: |-
31
- To restart this VM, simply run `vagrant up`.
32
- :status_global: |-
33
- Below is a list of virtual machines which are currently created and were
34
- created by a Vagrant environment. The path listed was the "last known path"
35
- of the environment (it may have moved).
36
-
37
- <%= entries.join("\n\n") %>
38
- :status_global_entry: |-
39
- Name: <%= vm.vm.name %>
40
- Path: <%= data["path"] %>
41
- Created at: <%= Time.at(data["created_at"]) %>
42
-
43
- #---------------------------------------------------------------------
44
- # CATEGORY: Warning Messages
45
- #---------------------------------------------------------------------
46
- :vm_additions_not_detected: |-
47
- WARNING!
48
- No guest additions were detected on the base box for this VM! Guest
49
- additions are required for forwarded ports, shared folders, host only
50
- networking, and more. If SSH fails on this machine, please install
51
- the guest additions and repackage the box to continue.
52
- :vm_additions_version_mismatch: |-
53
- WARNING!
54
- The guest additions on this VM do not match the install version of
55
- VirtualBox! This often causes things such as forwared ports, shared
56
- folders, and more to not work properly. If any of those things fail on
57
- this machine, please update the guest additions and repackage the
58
- box.
59
-
60
- Guest Additions Version: <%= guest_additions_version %>
61
- VirtualBox Version: <%= virtualbox_version %>
62
-
63
- #---------------------------------------------------------------------
64
- # CATEGORY: Error Messages
65
- #---------------------------------------------------------------------
66
- :box_already_exists: |-
67
- This box appears to already exist! Please call `vagrant box remove <%= box_name %>`
68
- and then try to add it again.
69
- :box_add_already_exists: |-
70
- A box with the name '<%= box_name %>' already exists, please use another name or use `vagrant box remove <%= box_name %>`
71
- :box_download_unknown_type: |-
72
- Unknown URI type for box download.
73
- :box_download_http_socket_error: |-
74
- An error occurred while trying to download the specified box. This most
75
- often happens if there is no internet connection or the address is
76
- invalid.
77
-
78
- Box URL: <%= box_url %>
79
- :box_file_exists: |-
80
- The specified output file for packaging already exists. Please move
81
- the file or modify the output filename parameter then try to package
82
- again.
83
-
84
- Specified output file: <%= output_file %>
85
- :box_remove_doesnt_exist: |-
86
- The box you're attempting to remove does not exist!
87
- :box_repackage_doesnt_exist: |-
88
- The box you're attempting to repackage does not exist. Please check the
89
- name you specified and try again. As a reminder, the repackage
90
- command is for repackaging boxes which have been added through `vagrant box add`
91
- but the box has been lost.
92
- :box_specified_doesnt_exist: |-
93
- Specified box `<%= box_name %>` does not exist!
94
-
95
- The box must be added through the `vagrant box add` command. Please view
96
- the documentation associated with the command for more information.
97
- :box_verification_failed: |-
98
- The specified box is invalid. This can commonly be attributed to incorrectly
99
- typing in the path to the box or invalid packaging of the box.
100
- :box_not_specified: |-
101
- No base box was specified! A base box is required as a staring point
102
- for every vagrant virtual machine. Please specify one in your Vagrantfile
103
- using `config.vm.box`
104
- :chef_base_invalid_provisioner: |-
105
- Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or ChefServer instead.
106
- :chef_server_url_required: |-
107
- Chef server provisioning requires that the `config.chef.chef_server_url` be set to the
108
- URL of your chef server. Examples include "http://12.12.12.12:4000" and
109
- "http://myserver.com:4000" (the port of course can be different, but 4000 is the default)
110
- :chef_server_validation_key_required: |-
111
- Chef server provisioning requires that the `config.chef.validation_key_path` configuration
112
- be set to a path on your local machine of the validation key used to register the
113
- VM with the chef server.
114
- :chef_server_validation_key_doesnt_exist: |-
115
- The validation key set for `config.chef.validation_key_path` does not exist! This
116
- file needs to exist so it can be uploaded to the virtual machine. It is
117
- currently set to "<%= Vagrant.config.chef.validation_key_path %>"
118
- :chef_not_detected: |-
119
- The `<%= binary %>` binary appears to not be in the PATH of the guest. This
120
- could be because the PATH is not properly setup or perhaps chef is not
121
- installed on this guest. Chef provisioning can not continue without
122
- chef properly installed.
123
- :command_box_invalid: |-
124
- Please specify a valid action to take on the boxes, either
125
- `add` or `remove`. Examples:
126
-
127
- vagrant box add name uri
128
- vagrant box remove name
129
- vagrant box list
130
- :dotfile_error: |-
131
- The dotfile which Vagrant uses to store the UUID of the project's
132
- virtual machine already exists and is not a file! The dotfile is
133
- currently configured to be `<%= env.dotfile_path %>`
134
-
135
- To change this value, please see `config.vagrant.dotfile_name`
136
-
137
- Are you trying to use Vagrant from your home directory? This is the
138
- leading cause of this error message. To resolve this, simply use a
139
- different directory. Or, if you really want to run Vagrant from your
140
- home directory, modify the `config.vagrant.dotfile_name` configuration
141
- key.
142
- :downloader_file_doesnt_exist: |-
143
- The given box does not exist on the file system:
144
-
145
- <%= source_url %>
146
- :environment_not_created: |-
147
- The task you're trying to run requires that the vagrant environment
148
- already be created, but unfortunately this vagrant still appears to
149
- have no box! You can setup the environment by setting up your
150
- <%= Vagrant::Environment::ROOTFILE_NAME %> and running `vagrant up`
151
- :nfs_host_required: |-
152
- A host class is required for NFS shared folders. By default, these
153
- are auto-detected, but can be overriden with `config.vagrant.host`.
154
- There is currently not host class loaded.
155
- :nfs_not_supported: |-
156
- The host class is reporting that NFS is not supported by this host,
157
- or `nfsd` may not be installed. Please verify that `nfsd` is installed
158
- on your machine, and retry.
159
- :nfs_no_host_network: |-
160
- NFS shared folders requires that host only networking is enabled.
161
- Please enable host only networking via `config.vm.network`.
162
- :network_not_found: |-
163
- The specified host network could not be found: <%= name %>.
164
- If the name specification is removed, Vagrant will create a new
165
- host only network for you. Alternatively, please create the
166
- specified network manually.
167
- :network_collides: |-
168
- The specified host network collides with a non-hostonly network!
169
- This will cause your specified IP to be inaccessible. Please change
170
- the IP or name of your host only network to not match that of
171
- a bridged or non-hostonly network.
172
- :package_include_file_doesnt_exist: |-
173
- File specified to include: '<%= filename %>' does not exist!
174
- :package_multivm: |-
175
- Because this Vagrant environment represents multiple VMs, a
176
- specific VM must be specified. This can be done by calling
177
- `vagrant package NAME` where NAME is a valid VM represented by
178
- your Vagrantfile.
179
- :package_output_exists: |-
180
- The specified file to save the package as already exists. Please
181
- remove this file or specify a different filename for outputting.
182
- :package_requires_directory: |-
183
- A directory was not specified to package. This is an internal
184
- issue. Please send the relevant stack trace (if any) and information
185
- about this issue to the Vagrant team.
186
- :package_requires_export: |-
187
- Package must be used in conjunction with export.
188
- :provisioner_invalid_class: |-
189
- Provisioners must be an instance of Vagrant::Provisioners::Base
190
- :provisioner_unknown_type: |-
191
- Unknown provisioner type: <%= provisioner %>
192
- :rootfile_already_exists: |-
193
- It looks like this directory is already setup for vagrant! (A <%= Vagrant::Environment::ROOTFILE_NAME %>
194
- already exists.)
195
- :rootfile_not_found: |-
196
- A `<%= Vagrant::Environment::ROOTFILE_NAME %>` was not found! This file is required for vagrant to run
197
- since it describes the expected environment that vagrant is supposed
198
- to manage. Please create a `<%= Vagrant::Environment::ROOTFILE_NAME %>` and place it in your project
199
- root.
200
- :ssh_bad_permissions: |-
201
- The private key to connect to this box via SSH has invalid permissions
202
- set on it. The permissions of the private key should be set to 0600, otherwise SSH will
203
- ignore the key. Vagrant tried to do this automatically for you but failed. Please set the
204
- permissions on the following file to 0600 and then try running this command again:
205
-
206
- <%= key_path %>
207
- :ssh_bad_exit_status: |-
208
- The following SSH command responded with a non-zero exit status.
209
- Vagrant assumes that this means the command failed!
210
-
211
- <%= command %>
212
- :ssh_unavailable_windows: |-
213
- `vagrant ssh` isn't available on the Windows platform. The
214
- vagrant.ppk file is available at
215
-
216
- <%= key_path %>.ppk
217
-
218
- for use with Putty. To do this create a new Putty session for
219
- `vagrant@localhost` on port `<%= ssh_port %>`, in the Connection>SSH>Auth
220
- configuration section navigate to the vagrant.ppk file,
221
- select it, save the session for later use, and connect.
222
-
223
- For a more detailed guide please consult:
224
-
225
- http://vagrantup.com/docs/getting-started/windows.html
226
- :ssh_multivm: |-
227
- Because this Vagrant environment represents multiple VMs, a
228
- specific VM must be specified. This can be done by calling
229
- `vagrant ssh NAME` where NAME is a valid VM represented by
230
- your Vagrantfile.
231
-
232
- Alternatively, if you mark one of your VMs as 'primary,'
233
- then Vagrant will default to that VM. This can be done by
234
- specifying `:primary => true` when defining the VM. Example:
235
-
236
- config.vm.define(:foo, :primary => true) do |config|
237
- ...
238
- end
239
- :ssh_config_multivm: |-
240
- Because this Vagrant environment represents multiple VMs, a
241
- specific VM must be specified. This can be done by calling
242
- `vagrant ssh-config NAME` where NAME is a valid VM represented by
243
- your Vagrantfile.
244
- :system_invalid_class: |-
245
- The specified system does not inherit from `Vagrant::Systems::Base`. The
246
- specified system class must inherit from this class.
247
-
248
- The specified system class was: <%= system %>
249
- :system_unknown_type: |-
250
- The specified system type is unknown: <%= system %>. Please change this
251
- to a proper value.
252
- :system_unspecified: |-
253
- A VM system type must be specified! This is done via the `config.vm.system`
254
- configuration value. Please read the documentation online for more information.
255
- :unison_not_found: |-
256
- The `unison` binary was not found on the guest machine. This is required
257
- for folder syncing via unison. Please install unison on your system to
258
- use folder syncing. You may also disable folder syncing, install unison,
259
- re-enable syncing, then call a `vagrant reload` to enable syncing.
260
- :unknown_vm: |-
261
- The specified VM could not be found: <%= vm %>
262
- :virtualbox_import_failure: |-
263
- The VM import failed! Try running `VBoxManage import` on the box file
264
- manually for more verbose error output.
265
- :virtualbox_invalid_version: |-
266
- Vagrant has detected that you have VirtualBox version <%= version %> installed!
267
- Vagrant requires that you use at least VirtualBox version 3.2. Please install
268
- a more recent version of VirtualBox to continue.
269
- :virtualbox_not_detected: |-
270
- Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
271
- If VirtualBox is installed, it may be an incorrect version. Vagrant currently
272
- requires VirtualBox 3.2.x. Please install the proper version to continue.
273
- :virtualbox_invalid_ose: |-
274
- Vagrant has detected you're using an OSE ("Open Source Edition") of VirtualBox.
275
- Vagrant currently doesn't support any of the OSE editions due to slight API
276
- differences. Please download the regular package from virtualbox.org and install
277
- to continue.
278
- :vm_failed_to_boot: |-
279
- Failed to connect to VM! Failed to boot?
280
- :vm_base_not_found: |-
281
- The specified base VM "<%= name %>" was not found.
282
- :vm_not_running_for_suspend: |-
283
- The vagrant virtual environment you are trying to suspend must be running to be suspended.
284
- :vm_not_suspended: |-
285
- The vagrant virtual environment you are trying to resume is not in a suspended state.
286
- :vm_port_auto_empty: |-
287
- Vagrant found a port collision for the specified port and virtual machine.
288
- While this port was marked to be auto-corrected, the ports in the
289
- auto-correction range are all also used.
290
-
291
- VM: <%= vm_name %>
292
- Forwarded port: <%= name %> (<%= options[:guestport] %> => <%= options[:hostport] %>)
293
- :vm_port_below_threshold: |-
294
- The host port of all forwarded ports must be above 1024. VirtualBox
295
- does not allow host ports to be below 1024. (Guest ports below 1024
296
- are fine. For example: SSH on port 22 on the guest can be forwarded
297
- to port 2222, but not 222).
298
- :vm_port_collision: |-
299
- Vagrant cannot forward the specified ports on this VM, since they
300
- would collide with another VirtualBox virtual machine's forwarded
301
- ports! The "<%= name %>" forwarded port (<%= hostport %>) is already in use on the host
302
- machine.
303
-
304
- To fix this, modify your current projects Vagrantfile to use another
305
- port. Example, where '1234' would be replaced by a unique host port:
306
-
307
- config.vm.forward_port("<%= name %>", <%= guestport %>, 1234)
308
- :vm_power_off_to_move_hd: |-
309
- The virtual machine must be powered off to move its disk.
310
- :vm_power_off_to_package: |-
311
- The vagrant virtual environment you are trying to package must be powered off.
312
- :vm_mount_fail: |-
313
- Failed to mount shared folders. vboxsf was not available.
314
- :vm_ssh_auth_failed: |-
315
- SSH authentication failed! While this could be due to a variety of reasons,
316
- the two most common are: private key path is incorrect or you're using a box
317
- which was built for Vagrant 0.1.x.
318
-
319
- Vagrant 0.2.x dropped support for password-based authentication. If you're
320
- tring to `vagrant up` a box which does not support Vagrant's private/public
321
- keypair, then this error will be raised. To resolve this, read the guide
322
- on converting base boxes from password-based to keypairs here:
323
-
324
- http://vagrantup.com/docs/converting_password_to_key_ssh.html
325
-
326
- If the box was built for 0.2.x and contains a custom public key, perhaps
327
- the path to the private key is incorrect. Check your `config.ssh.private_key_path`.
328
-
329
- #---------------------------------------------------------------------
330
- # CATEGORY: Error Messages for Linux System
331
- #---------------------------------------------------------------------
332
- :network_not_debian: |-
333
- Host only networking is only supported for Debian/Ubuntu by the built-in
334
- "Linux" system. If you're using some other distro and want to implement
335
- host only networking, please subclass the `Vagrant::Systems::Linux` class
336
- and implement the `prepare_host_only_network` and `enable_host_only_network`
337
- methods.
338
-
339
- Otherwise, please report your distro and how to modify network interfaces
340
- to the Vagrant mailing list or IRC and we'll probably be glad to add it
341
- to the internal systems.