# Set run list on Server or node

**URL:** <https://discourse.chef.io/t/set-run-list-on-server-or-node/4475>\
**Category:** Chef Infra (archive)\
**Created:** [September 4, 2013, 3:37am UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475 "2013-09-04T03:37:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Howard\_Zhang](https://avatars.discourse-cdn.com/v4/letter/h/e9c0ed/32.png) [@Howard\_Zhang](https://discourse.chef.io/u/Howard_Zhang)\
**Post date:** [September 4, 2013, 3:37am UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/1 "2013-09-04T03:37:02Z")

</div>

Hi,

I wonder when I use knife to set a Node’s run list, knife build connection  
with server or node to set its run list? Is “bootstrap -r” make use of the  
same mechanism with “knife node run\_list”?

Thanks.

Cheers,  
Howard Zhang

---

<div class="post-metadata">

**Author:** ![aL1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/al1/32/228_2.png) [@aL1](https://discourse.chef.io/u/aL1)\
**Post date:** [September 4, 2013, 12:37pm UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/2 "2013-09-04T12:37:50Z")

</div>

NodeObject is stored on chef-server so i dont think that knife actually  
connects to the node instead of the server and read NodeObject.

--  
Si necesitas una máquina para hacer algo y no la compras al final te darás  
cuenta de que has pagado lo mismo y no tienes la máquina.--Henry Ford

Alberto

On Wed, Sep 4, 2013 at 4:37 AM, Howard Zhang [howardzhanghaohua@gmail.com](mailto:howardzhanghaohua@gmail.com)wrote:

> Hi,
> 
> I wonder when I use knife to set a Node's run list, knife build connection  
> with server or node to set its run list? Is "bootstrap -r" make use of the  
> same mechanism with "knife node run\_list"?
> 
> Thanks.
> 
> Cheers,  
> Howard Zhang

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [September 4, 2013, 3:38pm UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/3 "2013-09-04T15:38:21Z")

</div>

On Tuesday, September 3, 2013 at 8:37 PM, Howard Zhang wrote:

> Hi,
> 
> I wonder when I use knife to set a Node's run list, knife build connection with server or node to set its run list? Is "bootstrap -r" make use of the same mechanism with "knife node run\_list"?  
> No, when you bootstrap, it creates a JSON file on the remote box and passes `-j /etc/chef/first-boot.json` option to chef-client.

> Thanks.
> 
> Cheers,  
> Howard Zhang

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Howard\_Zhang](https://avatars.discourse-cdn.com/v4/letter/h/e9c0ed/32.png) [@Howard\_Zhang](https://discourse.chef.io/u/Howard_Zhang)\
**Post date:** [September 5, 2013, 4:54am UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/4 "2013-09-05T04:54:13Z")

</div>

What I know is that the two command, "knife bootstrap -r xxx" and "knife  
node run\_list set" is different. The first one is the bootstraped node tell  
Chef server his run list, while the other is that knife tell Chef Server to  
assign run list to certain node.

Howard

On Wed, Sep 4, 2013 at 11:38 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Tuesday, September 3, 2013 at 8:37 PM, Howard Zhang wrote:
> 
> Hi,
> 
> I wonder when I use knife to set a Node's run list, knife build connection  
> with server or node to set its run list? Is "bootstrap -r" make use of the  
> same mechanism with "knife node run\_list"?
> 
> No, when you bootstrap, it creates a JSON file on the remote box and  
> passes `-j /etc/chef/first-boot.json` option to chef-client.
> 
> Thanks.
> 
> Cheers,  
> Howard Zhang
> 
> --  
> Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [September 5, 2013, 12:08pm UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/5 "2013-09-05T12:08:06Z")

</div>

The distinction is that when a new node starts up, Chef Server has no idea  
of what the node is, nor its run\_list.

As Dan stated, with bootstrap, a json file is placed on the node, and  
chef-client references that file, runs Chef, and at the end of the  
(completed) run, sends the details back to Chef Server (including the  
run\_list) for future use.

Using knife to set the run\_list on existing nodes will affect their future  
runs, as when chef-client starts, it asks Chef Server for its current  
run\_list.

-M

On Thu, Sep 5, 2013 at 12:54 AM, Howard Zhang  
[howardzhanghaohua@gmail.com](mailto:howardzhanghaohua@gmail.com)wrote:

> What I know is that the two command, "knife bootstrap -r xxx" and "knife  
> node run\_list set" is different. The first one is the bootstraped node tell  
> Chef server his run list, while the other is that knife tell Chef Server to  
> assign run list to certain node.
> 
> Howard
> 
> On Wed, Sep 4, 2013 at 11:38 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:
> 
> > On Tuesday, September 3, 2013 at 8:37 PM, Howard Zhang wrote:
> > 
> > Hi,
> > 
> > I wonder when I use knife to set a Node's run list, knife build  
> > connection with server or node to set its run list? Is "bootstrap -r" make  
> > use of the same mechanism with "knife node run\_list"?
> > 
> > No, when you bootstrap, it creates a JSON file on the remote box and  
> > passes `-j /etc/chef/first-boot.json` option to chef-client.
> > 
> > Thanks.
> > 
> > Cheers,  
> > Howard Zhang
> > 
> > --  
> > Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Howard\_Zhang](https://avatars.discourse-cdn.com/v4/letter/h/e9c0ed/32.png) [@Howard\_Zhang](https://discourse.chef.io/u/Howard_Zhang)\
**Post date:** [September 9, 2013, 2:04am UTC](https://discourse.chef.io/t/set-run-list-on-server-or-node/4475/6 "2013-09-09T02:04:34Z")

</div>

Thanks for the detailed response.

Howard

On Thu, Sep 5, 2013 at 8:08 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:

> The distinction is that when a new node starts up, Chef Server has no idea  
> of what the node is, nor its run\_list.
> 
> As Dan stated, with bootstrap, a json file is placed on the node, and  
> chef-client references that file, runs Chef, and at the end of the  
> (completed) run, sends the details back to Chef Server (including the  
> run\_list) for future use.
> 
> Using knife to set the run\_list on existing nodes will affect their future  
> runs, as when chef-client starts, it asks Chef Server for its current  
> run\_list.
> 
> -M
> 
> On Thu, Sep 5, 2013 at 12:54 AM, Howard Zhang \<[howardzhanghaohua@gmail.com](mailto:howardzhanghaohua@gmail.com)
> 
> > wrote:
> 
> > What I know is that the two command, "knife bootstrap -r xxx" and "knife  
> > node run\_list set" is different. The first one is the bootstraped node tell  
> > Chef server his run list, while the other is that knife tell Chef Server to  
> > assign run list to certain node.
> > 
> > Howard
> > 
> > On Wed, Sep 4, 2013 at 11:38 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:
> > 
> > > On Tuesday, September 3, 2013 at 8:37 PM, Howard Zhang wrote:
> > > 
> > > Hi,
> > > 
> > > I wonder when I use knife to set a Node's run list, knife build  
> > > connection with server or node to set its run list? Is "bootstrap -r" make  
> > > use of the same mechanism with "knife node run\_list"?
> > > 
> > > No, when you bootstrap, it creates a JSON file on the remote box and  
> > > passes `-j /etc/chef/first-boot.json` option to chef-client.
> > > 
> > > Thanks.
> > > 
> > > Cheers,  
> > > Howard Zhang
> > > 
> > > --  
> > > Daniel DeLeo
