Reputation: 71
I've created a very basic recipe:
cookbook_file "cookbook_test_file" do
path "/tmp/test_file123"
action [:create_if_missing, :create]
end
I've also created the cookbook_test_file file under files->default in my cookbook and added the recipe to the run book.
Everything works perfectly. The file gets propagated to the client. If the file is changed on the client then next time I run chef-client - the file gets updated as expected. No issues.
However, I can't find cookbook_test_file anywhere on the chef server.I tried to fully qualify the default directory for the file as follows: /usr/local/bin/cookbook_test_file but to no avail.
Where are these files stored on the chef server? ? I did not see it in the PostgreSQL database either.
Thank you.
Upvotes: 1
Views: 586
Reputation: 77951
@coderanger has provided the answer you're looking for I think.
What I'd like to add is that knife can be used to check what was uploaded as part of a cookbook. The following example returns all the files in the apache2 cookbook:
$ knife cookbook show apache2 2.0.0 files -Fj
[
{
"name": "apache2_module_conf_generate.pl",
"path": "files/default/apache2_module_conf_generate.pl",
"checksum": "424ea6efb9da5b8cd9739f7f0f1fc9d5",
"specificity": "default",
"url": "http://127.0.0.1:8889/file_store/checksums/424ea6efb9da5b8cd9739f7f0f1fc9d5"
}
]
Upvotes: 1
Reputation: 54181
They end up in the bookshelf file storage, but not in a directly useable way. Look in /var/opt/chef-server/bookshelf
, the files are stored by content hash and have a CRC check prepended to them.
The file metadata is all stored in Postgres though, either in the sandbox data or the cookbook version.
Upvotes: 2