Knife-solo warning local cookbook path

399 Views Asked by At

When using knife-solo, I've got this warning: "Local cookbook_path '/Users/username/chef-test/cookbooks' does not exist", and cookbooks directory is removed before I knew it. Removing Berksfile, I have no warning message.

$ knife -v
Chef: 12.0.0
$ gem list | grep knife
knife-solo (0.4.2)
$ knife solo init .
Creating kitchen...
Creating knife.rb in kitchen...
Creating cupboards...
Setting up Berkshelf...
$ ls -al
total 32
drwxr-xr-x 13 username staff 442 12 7 19:11 .
drwxr-xr-x+ 26 username staff 884 12 7 19:09 ..
drwxr-xr-x 3 username staff 102 12 6 22:04 .chef
-rw-r--r-- 1 username staff 12 12 7 19:11 .gitignore
drwxr-xr-x 3 username staff 102 12 6 21:52 .vagrant
-rw-r--r-- 1 username staff 41 12 7 00:34 Berksfile
-rw-r--r-- 1 username staff 4818 12 6 21:52 Vagrantfile
drwxr-xr-x 3 username staff 102 12 7 19:11 cookbooks
drwxr-xr-x 3 username staff 102 12 6 22:04 data_bags
drwxr-xr-x 3 username staff 102 12 6 22:04 environments
drwxr-xr-x 4 username staff 136 12 7 19:09 nodes
drwxr-xr-x 3 username staff 102 12 6 22:04 roles
drwxr-xr-x 6 username staff 204 12 7 01:48 site-cookbooks
$ knife solo cook webdb
Running Chef on webdb...
Checking Chef version...
Installing Berkshelf cookbooks to 'cookbooks'...
Resolving cookbook dependencies...
Uploading the kitchen...
WARNING: Local cookbook_path '/Users/username/chef-test/cookbooks' does not exist
Generating solo config...
Running Chef...
Starting Chef Client, version 12.0.0
Compiling Cookbooks...
Converging 4 resources
Recipe: apache::default
* yum_package[httpd] action install (up to date)
* service[httpd] action enable (up to date)
* service[httpd] action start (up to date)
Recipe: mysql::default
* yum_package[mysql-server] action install (up to date)
* service[mysqld] action enable (up to date)
* service[mysqld] action start (up to date) Running handlers:
Running handlers complete
Chef Client finished, 0/6 resources updated in 3.239891356 seconds
$ ls -al
total 32
drwxr-xr-x 12 username staff 408 12 7 19:12 .
drwxr-xr-x+ 26 username staff 884 12 7 19:09 ..
drwxr-xr-x 3 username staff 102 12 6 22:04 .chef
-rw-r--r-- 1 username staff 12 12 7 19:11 .gitignore
drwxr-xr-x 3 username staff 102 12 6 21:52 .vagrant
-rw-r--r-- 1 username staff 41 12 7 00:34 Berksfile
-rw-r--r-- 1 username staff 4818 12 6 21:52 Vagrantfile
drwxr-xr-x 3 username staff 102 12 6 22:04 data_bags
drwxr-xr-x 3 username staff 102 12 6 22:04 environments
drwxr-xr-x 4 username staff 136 12 7 19:09 nodes
drwxr-xr-x 3 username staff 102 12 6 22:04 roles
drwxr-xr-x 6 username staff 204 12 7 01:48 site-cookbooks
$

Would be nice to know what kind of settings does chef requires to fix this issue.

1

There are 1 best solutions below

0
On

This is a late late answer, however, if anyone else comes across this problem, try running the command: bundle exec berks install

Run it on your local machine of course!

This will download the cookbooks again or copy them again.

After that try to run: bundle exec knife solo bootstrap root@YOURSERVERIP

-> replace obviously your username@serverip with the real params.