Chef provisioner fails during vagrant up on AWS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Chef provisioner fails during vagrant up on AWS

Jeff Sussna
Using vagrant-aws to build AWS instances from generic Ubuntu AMI. Using Seth Chisamore's vagrant-omnibus plugin to install Chef during 'vagrant up'. The chef-solo run fails trying to 'chown vagrant /tmp/vagrant-chef-1' because there is no vagrant user. ssh_username is set to 'ubuntu' in the Vagrantfile.

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Chef provisioner fails during vagrant up on AWS

Jeff Sussna
Added the following to my Vagrantfile and get further:

   config.vm.provision :shell,
       :inline => "sudo useradd vagrant; sudo adduser vagrant sudo"

But now get a new error:

   Failed to upload a file to the guest VM via SCP due to a permissions
   error. This is normally because the user running Vagrant doesn't have
   read permission on the file. Please set proper permissions on the file:

   /tmp/vagrant20130415-4687-8wl5cp


On Monday, April 15, 2013 1:51:09 PM UTC-5, Jeff Sussna wrote:
Using vagrant-aws to build AWS instances from generic Ubuntu AMI. Using Seth Chisamore's vagrant-omnibus plugin to install Chef during 'vagrant up'. The chef-solo run fails trying to 'chown vagrant /tmp/vagrant-chef-1' because there is no vagrant user. ssh_username is set to 'ubuntu' in the Vagrantfile.

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Chef provisioner fails during vagrant up on AWS

Teemu Matilainen
In reply to this post by Jeff Sussna
Hi Jeff,

On Mon, Apr 15, 2013 at 3:51 PM, Jeff Sussna <[hidden email]> wrote:
> Using vagrant-aws to build AWS instances from generic Ubuntu AMI. Using Seth
> Chisamore's vagrant-omnibus plugin to install Chef during 'vagrant up'. The
> chef-solo run fails trying to 'chown vagrant /tmp/vagrant-chef-1' because
> there is no vagrant user. ssh_username is set to 'ubuntu' in the
> Vagrantfile.

With Vagrant 1.1 you have to set also `config.ssh.username` (outside
the provider block) to match the `aws.ssh_username`. In the (near?)
future Vagrant 1.2 you can use something like this:

    config.vm.provider :aws do |aws, override|
      override.ssh.username = "ubuntu"
    end

See https://github.com/mitchellh/vagrant-aws/issues/2 for more information.

--
Teemu

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Chef provisioner fails during vagrant up on AWS

Jeff Sussna
Worked. Thanks!

On Tuesday, April 16, 2013 8:35:54 AM UTC-5, Teemu Matilainen wrote:
Hi Jeff,

On Mon, Apr 15, 2013 at 3:51 PM, Jeff Sussna <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="SDjH55HzeRkJ">j...@...> wrote:
> Using vagrant-aws to build AWS instances from generic Ubuntu AMI. Using Seth
> Chisamore's vagrant-omnibus plugin to install Chef during 'vagrant up'. The
> chef-solo run fails trying to 'chown vagrant /tmp/vagrant-chef-1' because
> there is no vagrant user. ssh_username is set to 'ubuntu' in the
> Vagrantfile.

With Vagrant 1.1 you have to set also `config.ssh.username` (outside
the provider block) to match the `aws.ssh_username`. In the (near?)
future Vagrant 1.2 you can use something like this:

    config.vm.provider :aws do |aws, override|
      override.ssh.username = "ubuntu"
    end

See https://github.com/mitchellh/vagrant-aws/issues/2 for more information.

--
Teemu

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.