Where is the storage of cooknooks in Chef Server 10?


#1

I am aware that you can check the existing cookbooks in the server using the

knife cookbook list

However, I want to check the exact location of the cookbooks in the server ,
say using the

ls command.

But, I think the cookbooks are stored in the database which in my case is
CouchDB. Is there a way to check it directly?


#2

yes cookbooks are stored in couch if you are using chef 10.x server. you
can check the couchdb conf for their physical location (/etc/couchdb should
have the config and /var/couchdb should have the data). By default couchdb
is bound to 127.0.0.1 , and can not be accessed from outside the server,
you can change that and make it bind to 0.0.0.0 and then hit couchdb
directly from your browser and check the data inside its (chef is db name
inside couch), but remember to revert back the setting as this will leave
the couch insecure.

On Sun, Mar 10, 2013 at 8:38 PM, ella_0888@yahoo.com wrote:

I am aware that you can check the existing cookbooks in the server using
the

knife cookbook list

However, I want to check the exact location of the cookbooks in the server
,
say using the

ls command.

But, I think the cookbooks are stored in the database which in my case is
CouchDB. Is there a way to check it directly?


#3

well… the mapping between checksum ids and real filenames is in couchdb.

the actual cookbook contents are stored on the filesystem.

on my centos server, there is a folder /var/lib/chef/cookbook_index, and in
there are a whole pile of files sorted by checksum id (and stored with the
checksum as the name). all the cookbooks are intermingled, so if two
cookbooks use the same file, it will only be stored once, and if two
cookbooks use different files who’s checksums are the same, one of them
will get the wrong file.
Fortunately the likelihood of a checksum collision for different files is
pretty small. A rough approximation if my math isn’t too far off if you
have about 2048 files in your cookbooks is 1.8e-71 (# files^2)/(2* #
possible hash results), 2048^2 / (2 * 2^256) (chef uses sha-256)

this is the precursor to the more friendly chef bookshelf storage system
that came with chef 11.

-jesse

On Mon, Mar 11, 2013 at 1:26 AM, Ranjib Dey dey.ranjib@gmail.com wrote:

yes cookbooks are stored in couch if you are using chef 10.x server. you
can check the couchdb conf for their physical location (/etc/couchdb should
have the config and /var/couchdb should have the data). By default couchdb
is bound to 127.0.0.1 , and can not be accessed from outside the server,
you can change that and make it bind to 0.0.0.0 and then hit couchdb
directly from your browser and check the data inside its (chef is db name
inside couch), but remember to revert back the setting as this will leave
the couch insecure.

On Sun, Mar 10, 2013 at 8:38 PM, ella_0888@yahoo.com wrote:

I am aware that you can check the existing cookbooks in the server using
the

knife cookbook list

However, I want to check the exact location of the cookbooks in the
server ,
say using the

ls command.

But, I think the cookbooks are stored in the database which in my case is
CouchDB. Is there a way to check it directly?