To use digital ocean as a vagrant provider, I followed instruction here.
But I get this error.
$ vagrant up --provider=degital_ocean
The provider 'degital_ocean' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
This is a result of $ vagrant plugin list
sahara (0.0.16)
vagrant-berkshelf (1.3.7)
vagrant-digitalocean (0.5.3)
vagrant-hostsupdater (0.0.11)
vagrant-omnibus (1.2.1)
What have I missed?
You misspelled "digital". $ vagrant up --provider=digital_ocean
Related
I downloaded and installed Vagrant 2.0.2 on my Mac, successfully provisioned a new virtual machine, however I am not able to share it via vagrant share, due to the following error:
Vagrant failed to initialize at a very early stage:
The plugins failed to load properly. The error message given is
shown below.
uninitialized constant Rails
I tried installing Ruby on Rails, thought that vagrant might need it, still get the same error.
I tried with another plugin, the login one, and got the same error message, so it seems that the problem is related to the plugins.
Here's the list of plugins I currently have installed:
$ vagrant plugin list
login (0.1.1)
- Version Constraint: > 0
share (1.0.1)
- Version Constraint: > 0
$ vagrant -v
Vagrant 2.0.2
I encountered a similar issue after upgrading, specifically as a result of the share plugin.
vagrant login is part of Vagrant core as of 1.7.0 so you shouldn't need it installed as a plugin.
vagrant share was silently removed in 2.0.2 (see https://github.com/hashicorp/vagrant/issues/9485) but it can still be installed manually as vagrant-share.
The following commands should fix your issue:
vagrant plugin uninstall login
vagrant plugin uninstall share
vagrant plugin install vagrant-share
Also note that per docs Vagrant Share via Atlas has been deprecated and it now requires ngrok.
https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html#vagrant-share
https://www.vagrantup.com/docs/share/
I am new to vagrant.
I have installed virtualbox and vagrant(1.7.4) and then follow the book type
$> vagrant plugin install vagrant-cachier
After some minutes,it reported an error:
> vagrant plugin install vagrant-cachier
Installing the 'vagrant-cachier' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing childprocess (0.5.7), and Bundler cannot continue.
Make sure that `gem install childprocess -v '0.5.7'` succeeds before bundling.
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::RemoteFetcher::FetchError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://rubygems.org/gems/childprocess-0.5.7.gem)
I know little about ruby and gem.Is there anything else need to be installed before install plugins?
Or maybe the network issue? (I tried at home and office,the same error)
vagrant works fine that I can init, up and ssh normally.
I ran into the same issue finding it is a matter of gems folder misconfiguration.
I solved it with the following steps:
check where are your gems inside your vagrant installation (e.g. %vagrant_home%/embedded/gems/gems)
check your gem configuration with the command gem environment and looking for the section named GEM PATHS (if gem is not in you path look for it under the vagrant installation folder, e.g. %vagrant_home%/embedded/bin)
if the path at point 1 is not present within the section at point 2, include it with the command export GEM_HOME=/path/to/gems/folder (e.g. export GEM_HOME=%vagrant_home%/embedded/gems/gems)
P.S. %vagrant_home% refers to the vagrant installation base folder, use set instead of export under windows ...and sorry if I mixed unix and windows syntaxes
Test Environment: Vagrant 1.8.1 (gem 2.4.5.1) on Windows 7 behind web proxy
I installed this plugin https://github.com/winnfsd/vagrant-winnfsd and now Vagrant Cachier works like a charm on Windows 10.
To run it on Ubuntu simply install the nfs-server
https://stackoverflow.com/a/52361432/1679541
My vagrant failed when provisioning with template.
template "/var/.s3cfg" do
source "s3cfg.erb"
owner "root"
group "root"
mode "0644"
end
in that cookbook directory, file templates/default/s3cfg.erb exists.
But strangely it's work successfully on opswork amazon, so it might be vagrant, vagrant-cachier, vagrant-berkshelf, berkshelf, or chef error.
Any idea how to check?
My environment:
$: vagrant -v
Vagrant 1.6.5
$: vagrant plugin list
vagrant-berkshelf (3.0.1)
vagrant-cachier (0.9.0)
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.1, system)
$: chef -v
Chef Development Kit Version: 0.2.2
$: berks -v
3.1.5
vagrant box is ubuntu-precise 12.04
Apparently the cause is because chef default location of provisioning path located at /tmp/vagrant-chef. In the middle of the chef execution, somehow the /tmp/ folder cleaned. Hence the missing file.
By changing the location of chef.provisioning_path to other folder than /tmp/, it worked normally.
I've followed the instructions at: http://berkshelf.com/ after installing the latest ChefDK (from here: http://downloads.getchef.com/chef-dk/mac/#/). When I do "vagrant up", I get the error:
Vagrant:
* Unknown configuration section 'omnibus'.
Various posts (e.g. Vagrant Install chef-client on top of base image) have suggested this means that the vagrant-omnibus plugin is not installed. In my case, I have installed it. "vagrant plugin list" displays:
vagrant-berkshelf (2.0.1)
- Version Constraint: 2.0.1
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.1, system)
Any suggestions as to how I can get this example cookbook to run on a new VM instance launched with "vagrant up"?
It turns out the issue for me was that while ~/.vagrant.d/plugins.json included the vagrant-omnibus plugin, the ~/.vagrant.d/gems/gems and ~/.vagrant.d/gems/specifications directories did not contain the appropriate GEM or gemspec files. Not sure how this happened, but I suspect it was due to accidentally typing ^C in the middle of execution of the vagrant plugin install command and then reexecuting that command.
It would appear vagrant plugin install does not do appropriate ^C handling and that it writes the contents of plugins.json before it has stored the gem and gemspec.
Subsequent vagrant plugin install commands don't fix the problem. Manually editing plugins.json to remove the plugin and then reexecuting the vagrant plugin install vagrant-omnibus command fixed the issue.
I personally went inside the vagrant file using VI editor
and commented out the line that has omni bus script
and then run "
vagrant status" and then "vagrant up"
1.vi Vagrant
2.?omnibus
3."insert" I omnibus
4.insert # to comment out the line
5. wq! to come out of vi editor
** this issue can also be related with the type of OS one is using ,i am using a mac
Ok, I'm trying to update chef-client with vagrant omnibus and proxyconf. I figured it would pull the proxy from the proxyconf, but it doesn't look that way. Here is my plugin list:
vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
- Version Constraint: 1.4.1
vagrant-proxyconf (1.3.2)
- Version Constraint: 1.3.2
vagrant-share (1.1.0, system)
and my Vagrant file:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.omnibus.chef_version = :latest
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "my proxy"
config.proxy.https = "my proxy"
end
When i run it with vagrant up, the machine does not have an updated chef-client. I tried using the recipe[omnibus_updater] in my run list it still fails because another recipe is failing with a compile failure (because of the older version of chef-client, what a pain in the butt). Any ideas? Other than creating a new virtual box?
Update:
Running in debug mode doesn't show any errors using :latest. Updating to 11.12.8 gives the below error
vagrant-omnibus:
* '11.12.8' is not a valid version of Chef.
Logging into the vm shows $HTTP_PROXY and $HTTPS_PROXY set properly. Running the commands on the built vm works:
chef-client -v
Chef: 10.14.2
sudo gem update chef
chef-client -v
Chef: 11.12.8
Thing 1:
:latest does not error out when it fails to grab the artifact. Switching to a named version starts to fail to find the artifact which leads me to believe that it isn't getting through the proxy.
Thing 2:
I think this is a problem with omnibus in windows. I've found this pull that may fix it? https://github.com/schisamo/vagrant-omnibus/pull/89. I think this plug-in isn't using the settings set by poxy-conf.
CURRENTLY USING THIS WORKAROUND:
Set you http proxy in the windows cmd line
SET HTTP_PROXY=http://username:password#proxy:port