# Chef Beginner: Tutorial and basic Q's

**URL:** https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576
**Category:** Chef Infra (archive)
**Created:** [March 14, 2017, 2:14pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576 "2017-03-14T14:14:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pra.agar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/pra.agar/32/1776_2.png) [@pra.agar](https://discourse.chef.io/u/pra.agar)
#### Post date: [March 14, 2017, 2:14pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/1 "2017-03-14T14:14:53Z")

</div>

I’m a beginner in Chef. Had few Q’s and need good tutorials to understand every part of a cookbook.

My main requirement is chef solo as we are as of now not using any chef servers and everything we do is from Local.

1. Whats the difference between chef solo and chef-client --local-mode? What I understand, they both are same just prev version(before v11) referred them as solo and now local mode?
2. I need a tutorial that does a basic step by step process of explaining every part of cookbook like recipe, runlists, data bags, environment. Have referred [learn.chef.io](http://learn.chef.io), but I need something more specific to **chef client local mode**.
3. Do we also have a tutorial where a user can run a recipe to install say JAVA from their own central repository and should be **chef client local mode**.

---

<div class="post-metadata">

### Author: ![cheeseplus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cheeseplus/32/960_2.png) [@cheeseplus](https://discourse.chef.io/u/cheeseplus)
#### Post date: [March 16, 2017, 2:18pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/2 "2017-03-16T14:18:01Z")

</div>

1. As of Chef 12.10+ if you run `chef-solo` you are effectively getting `chef-client --local-mode`. Prior to this they were not the same, chef-solo was a fundamentally different code path than chef-client. Local mode was introduced so that users could easily transition from chef-solo to chef-client.

2. There is nothing really specific to `chef-client --local-mode` as the mechanics of Chef don’t really change. [Learn.chef.io](http://Learn.chef.io) is still the best resource for learning about chef and the primitives it offers.

3. Similar to above there isn’t anything specific to `chef-client --local-mode. There is a Java cookbook on the supermarket that may meet your needs but if the cookbook is highly specific to your environment, then writing your own would make sense.

Chef offers useful primitives in the form of resources so while it can do many things that doesn’t always mean there is a tutorial specifically for your desired needs out of the box. With local-mode or solo you are going to have to deliver the cookbooks to your node via some mechanism and configure the clients to look at them as in a traditional environment this is handled by chef-server. How you do so is up to you but there are projects like [knife-zero](https://github.com/higanworks/knife-zero) that help you do this from a workstation.

If you are looking for more realtime answers and advice I encourage you to join our Slack community at [http://community-slack.chef.io/](http://community-slack.chef.io/)

- cheeseplus

---

<div class="post-metadata">

### Author: ![pra.agar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/pra.agar/32/1776_2.png) [@pra.agar](https://discourse.chef.io/u/pra.agar)
#### Post date: [March 20, 2017, 9:27am UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/3 "2017-03-20T09:27:58Z")

</div>

Thanks @cheeseplus. That answers most of my doubts.

---

<div class="post-metadata">

### Author: ![ltgcc](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@ltgcc](https://discourse.chef.io/u/ltgcc)
#### Post date: [March 21, 2017, 5:50pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/4 "2017-03-21T17:50:34Z")

</div>

so what are we supposed to be using now for local testing on a workstation? chef-solo? chef-client -z? chef-client --local-mode?

---

<div class="post-metadata">

### Author: ![cheeseplus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cheeseplus/32/960_2.png) [@cheeseplus](https://discourse.chef.io/u/cheeseplus)
#### Post date: [March 23, 2017, 7:08pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/5 "2017-03-23T19:08:58Z")

</div>

Typically people are using test-kitchen to test their recipes with integration tests against a local or remote vm/cloud. It uses either `chef_solo` or `chef_zero` which right now are effectively the same thing. But to directly answer the question

`chef-solo == chef-client -z == chef-client --local-mode`

It really doesn’t matter at this point which one you use, `-z` is just the short option form for `--local-mode` so those are truly identical.

-cheeseplus

---

<div class="post-metadata">

### Author: ![ltgcc](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@ltgcc](https://discourse.chef.io/u/ltgcc)
#### Post date: [April 26, 2017, 8:53pm UTC](https://discourse.chef.io/t/chef-beginner-tutorial-and-basic-qs/10576/6 "2017-04-26T20:53:34Z")

</div>

Thanks for the clarification. I can continue using the -z then like I’ve gotten used to doing.
