# Bootstrap process

**URL:** <https://discourse.chef.io/t/bootstrap-process/9796>\
**Category:** Chef Infra (archive)\
**Created:** [October 31, 2016, 2:09am UTC](https://discourse.chef.io/t/bootstrap-process/9796 "2016-10-31T02:09:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [October 31, 2016, 2:09am UTC](https://discourse.chef.io/t/bootstrap-process/9796/1 "2016-10-31T02:09:17Z")

</div>

In production environment, where exactly ‘bootstrap process’ should be triggered? What is Chef recommendation?  
In the tutorial, it is usually triggered from chef workstation.

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [October 31, 2016, 8:44am UTC](https://discourse.chef.io/t/bootstrap-process/9796/2 "2016-10-31T08:44:32Z")

</div>

The bootstrap process, done by knife, is just one way. What it does is installing chef client, pushing some configuration and certificates when needed and doing a first run.

Some peoples use knife bootstrap from the provisioning system, others preinstall chef-client and a basic configuration and the validator.pem file on the base image and launch the first run after hostname/IP has been configured by their provisioning system.

Usually using the chef\_client cookbook to manage the client configuration is a good idea.

In brief: find the most suitable case for you, as long as the client has a configuration to reach the chef-server and and either a validator.pem to register itself or it’s own client.pem to authenticate it will be fine.

---

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [October 31, 2016, 3:26pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/3 "2016-10-31T15:26:14Z")

</div>

Thank You very much for the details. Can you please shed some light on ‘Usually using the chef\_client cookbook to manage the client configuration is a good idea’??

Will this chef\_client cookbook be run as part of initial bootstrapping?

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [October 31, 2016, 3:37pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/4 "2016-10-31T15:37:16Z")

</div>

The cookbook is [here](https://supermarket.chef.io/cookbooks/chef-client), the readme covers it’s usage.

I do think you should have it in every node runlist so if you need to change a parameter it is easy via attributes, so yes, it should be set in the bootstrap runlist IMHO.

---

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [October 31, 2016, 3:42pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/5 "2016-10-31T15:42:06Z")

</div>

Thanks. Looks like this chef\_client cookbook does NOT install chef client on the node. It simply provides a way to change the client.rb configuration at run-time. Is my understanding correct?

---

<div class="post-metadata">

**Author:** ![kkeane](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kkeane](https://discourse.chef.io/u/kkeane)\
**Post date:** [October 31, 2016, 6:02pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/6 "2016-10-31T18:02:29Z")

</div>

Yes, probably.

It wouldn’t make sense for any cookbook to try to install chef-client because you need chef-client to even run the cookbook!

Kevin Keane  
Whom the IT Pros Call  
The NetTech  
[http://www.4nettech.com](http://www.4nettech.com)  
Our values: Privacy, Liberty, Justice  
See [https://www.4nettech.com/corp/the-nettech-values.html](https://www.4nettech.com/corp/the-nettech-values.html)

---

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [October 31, 2016, 6:08pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/7 "2016-10-31T18:08:46Z")

</div>

Yes, Thanks.

Can I make the node, bootstrap itself? Basically I will install chefdk on my node and issue ‘knife bootstrap’ command which will install chef-client and create /etc/chef/client.rb. You see any issues with this approach?

Basically the node will play the role of ‘chefworkstation’ and ‘node’.

---

<div class="post-metadata">

**Author:** ![kkeane](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kkeane](https://discourse.chef.io/u/kkeane)\
**Post date:** [October 31, 2016, 6:14pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/8 "2016-10-31T18:14:31Z")

</div>

You probably could do that, but it doesn’t seem to make much sense to me. You would only be moving the problem of having to manually install something from a fairly simple install to a much larger and more complex one.

Why not manually install the chef-client instead of manually installing chef-dk? chef-dk is a much more massive download, and needs a lot more configuration (which would be a lot easier to do with a cookbook).

Kevin Keane  
Whom the IT Pros Call  
The NetTech  
[http://www.4nettech.com](http://www.4nettech.com)  
Our values: Privacy, Liberty, Justice  
See [https://www.4nettech.com/corp/the-nettech-values.html](https://www.4nettech.com/corp/the-nettech-values.html)

---

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [November 1, 2016, 1:16am UTC](https://discourse.chef.io/t/bootstrap-process/9796/9 "2016-11-01T01:16:53Z")

</div>

I see that ‘chef\_client’ cookbook has ‘service recipes’. As part of bootstrap process, is it a must to use these service recipes?

---

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [November 1, 2016, 12:22pm UTC](https://discourse.chef.io/t/bootstrap-process/9796/10 "2016-11-01T12:22:35Z")

</div>

Do I have to setup chef-client cron jobs so that it runs at a specific interval?
