bflad / chef-stash

Chef Cookbook for Atlassian Stash
Other
37 stars 42 forks source link

Running with chef solo? #64

Closed devployment closed 9 years ago

devployment commented 9 years ago

Not an issue in the cookbook I think. I'm currently trying to get familiar with Chef and thought this here might be a good exercise. Everything works as I try in with Vagrant in my local machine.

But if I try to run it on a "real" machine I'm struggling to overwrite the attribute values. Tried a solo.json file where I added the database configuration to use postgresql. This was passed in by -j. But the cookbook always tries to install mysql but gives me an error.

[2015-01-27T01:39:45-05:00] DEBUG: Loading Recipe mysql::server via include_recipe

================================================================================
Recipe Compile Error
================================================================================

Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe server for cookbook mysql

So I tried to create data bags for the attributes. But same result.

Where does the attribute configuration go to make it run with chef solo?

devployment commented 9 years ago

Have to add that I'm using the current ChefDK. Maybe there's something wrong with their chef version or ruby version.

linc01n commented 9 years ago

I'm running this cookbook with chef-solo without any problem. I use knife-solo as a tools. So I don't need to touch the solo.json

devployment commented 9 years ago

Ok. Maybe I'm doing it just wrong. But good to know that it works if done properly. :)

It's not part of this project or repository but would you mind to provide just a few points bullet list to get this initially running with chef/knife solo?

I'm going back learning the basics in the meantime.


@linc01n Are you using the ChefDK on the solo node? Or installed everything needed manually?

linc01n commented 9 years ago

You don't need ChefDK at all unless you are developing cookbook.

I had a presentation slide on how to use knife-solo in 2013. You can take a look.

http://chef-solo-intro.lincoln.hk/

devployment commented 9 years ago

I think I figured out most of the things. Thanks for the help. :+1: