New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chef solo provisioner shouldn't need to download chef client every vagrant up #5903
Comments
Hi @ben-rosio The Chef provisioner should only be installing Chef if Chef is not already installed on the system. Can you please share your Unfortunately Vagrant cannot install Chef without an Internet connection - that's just a limitation of Chef itself (or any package that needs to be installed). You can disable the automatic installation of Chef via: chef.install = false in your Chef solo or Chef client configuration block in the Vagrantfile (see docs for more information on that). If you have Chef pre-installed on the boxes, you can still use the provisioner, but disable the automatic installation. You can also pin to a specific version of Chef to install. |
Hi @ben-rosio Upon further discussion with my team, this is not a bug in Vagrant. As you mentioned, you can use the Vagrant cachier plugin to cache things. We do not have plans to add support for caching into Vagrant core at this time. You might also be interested in this issue: #4989. Thanks! 😄 |
The issue is that Vagrant uses curl to download and install chef client, so there is no way to cache it without the workaround you mentioned (not allowing Vagrant to install chef client, and instead installing it all manually). The output with debug logging is too long, so here is my example Vagrantfile:
And here are the important bits:
Every time I run I was sold on Vagrant because of how easy it was to rebuild a machine, but now I dread rebuilding my vm because I'm not sure if it'll be able to come back up with a spotty internet connection. |
That said Chef's Omnibus install.sh script also doesn't work without an internet connection (even with caching options enabled). I've opened and issue with them to see if this will be resolved. If they decide to resolve that issue I'll post back here with an update, and hopefully Vagrant will then allow the Chef client to be installed without an internet connection. Referenced issue: chef/omnitruck#112 |
With spotty internet having to download the Chef client every time I need to rebuild a vagrant box becomes a real nuisance. I'm able to cache packages via the fantastic Cachier plugin, and it'd be nice if Vagrant cached versions of the Chef client and just copied them to the box before installation.
In fact Vagrant really shouldn't rely on an internet connection at all, if I'm rebuilding a box it should be possible without an internet connection. Vagrant is designed to make offline development easy, but it seems like the program has been consistently more reliant on being connected with unlimited bandwidth and high throughput.
I really hope this trend reverses, an internet connection should be an enhancement, only required when cached information isn't available. It certainly shouldn't keep me from getting any work done, otherwise what's the point of having my server environment local?
The text was updated successfully, but these errors were encountered: