# New to Chef

**URL:** <https://discourse.chef.io/t/new-to-chef/2524>\
**Category:** Chef Infra (archive)\
**Created:** [February 8, 2012, 3:34pm UTC](https://discourse.chef.io/t/new-to-chef/2524 "2012-02-08T15:34:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [February 8, 2012, 3:34pm UTC](https://discourse.chef.io/t/new-to-chef/2524/1 "2012-02-08T15:34:15Z")

</div>

Hi,

Is there a way to have the Chef server detect changes to the backing Git  
repository and cause itself to up updated (whether cookbook, role, node,  
etc. changes)?

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![Bryan\_McLellan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_mclellan/32/81_2.png) [@Bryan\_McLellan](https://discourse.chef.io/u/Bryan_McLellan)\
**Post date:** [February 8, 2012, 4:00pm UTC](https://discourse.chef.io/t/new-to-chef/2524/2 "2012-02-08T16:00:52Z")

</div>

On Wed, Feb 8, 2012 at 10:34 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Is there a way to have the Chef server detect changes to the backing Git  
> repository and cause itself to up updated (whether cookbook, role, node,  
> etc. changes)?

I'm not clear on what you're asking.

If you have all your cookbooks and roles and whatnot stores on disk in  
a traditional 'chef-repo' you are wondering if Chef could track that  
git repo and import objects automatically?

If that's what you're asking, sometimes people have wanted something  
where when they push their chef-repo to a central team repository,  
they use git hooks there to run the proper knife commands to upload to  
the server.

Otherwise, could you provide a fuller example please?

Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [February 8, 2012, 4:12pm UTC](https://discourse.chef.io/t/new-to-chef/2524/3 "2012-02-08T16:12:06Z")

</div>

Yes, that's exactly what I was asking about -- thanks for the pointer, I'll  
look at git hooks now 🙂

Thanks,  
Mark

On Wed, Feb 8, 2012 at 11:00 AM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:

> On Wed, Feb 8, 2012 at 10:34 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > Is there a way to have the Chef server detect changes to the backing Git  
> > repository and cause itself to up updated (whether cookbook, role, node,  
> > etc. changes)?
> 
> I'm not clear on what you're asking.
> 
> If you have all your cookbooks and roles and whatnot stores on disk in  
> a traditional 'chef-repo' you are wondering if Chef could track that  
> git repo and import objects automatically?
> 
> If that's what you're asking, sometimes people have wanted something  
> where when they push their chef-repo to a central team repository,  
> they use git hooks there to run the proper knife commands to upload to  
> the server.
> 
> Otherwise, could you provide a fuller example please?
> 
> Bryan

---

<div class="post-metadata">

**Author:** ![Vladimir\_Girnet](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@Vladimir\_Girnet](https://discourse.chef.io/u/Vladimir_Girnet)\
**Post date:** [February 9, 2012, 9:08am UTC](https://discourse.chef.io/t/new-to-chef/2524/4 "2012-02-09T09:08:08Z")

</div>

Another way is to use a CI like Jenkins, and have a job that monitor  
repository for changes and publish them automatically.  
This way you will have history of what and when was published.

On 2/8/12 6:12 PM, mark bradley wrote:

> Yes, that's exactly what I was asking about -- thanks for the pointer,  
> I'll look at git hooks now 🙂
> 
> Thanks,  
> Mark
> 
> On Wed, Feb 8, 2012 at 11:00 AM, Bryan McLellan \<[btm@loftninjas.org](mailto:btm@loftninjas.org)  
> [mailto:btm@loftninjas.org](mailto:btm@loftninjas.org)\> wrote:
> 
> ```
> On Wed, Feb 8, 2012 at 10:34 AM, mark bradley
> <gopearls42@gmail.com <mailto:gopearls42@gmail.com>> wrote:
> > Is there a way to have the Chef server detect changes to the
> backing Git
> > repository and cause itself to up updated (whether cookbook,
> role, node,
> > etc. changes)?
> 
> I'm not clear on what you're asking.
> 
> If you have all your cookbooks and roles and whatnot stores on disk in
> a traditional 'chef-repo' you are wondering if Chef could track that
> git repo and import objects automatically?
> 
> If that's what you're asking, sometimes people have wanted something
> where when they push their chef-repo to a central team repository,
> they use git hooks there to run the proper knife commands to upload to
> the server.
> 
> Otherwise, could you provide a fuller example please?
> 
> Bryan
> 
> ```

--  
Vladimir Girnet  
Infrastructure Engineer  
Tacit Knowledge

> **[Tacit Knowledge joins forces with Grid Dynamics - Tacit Knowledge](http://www.tacitknowledge.com)**
>
> In May 2021, we joined forces with Grid Dynamics, a digital-native technology services provider that accelerates growth for Forture 1000 companies.

---

<div class="post-metadata">

**Author:** ![Tim\_Uckun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tim_uckun/32/751_2.png) [@Tim\_Uckun](https://discourse.chef.io/u/Tim_Uckun)\
**Post date:** [February 10, 2012, 1:05am UTC](https://discourse.chef.io/t/new-to-chef/2524/5 "2012-02-10T01:05:35Z")

</div>

I am trying to figure out a good way to deal with a dynamic pool of  
web sites. Using the EC2 cloudfront I want to set up a dynamic pool of  
web servers which would scale up and down as needed. At any time I  
won't know how many machines there are.

I saw some documentation on using cloudfront and chef but it's quite  
old so I am not sure if it's valid anymore. Any documentation on how  
to dynamically register hosts and how to deploy code to an unknown  
number of hosts anywhere?

Cheers

On Thu, Feb 9, 2012 at 10:08 PM, Vladimir Girnet  
[vgirnet@tacitknowledge.com](mailto:vgirnet@tacitknowledge.com) wrote:

> Another way is to use a CI like Jenkins, and have a job that monitor  
> repository for changes and publish them automatically.  
> This way you will have history of what and when was published.
> 
> On 2/8/12 6:12 PM, mark bradley wrote:
> 
> Yes, that's exactly what I was asking about -- thanks for the pointer, I'll  
> look at git hooks now 🙂
> 
> Thanks,  
> Mark
> 
> On Wed, Feb 8, 2012 at 11:00 AM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:
> 
> > On Wed, Feb 8, 2012 at 10:34 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > wrote:
> > 
> > > Is there a way to have the Chef server detect changes to the backing Git  
> > > repository and cause itself to up updated (whether cookbook, role, node,  
> > > etc. changes)?
> > 
> > I'm not clear on what you're asking.
> > 
> > If you have all your cookbooks and roles and whatnot stores on disk in  
> > a traditional 'chef-repo' you are wondering if Chef could track that  
> > git repo and import objects automatically?
> > 
> > If that's what you're asking, sometimes people have wanted something  
> > where when they push their chef-repo to a central team repository,  
> > they use git hooks there to run the proper knife commands to upload to  
> > the server.
> > 
> > Otherwise, could you provide a fuller example please?
> > 
> > Bryan
> 
> --  
> Vladimir Girnet  
> Infrastructure Engineer  
> Tacit Knowledge  
> [http://www.tacitknowledge.com](http://www.tacitknowledge.com)
