Temporarily disable one cookbook on one node

Hi,

I am a newbie for chef. Is there any way to disable one cookbook or role on one
node?

For example:
DBA want to disable role – mysql on one node to do maintenance, but other
cookbooks or roles are still functional through chef-client.

using provider, I can check local file content before do any actions, but don’t
know how to disable a role or cookbook on chef-client side.

Appreciate for any helps.

Bill

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node edit
Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:

I am a newbie for chef. Is there any way to disable one cookbook or role on one

Hi, Nikhil,
Thanks for your reply. what I want is:check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running.
I can do your suggestions on chef server, but my customers want to control it by themselves.
Regards
Bill

From: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node edit

Nikhil Shah / System Administratornshah@theorchard.com
The Orchard® / www.theorchard.com
t (+1) 212.308.5648 / f (+1) 212.201.920323 E. 4th St., 3rd Fl / New York, NY 10003
The Daily Rind™ / www.dailyrindblog.comFacebook / @orchtweetsPrivileged And Confidential Communication.This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:I am a newbie for chef. Is there any way to disable one cookbook or role on one

That's totally possible, you'd just have to create a recipe that does that
for you.

On Tue, Oct 8, 2013 at 2:00 PM, bill zhu bill2006lky@hotmail.com wrote:

Hi, Nikhil,

Thanks for your reply. what I want is:
check a file on local FS of node, if string is disabled, role or cookbook
will not functional for this node only when chef-client running.

I can do your suggestions on chef server, but my customers want to control
it by themselves.

Regards

Bill


From: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that
cookbook/role temporarily. Once you are completed with your maintenance,
add the role/cookbook back via knife node edit
*Nikhil Shah */ System Administrator
nshah@theorchard.com drudolph@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/
Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited.
*

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:

I am a newbie for chef. Is there any way to disable one cookbook or role
on one

--
Best regards, Dmitriy V.

Bill,

May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it?

Rgds,

Siva.

From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node.

Hi, Nikhil,

Thanks for your reply. what I want is:

check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running.

I can do your suggestions on chef server, but my customers want to control it by themselves.

Regards

Bill


From: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node edit

Nikhil Shah / System Administrator

nshah@theorchard.com mailto:drudolph@theorchard.com

The Orchard® / www.theorchard.com http://www.theorchard.com/

t (+1) 212.308.5648 / f (+1) 212.201.9203

23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/
Facebook http://www.facebook.com/theorchard / @orchtweets http://www.twitter.com/orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:

I am a newbie for chef. Is there any way to disable one cookbook or role on one

Hi, Siva,

Thanks for your reply. Is there any way we can change a attribute value from node side?

Regards

Bill

Date: Wed, 9 Oct 2013 11:53:18 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: Re: temporarily disable one cookbook on one node.

Bill, May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it? Rgds,Siva. From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node. Hi, Nikhil, Thanks for your reply. what I want is:check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running. I can do your suggestions on chef server, but my customers want to control it by themselves. Regards BillFrom: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node editNikhil Shah / System Administratornshah@theorchard.com The Orchard® / www.theorchard.com t (+1) 212.308.5648 / f (+1) 212.201.920323 E. 4th St., 3rd Fl / New York, NY 10003 The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited. On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote: I am a newbie for chef. Is there any way to disable one cookbook or role on one

Bill,

An attributes can be specific to a node. You can use the UI to change to node attributes or you

can use knife[1]. I believe you can also use tags for similar purpose.

[1] https://github.com/amian84/knife-set-attribute

Rgds,

Siva.

From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 8:48 PM
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: Re: temporarily disable one cookbook on one node.

Hi, Siva,

Thanks for your reply. Is there any way we can change a attribute value from node side?

Regards

Bill


Date: Wed, 9 Oct 2013 11:53:18 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: Re: temporarily disable one cookbook on one node.

Bill,

May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it?

Rgds,

Siva.

From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node.

Hi, Nikhil,

Thanks for your reply. what I want is:

check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running.

I can do your suggestions on chef server, but my customers want to control it by themselves.

Regards

Bill


From: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node edit

Nikhil Shah / System Administrator

nshah@theorchard.com mailto:drudolph@theorchard.com

The Orchard® / www.theorchard.com http://www.theorchard.com/

t (+1) 212.308.5648 / f (+1) 212.201.9203

23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/
Facebook http://www.facebook.com/theorchard / @orchtweets http://www.twitter.com/orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:

I am a newbie for chef. Is there any way to disable one cookbook or role on one

Hi, Siva,

Thanks. I think that is what I want!

Regards

Bill

Date: Wed, 9 Oct 2013 22:20:52 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: RE: Re: temporarily disable one cookbook on one node.

Bill, An attributes can be specific to a node. You can use the UI to change to node attributes or you can use knife[1]. I believe you can also use tags for similar purpose. [1] https://github.com/amian84/knife-set-attributeRgds,Siva. From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 8:48 PM
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: Re: temporarily disable one cookbook on one node. Hi, Siva,

Thanks for your reply. Is there any way we can change a attribute value from node side?

Regards

BillDate: Wed, 9 Oct 2013 11:53:18 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: Re: temporarily disable one cookbook on one node.Bill, May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it? Rgds,Siva. From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node. Hi, Nikhil, Thanks for your reply. what I want is:check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running. I can do your suggestions on chef server, but my customers want to control it by themselves. Regards BillFrom: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node editNikhil Shah / System Administratornshah@theorchard.com The Orchard® / www.theorchard.com t (+1) 212.308.5648 / f (+1) 212.201.920323 E. 4th St., 3rd Fl / New York, NY 10003 The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited. On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote: I am a newbie for chef. Is there any way to disable one cookbook or role on one

You can also override these attributes by passing it in json file via chef-client -j

On Oct 9, 2013, at 9:54 AM, bill zhu bill2006lky@hotmail.com wrote:

Hi, Siva,

Thanks. I think that is what I want!

Regards

Bill

Date: Wed, 9 Oct 2013 22:20:52 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: RE: Re: temporarily disable one cookbook on one node.

Bill,

An attributes can be specific to a node. You can use the UI to change to node attributes or you

can use knife[1]. I believe you can also use tags for similar purpose.

[1] GitHub - amian84/knife-set-attribute: Knife set_attribute is a plugin to knife to change attributes values in your nodes

Rgds,

Siva.

From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 8:48 PM
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: Re: temporarily disable one cookbook on one node.

Hi, Siva,

Thanks for your reply. Is there any way we can change a attribute value from node side?

Regards

Bill

Date: Wed, 9 Oct 2013 11:53:18 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: Re: temporarily disable one cookbook on one node.

Bill,

May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it?

Rgds,

Siva.

From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node.

Hi, Nikhil,

Thanks for your reply. what I want is:

check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running.

I can do your suggestions on chef server, but my customers want to control it by themselves.

Regards

Bill

From: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node edit

Nikhil Shah / System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203

23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote:

I am a newbie for chef. Is there any way to disable one cookbook or role on one

Hi, Manoj,

Thanks. that way is much easier:)

Bill

CC: chef@lists.opscode.com
From: manoj.thakkar@gmail.com
Date: Wed, 9 Oct 2013 10:00:31 -0700
To: chef@lists.opscode.com
Subject: [chef] Re: RE: RE: RE: RE: RE: Re: temporarily disable one cookbook on one node.

You can also override these attributes by passing it in json file via chef-client -j

On Oct 9, 2013, at 9:54 AM, bill zhu bill2006lky@hotmail.com wrote:

Hi, Siva,

Thanks. I think that is what I want!

Regards

Bill

Date: Wed, 9 Oct 2013 22:20:52 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: RE: Re: temporarily disable one cookbook on one node.

Bill, An attributes can be specific to a node. You can use the UI to change to node attributes or you can use knife[1]. I believe you can also use tags for similar purpose. [1] https://github.com/amian84/knife-set-attributeRgds,Siva. From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 8:48 PM
To: chef@lists.opscode.com
Subject: [chef] RE: RE: RE: Re: temporarily disable one cookbook on one node. Hi, Siva,

Thanks for your reply. Is there any way we can change a attribute value from node side?

Regards

BillDate: Wed, 9 Oct 2013 11:53:18 +0530
From: siva@collab.net
To: chef@lists.opscode.com
Subject: [chef] RE: RE: Re: temporarily disable one cookbook on one node.Bill, May be wrap cookbooks with your custom code where only if a attribute for a particular node is set you it would execute it? Rgds,Siva. From: bill zhu [mailto:bill2006lky@hotmail.com]
Sent: Wednesday, October 09, 2013 2:31 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: temporarily disable one cookbook on one node. Hi, Nikhil, Thanks for your reply. what I want is:check a file on local FS of node, if string is disabled, role or cookbook will not functional for this node only when chef-client running. I can do your suggestions on chef server, but my customers want to control it by themselves. Regards BillFrom: nshah@theorchard.com
Date: Tue, 8 Oct 2013 16:59:40 -0400
To: chef@lists.opscode.com
Subject: [chef] Re: temporarily disable one cookbook on one node.

You can probably run knife node edit $nodename and disable that cookbook/role temporarily. Once you are completed with your maintenance, add the role/cookbook back via knife node editNikhil Shah / System Administratornshah@theorchard.com The Orchard® / www.theorchard.com t (+1) 212.308.5648 / f (+1) 212.201.920323 E. 4th St., 3rd Fl / New York, NY 10003 The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited. On Oct 8, 2013, at 4:05 PM, bill2006lky@hotmail.com wrote: I am a newbie for chef. Is there any way to disable one cookbook or role on one