Commit Graph

109 Commits

Author SHA1 Message Date
Dan Carley fec9410814 Omit empty lines in Puppet provisioner output
The sudo() block and/or the Puppet provisioner often returns newline
characters as separate strings. This makes the chomp() ineffective and
results in extraneous spacing between the output lines.

Separate out the call to chomp() so that we only do it once. Then only
output info if that line is not an empty string.
2012-10-30 11:24:10 +00:00
Mitchell Hashimoto 44804ce94b Fix old channel usage on chef client provisioner 2012-10-26 16:39:51 -07:00
Mitchell Hashimoto 625741ab6a Allow hostnames to be subset of box name for Ubuntu 2012-10-12 20:06:54 -07:00
Mitchell Hashimoto 3c0341b7be Disable DNS proxy for 12.10 too 2012-10-12 20:03:25 -07:00
Mitchell Hashimoto 5b4a132fdd Merge pull request #1176 from paulv/master
Fix for DNS resolution bug on Ubuntu 12.10
2012-10-12 20:01:37 -07:00
Mitchell Hashimoto 3d0c82edad Merge pull request #1175 from petere/puppet-exitcodes
Check exit codes of puppet provisioners
2012-10-12 19:56:19 -07:00
Mitchell Hashimoto 544006c16c Whitespace and such 2012-10-12 19:51:25 -07:00
Richard Bullington-McGuire cced762645 Fix Windows shell provisioning
Resolves [GH-1036] [GH-1164] [GH-1181]

Ported fixes from patches to 1-0-stable
2012-10-11 20:33:37 -04:00
Paul Visscher f36ab8a165 Fixes a bug with DNS resolution in Ubuntu 12.10. 2012-10-08 22:12:41 -04:00
Peter Eisentraut 901d3ad23b Check exit codes of puppet provisioners
Previously, failures in applying the puppet manifests would be
ignored, because puppet apply/agent don't have any useful exit codes
by default.  (Errors are printed, but vagrant continues.)

Use the option --detailed-exitcodes of puppet apply/agent to check for
success.
2012-10-08 15:22:30 -04:00
Mitchell Hashimoto c1e99713bd Merge pull request #1146 from piavlo/master
make chef provisioners to write human readable dna.json
2012-09-27 14:01:47 -07:00
Mitchell Hashimoto 88277fa2e0 Merge pull request #1067 from jtimberman/chef-command-args
Add config.arguments for Chef
2012-09-27 13:53:29 -07:00
Mitchell Hashimoto 8cc0504c53 Merge pull request #1118 from hugowetterberg/master
Emitting vagrant-mount events when mounting nfs volumes
2012-09-27 10:44:34 -07:00
Piavlo c2eb523b05 create human readable dna.json 2012-09-20 19:58:37 +03:00
Mitchell Hashimoto 184f6dccb2 Forward port GH-1142 2012-09-18 22:26:51 -07:00
Mitchell Hashimoto f7c231758f Forward Port GH-1140 2012-09-18 22:19:51 -07:00
Mitchell Hashimoto 678c6a070d VirtualBox 4.2 support 2012-09-13 19:11:32 -07:00
Hugo Wetterberg 17a6b64309 Emitting vagrant-mount events when mounting nfs volumes 2012-09-13 09:14:40 +02:00
Dan Midwood bdf72c5554 Use the communicate interface for ArchLinux guests 2012-09-02 18:00:11 +01:00
Mitchell Hashimoto 5691df37a1 Retry SSH on EHOSTUNREACH
This is one of those errors that happens once in awhile that can be
retried.
2012-08-29 13:39:03 -07:00
Mitchell Hashimoto ed1bc58735 Fix shell provisioner to run with new machine abstraction 2012-08-21 16:57:59 -07:00
Mitchell Hashimoto a238e06795 Fix up the chef solo provisioner to work with new machine abstraction 2012-08-21 16:57:17 -07:00
Mitchell Hashimoto f193d69fbc Fix up the debian guest to work with the new machine API 2012-08-20 14:58:58 -07:00
Mitchell Hashimoto 1efee6edcb Use the new communication interface for Ubuntu guest 2012-08-20 12:15:42 -07:00
Mitchell Hashimoto b328e95045 Make puppet provisioner work with latest machine changes.
Specifically it was still reference env[:vm] which is now
`env[:machine]`.
2012-08-20 12:13:04 -07:00
Mitchell Hashimoto 391dc39267 Merge branch 'machine-abstraction'
This branch brings in the "machine abstraction" code. This is a major
milestone in the development of Vagrant as it abstracts all of the
VirtualBox-specific code out into a plugin. There is zero VirtualBox
specific code in the core ("lib/") directory at this point. Read on for
important points.

== Gotchas

White it is technically possible now to write plugins for other
providers, there is still major work to be done to make this feasible.
The plugin interface itself is pretty much done, but there are some
issues:

* ":virtualbox" is the hardcoded provider to be used at the moment.

* There is no way to configure a provider. For example,
  `config.vm.customize` would never work for anything other than
  VirtualBox, so there needs to be a way to have provider-specific
  configuration. This will come soon.

* Shared folders and networking need to be rearchitected to be friendly
  for multiple providers, since it is unrealistic that a provider such as
  EC2 could provide the same level of networking, for example.

* There is no way easy way (like `vagrant package --base`) to create
  boxes for providers other than VirtualBox. This will be addressed in a
  whole new feature of Vagrant probably in a future release after
  provider stuff has shipped.

== Writing a Provider

To write a provider, you create a Vagrant plugin that defines a
"provider". See the "plugins/providers/virtualbox/plugin.rb" for more
details. Providers themselves have an exremely simple API. The burden
for writing providers mostly rests on the fact that you must define
complex middleware sequences.

Lots more work to come in the future, but this is a BIG MILESTONE!
2012-08-19 19:27:09 -07:00
Mitchell Hashimoto ba0e426507 Get vagrant package --base working in some hacky way.
`vagrant package --base` is deprecated for a future feature so I didn't
want to waste any brain cycles on how to do this the "right" way since a
new system will be introduced to do this sort of thing in teh future.
2012-08-19 18:51:36 -07:00
Mitchell Hashimoto 47fe278667 `vagrant box add` works again. Box verification remove temporarily.
The built-in middleware sequences will now be hardcoded onto
Vagrant::Action. Other plugins can hook into these sequences to provide
verification and so on. So the VirtualBox plugin will hook into that
action sequence and add verification.
2012-08-18 16:13:14 -07:00
Mitchell Hashimoto 85a4fb82a8 `vagrant package` a single VM works! 2012-08-15 21:04:37 -07:00
Mitchell Hashimoto b659191a02 `vagrant up`! 2012-08-14 22:38:41 -07:00
Mitchell Hashimoto aaeb060f33 `vagrant provision` 2012-08-14 21:21:31 -07:00
Mitchell Hashimoto 7aa083d259 `vagrant reload` now works with the new machine abstraction 2012-08-14 21:12:41 -07:00
Mitchell Hashimoto 85a499ffb8 Properly handle the case that VM doesn't exist for the VB driver. 2012-08-14 20:27:28 -07:00
Mitchell Hashimoto 0cc63c05e2 `vagrant destroy` fully works 2012-08-13 23:31:12 -07:00
Mitchell Hashimoto 2fc18f7207 `destroy` gets a little farther, and properly halts the VM 2012-08-13 23:18:50 -07:00
Mitchell Hashimoto bca8663742 `vagrant resume` works with the new machine abstraction 2012-08-13 20:03:35 -07:00
Mitchell Hashimoto db11c16b79 ssh_config works with new machine abstraction 2012-08-13 19:48:26 -07:00
Mitchell Hashimoto 83b908f3d8 `vagrant suspend` works with new machine abstraction 2012-08-13 19:30:41 -07:00
Mitchell Hashimoto aad022a626 Switch all `channel` to `communicate` in the linux guest 2012-08-12 19:03:31 -07:00
Mitchell Hashimoto 0eddda3552 Halt works with new machine.
This required some modifications to the linux guest implementation. And
the other guests will have to be modified as well. This is because
`channel` is now `communicate`.
2012-08-12 18:54:52 -07:00
Mitchell Hashimoto f9752d78d8 Properly resolve and load the guest class impl for Machines 2012-08-12 18:35:19 -07:00
Mitchell Hashimoto 7efee573b8 `vagrant ssh -c` now exits with the proper exit code 2012-08-11 20:35:34 -07:00
jtimberman 50e9f83970 Add config.arguments for Chef
* Adds chef.arguments to Chef::Provisioner::Config
* Usable in both chef-client and chef-solo
* Specify as a string, "-L /tmp/foo.log", e.g.
2012-08-10 12:58:43 -06:00
Mitchell Hashimoto 5e70ad0ec2 `vagrant ssh -c` now uses a middleware sequence 2012-08-10 00:57:23 -07:00
Mitchell Hashimoto 64afd578b3 Just always return the SSH communicator for machines for now.
In the future we'll actually find a matching communicator but for now
since we're just focusing on machine abstraction, we just return SSH.
2012-08-08 21:57:08 -07:00
Mitchell Hashimoto 595e7cee0e Move SSH communication to a plugin 2012-08-08 21:48:51 -07:00
Mitchell Hashimoto f1c1dfad2f Some SSH command cleanup 2012-08-07 11:31:55 -07:00
Mitchell Hashimoto e0ec679838 `vagrant ssh` with full console works with new provider.
This works by now calling the `:ssh` action on the provider. This action
is allowed to do whatever it pleases, but should at some point probably
call the `SSHExec` built-in middleware.

The `SSHExec` built-in middleware was added. This uses the information
returned by `Machine#ssh_info` and uses the `Vagrant::Util::SSH` helper
to exec into the remote machine. The provider should do any work upfront
in verifying that the machine is ready to be SSHed into.
2012-08-05 13:45:24 -07:00
Mitchell Hashimoto 9db982f7a4 Expose the provider via the machine object. 2012-08-04 11:16:31 -07:00
Mitchell Hashimoto 002a83d7f7 Update SSH config help to properly reflect "--host" usage. 2012-07-30 11:42:29 -07:00