@ Florian Hehlen,
I want to define run-level by clients attribute. For example, run-level 0 means just run the system base, run-level 1 means just install application and 2 means both. It can meet the requirement, but I need to change every cookbook to judge the run-level.
@Ranjib. My concerns on “why you don’t want to run the complete run list”.
The cookbook for application deployment is not well written, it bring downtime even deploy the package already deployed. So I don’t want to rerun it when I just add a system account which is in cookbooks belong to base.
More fast just run what you want.
From: Florian Hehlen [mailto:Florian.Hehlen@mri-group.com]
Sent: 2014年6月30日 21:36
Subject: [chef] RE: RE: Re: Chef Role and integration
I have problems similar to yours. There seems to be a gap when it comes to fine-grained application life-cycle management. I am not sure if it is a feature/weakness in the Chariot design, or something that just has not yet been explored in depth by the community.
You ask ‘why you don’t want to run the complete run list’. I can think of various reasons:
Running sub-sets of recipes when managing a test or user-acceptance environment.
Doing emergency or unplanned maintenance/upgrades in a urgent but controlled way where the goal is to do the least amount of change.
Off-cycle procedures which one might only want to run as planned event. For example: cleaning temp data or caches, or inflight upgrade of part of a system.
In the past I have read people saying that the above procedures are not what Chef is for and that I should introduce a further layer of technology such as Fabric, Rundeck, Opscode’s Push Jobs. I have issues with this idea. First of all it adds one more level of indirection, configuration, technology, language/DSL, which I can’t justify. Secondly, Chef provides a very solid/safe change/configuration management architecture, which I feel should be leveraged as much as possible.
An alternative might be to make a recipe smart enough to do certain things only when certain settings/attributes/flags are set. I think this is possible in some cases but not others. I think it’s rather inefficient/risky to have to re-release a cookbook (plus dependencies) just to handle a one-off case for example.
I tend to build some cookbooks to have recipes that represent basic execution blocks which I then can assemble into different sequences. One of these sequences will be the default one. The others will correspond to occasional use-cases. And finally the individual blocks can be used in an ad-hoc way if absolutely necessary.
I would love to hear about some experiences people have made with managing non-trivial medium sized applications with Chef.
From: Mingfei Hua [mailto:email@example.com]
Sent: 30 June 2014 08:59
Subject: [chef] RE: Re: Chef Role and integration
If I use “-o” in chef-client, Not only the run list, but also the attribute “roles” in chef server be overwritten. The integration which depend on attribute “roles” may broken.
From: Ranjib Dey [mailto:firstname.lastname@example.org]
Sent: 2014年6月29日 15:38
Subject: [chef] Re: Chef Role and integration
if you invoke chef-client with -o , the override option, it should not save the node data back (iirc). you have to check no recipes or other code does not use node.save explicitly ,
im curious why you dont want to run the complete run list (all the roles+ extra recipes), is performance (time) a concern ?
On Sat, Jun 28, 2014 at 11:20 PM, Mingfei Hua <email@example.com:firstname.lastname@example.org> wrote:
we have several roles defined for different type of servers, like DB, web, rabbitmq, redis. and the integration is depend on roles, such as how the WEB server find the DB servers. in each role, there are cookbooks or sub roles in 3 layers, there are cookbooks for system, cookbooks for install tomcat/database, cookbooks to install war packages. But in some case, I just need to run the cookbooks for system or just need to deploy the war package, the easiest way is to change the run-list, but it changes the roles attribute in chef server which integration depend on. Any tips on my issue.
A typical role definition:
“description”: “for web application deployment, include hm-webapp”,
This communication and any attached documents are strictly confidential and/or legally privileged and they may not be used or disclosed by someone who is not a named recipient. If you have received this electronic communication in error please notify the sender by replying to this electronic communication inserting the word “misdirected” as the subject and delete this communication from your system.