Is it possible to run chef-solo with cookbook offline?


#1

Hi there,

Our machines are behind firewall and there is no Internet access.

We prepare to auto deploy software in these machines with chef, installed
chef client and prepared local yum repository and downloaded cookbooks for
those packages installation.

But it seems that chef need a an Internet access even if the cookbook and
chef package is in local.

Is it possible to run it offline? Or we should install private chef server
for that?

Thanks.


#2

Hi,

Yes, it is. Just run:

chef-client -z

More info here:


Andrei

On Fri, Apr 24, 2015 at 11:05 AM, jeffty wantwatering@gmail.com wrote:

Hi there,

Our machines are behind firewall and there is no Internet access.

We prepare to auto deploy software in these machines with chef, installed
chef client and prepared local yum repository and downloaded cookbooks for
those packages installation.

But it seems that chef need a an Internet access even if the cookbook and
chef package is in local.

Is it possible to run it offline? Or we should install private chef server
for that?

Thanks.


#3

Thanks Andrei, it works!

chef-client doesn’t have a parameter ‘-r’ like chef-solo for those tar ball cookbook.

So can I just extract the cookbook.tgz and only runs ‘chef-client -z’ instead of old ‘chef-solo -r cookbook.tgz’?

Jason

From: Andrei Radulescu [mailto:andi.radulescu@gmail.com]
Sent: Friday, April 24, 2015 5:27 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Is it possible to run chef-solo with cookbook offline?

Hi,

Yes, it is. Just run:

chef-client -z

More info here: https://www.chef.io/blog/2013/10/31/chef-client-z-from-zero-to-chef-in-8-5-seconds/

https://mailfoogae.appspot.com/t?sender=aYW5kaS5yYWR1bGVzY3VAZ21haWwuY29t&type=zerocontent&guid=d1bc8525-82a5-48f6-9dff-41821113842f

Andrei

On Fri, Apr 24, 2015 at 11:05 AM, jeffty <wantwatering@gmail.com mailto:wantwatering@gmail.com > wrote:

Hi there,

Our machines are behind firewall and there is no Internet access.

We prepare to auto deploy software in these machines with chef, installed chef client and prepared local yum repository and downloaded cookbooks for those packages installation.

But it seems that chef need a an Internet access even if the cookbook and chef package is in local.

Is it possible to run it offline? Or we should install private chef server for that?

Thanks.


#4

On Friday, April 24, 2015 at 8:52 AM, jeffty wrote:

Thanks Andrei, it works!

chef-client doesn’t have a parameter ‘-r’ like chef-solo for those tar ball cookbook.
So can I just extract the cookbook.tgz and only runs ‘chef-client -z’ instead of old ‘chef-solo -r cookbook.tgz’?

Jason

In local mode (-z) you can use --recipe-url=RECIPE_URL, the same as -r for chef-solo, just -r was already taken for chef-client.


Daniel DeLeo


#5

Thanks Daniel!

-----Original Message-----
From: Daniel DeLeo [mailto:ddeleo@kallistec.com] On Behalf Of Daniel DeLeo
Sent: Saturday, April 25, 2015 12:58 AM
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: Is it possible to run chef-solo with cookbook offline?

On Friday, April 24, 2015 at 8:52 AM, jeffty wrote:

Thanks Andrei, it works!

chef-client doesn’t have a parameter ‘-r’ like chef-solo for those tar ball cookbook.
So can I just extract the cookbook.tgz and only runs ‘chef-client -z’ instead of old ‘chef-solo -r cookbook.tgz’?

Jason

In local mode (-z) you can use --recipe-url=RECIPE_URL, the same as -r for chef-solo, just -r was already taken for chef-client.


Daniel DeLeo