# Auto installation/configuration of Chef Client in all provisioned VM's

**URL:** <https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429>\
**Category:** Chef Infra (archive)\
**Created:** [June 20, 2014, 8:10am UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429 "2014-06-20T08:10:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shanker\_Jadapa](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Shanker\_Jadapa](https://discourse.chef.io/u/Shanker_Jadapa)\
**Post date:** [June 20, 2014, 8:10am UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/1 "2014-06-20T08:10:00Z")

</div>

Hi,

I want to install and configure the chef client on all machine which are  
deployed in my vCenter.

How to automate the task of installing and configuring the chef client on  
provisioned machines…

Thanks,  
SJ

---

<div class="post-metadata">

**Author:** ![Ranjib](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ranjib/32/1040_2.png) [@Ranjib](https://discourse.chef.io/u/Ranjib)\
**Post date:** [June 20, 2014, 3:05pm UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/2 "2014-06-20T15:05:57Z")

</div>

how you provision the vms? I used to bake in chef installers in vmware  
machine templates, and weekly refresh them (change the validation cert).

On Fri, Jun 20, 2014 at 1:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)  
wrote:

> Hi,
> 
> I want to install and configure the chef client on all machine which are  
> deployed in my vCenter.
> 
> How to automate the task of installing and configuring the chef client on  
> provisioned machines..
> 
> Thanks,  
> SJ

---

<div class="post-metadata">

**Author:** ![Kapil\_Shardha1](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@Kapil\_Shardha1](https://discourse.chef.io/u/Kapil_Shardha1)\
**Post date:** [June 20, 2014, 3:36pm UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/3 "2014-06-20T15:36:15Z")

</div>

Have you tried using “knife bootstrap” to install chef-client on already created VMs? It should install chef-client on those machines with required configuration.

-Kapil

From: Ranjib Dey [[mailto:dey.ranjib@gmail.com](mailto:dey.ranjib@gmail.com)]  
Sent: Friday, June 20, 2014 11:06 AM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Auto installation/configuration of Chef Client in all provisioned VM’s

how you provision the vms? I used to bake in chef installers in vmware machine templates, and weekly refresh them (change the validation cert).

On Fri, Jun 20, 2014 at 1:10 AM, Shanker Jadapa \<[shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)[mailto:shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)\> wrote:  
Hi,

I want to install and configure the chef client on all machine which are deployed in my vCenter.

How to automate the task of installing and configuring the chef client on provisioned machines…

Thanks,  
SJ

---

<div class="post-metadata">

**Author:** ![Shanker\_Jadapa](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Shanker\_Jadapa](https://discourse.chef.io/u/Shanker_Jadapa)\
**Post date:** [June 20, 2014, 4:10pm UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/4 "2014-06-20T16:10:09Z")

</div>

currently, I am installing client using "knife bootstrap" but i want to  
install in my "Golden Template"

On Fri, Jun 20, 2014 at 9:06 PM, Kapil Shardha \<  
[Kapil.Shardha@simulationiq.com](mailto:Kapil.Shardha@simulationiq.com)\> wrote:

> Have you tried using “knife bootstrap” to install chef-client on already  
> created VMs? It should install chef-client on those machines with required  
> configuration.
> 
> -Kapil
> 
> _From:_ Ranjib Dey [[mailto:dey.ranjib@gmail.com](mailto:dey.ranjib@gmail.com)]  
> _Sent:_ Friday, June 20, 2014 11:06 AM  
> _To:_ [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> _Subject:_ [chef] Re: Auto installation/configuration of Chef Client in  
> all provisioned VM's
> 
> how you provision the vms? I used to bake in chef installers in vmware  
> machine templates, and weekly refresh them (change the validation cert).
> 
> On Fri, Jun 20, 2014 at 1:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)  
> wrote:
> 
> Hi,
> 
> I want to install and configure the chef client on all machine which are  
> deployed in my vCenter.
> 
> How to automate the task of installing and configuring the chef client on  
> provisioned machines..
> 
> Thanks,
> 
> SJ

--  
(¨`·.·´¨) Alwayz `·.¸(¨`·.·´¨) Keep Loving & (¨`·.·´¨)´ Keep Smiling !  
`·.¸.·´  
_·..·:Shanker:·..·:_

---

<div class="post-metadata">

**Author:** ![Ranjib](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ranjib/32/1040_2.png) [@Ranjib](https://discourse.chef.io/u/Ranjib)\
**Post date:** [June 20, 2014, 4:58pm UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/5 "2014-06-20T16:58:27Z")

</div>

you can reuse knife bootstrap as a build tool. to create golden images.  
knife commands are easy to use from scripts[1].  
then you can have service specific golden images (web, db, ldap, nagios  
etc).  
you have to clean up chef configs post build (cert, client.r, etc),

[1] [extending\_knife.md · GitHub](https://gist.github.com/ranjib/2db397f06f8d074eb8a0)

On Fri, Jun 20, 2014 at 9:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)  
wrote:

> currently, I am installing client using "knife bootstrap" but i want to  
> install in my "Golden Template"
> 
> On Fri, Jun 20, 2014 at 9:06 PM, Kapil Shardha \<  
> [Kapil.Shardha@simulationiq.com](mailto:Kapil.Shardha@simulationiq.com)\> wrote:
> 
> > Have you tried using “knife bootstrap” to install chef-client on  
> > already created VMs? It should install chef-client on those machines with  
> > required configuration.
> > 
> > -Kapil
> > 
> > _From:_ Ranjib Dey [[mailto:dey.ranjib@gmail.com](mailto:dey.ranjib@gmail.com)]  
> > _Sent:_ Friday, June 20, 2014 11:06 AM  
> > _To:_ [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> > _Subject:_ [chef] Re: Auto installation/configuration of Chef Client in  
> > all provisioned VM's
> > 
> > how you provision the vms? I used to bake in chef installers in vmware  
> > machine templates, and weekly refresh them (change the validation cert).
> > 
> > On Fri, Jun 20, 2014 at 1:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)  
> > wrote:
> > 
> > Hi,
> > 
> > I want to install and configure the chef client on all machine which are  
> > deployed in my vCenter.
> > 
> > How to automate the task of installing and configuring the chef client on  
> > provisioned machines..
> > 
> > Thanks,
> > 
> > SJ
> 
> --  
> (¨`·.·´¨) Alwayz `·.¸(¨`·.·´¨) Keep Loving & (¨`·.·´¨)´ Keep Smiling !  
> `·.¸.·´  
> _·..·:Shanker:·..·:_

---

<div class="post-metadata">

**Author:** ![David\_Chait](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@David\_Chait](https://discourse.chef.io/u/David_Chait)\
**Post date:** [June 20, 2014, 8:38pm UTC](https://discourse.chef.io/t/auto-installation-configuration-of-chef-client-in-all-provisioned-vms/5429/6 "2014-06-20T20:38:17Z")

</div>

I baked in the chef-client on my template and wrote a simple python  
script to configure chef-client to start/rename the machine/reboot on  
the first root login. After that point, roles can be assigned without  
any further intervention.

On Fri, Jun 20, 2014 at 9:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com) wrote:

> currently, I am installing client using "knife bootstrap" but i want to  
> install in my "Golden Template"
> 
> On Fri, Jun 20, 2014 at 9:06 PM, Kapil Shardha  
> [Kapil.Shardha@simulationiq.com](mailto:Kapil.Shardha@simulationiq.com) wrote:
> 
> > Have you tried using “knife bootstrap” to install chef-client on already  
> > created VMs? It should install chef-client on those machines with required  
> > configuration.
> > 
> > -Kapil
> > 
> > From: Ranjib Dey [[mailto:dey.ranjib@gmail.com](mailto:dey.ranjib@gmail.com)]  
> > Sent: Friday, June 20, 2014 11:06 AM  
> > To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> > Subject: [chef] Re: Auto installation/configuration of Chef Client in all  
> > provisioned VM's
> > 
> > how you provision the vms? I used to bake in chef installers in vmware  
> > machine templates, and weekly refresh them (change the validation cert).
> > 
> > On Fri, Jun 20, 2014 at 1:10 AM, Shanker Jadapa [shankerrhce@gmail.com](mailto:shankerrhce@gmail.com)  
> > wrote:
> > 
> > Hi,
> > 
> > I want to install and configure the chef client on all machine which are  
> > deployed in my vCenter.
> > 
> > How to automate the task of installing and configuring the chef client on  
> > provisioned machines..
> > 
> > Thanks,
> > 
> > SJ
> 
> --  
> (¨`·.·´¨) Alwayz `·.¸(¨`·.·´¨) Keep Loving & (¨`·.·´¨)´ Keep Smiling !  
> `·.¸.·´  
> _·..·:Shanker:·..·:_
