Vagrant-aws, provision doesn't update cookbooks

32 views
Skip to first unread message

Yoshi Spendiff

unread,
May 4, 2015, 1:24:23 PM5/4/15
to vagra...@googlegroups.com
Hi,

I'm using vagrant-aws while developing cookbooks to use on Amazon Linux. I'm also using vagrant-berkshelf for cookbook dependency mapping.

I'm finding that running vagrant up works as intended but running vagrant provision does not actually update the cookbooks on the instance. Is this supposed to work or is it not currently a supported feature of vagrant-aws? I've just been using destroy + up to apply changes.

If it is supported then I figured it was something to do with my workflow with berkshelf. Has anyone got this working?

Regards,
Yoshi

Alvaro Miranda Aguilera

unread,
May 4, 2015, 7:09:02 PM5/4/15
to vagra...@googlegroups.com
Can you test with vagrant reload --provision ??
> --
> 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 vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Yoshi Spendiff

unread,
May 5, 2015, 12:19:08 PM5/5/15
to vagra...@googlegroups.com
Hi,

No, that doesn't work either.

Further investigation shows that it's a problem with syncing all of the cookbooks for use with Chef solo. When running vagrant provision the cookbooks are vendored to ~/.berkshelf/vagrant-berkshelf/shelves/berkshelf<some identifier>/cookbook and I can see my updates in there. When provisioning is finished I can also see the recipe changes applied to /vagrant/recipes.

None of this is useful though as the cookbooks are run from /tmp/vagrant-chef/<hash>/cookbooks, which is not updated by either vagrant provision or vagrant reload --provision when using ec2 as a provider.

Regards,
Yoshi

You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/_xe5dy9S5Eo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
May 5, 2015, 5:13:09 PM5/5/15
to vagra...@googlegroups.com
On Wed, May 6, 2015 at 4:19 AM, Yoshi Spendiff <yo...@spendiff.net> wrote:
> ~/.berkshelf/vagrant-berkshelf/shelves/berkshelf<some identifier>/cookbook
> and I can see my updates in there. When provisioning is finished I can also
> see the recipe changes applied to /vagrant/recipes.
>
> None of this is useful though as the cookbooks are run from
> /tmp/vagrant-chef/<hash>/cookbooks

Hello,

I am not a chef user, so if I am saying something crazy, please forgive me..

If on initial provision works, and then on new provision/reload
doesn't, I think you can open an issue on github.

Alvaro.

Yoshi Spendiff

unread,
May 7, 2015, 1:26:24 PM5/7/15
to vagra...@googlegroups.com
Thanks, Alvaro.

I raised a ticket. There doesn't look to be any movement on the vagrant-was plug-in though so I'm not expecting anything.

The difference between the AWS provider and say, Virtualbox, is that the vagrant-chef directory is mounted when using Virtualbox and is thus updates when vagrant-berkshelf updates the local shelf. On AWS this directory is rsynced on initial up but not on provision.

I'll raise a ticket for vagrant-berkshelf as well to see if there's a solution from that end.


Yoshi Spendiff

unread,
May 8, 2015, 1:12:57 PM5/8/15
to vagra...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages