[chef] RE: [[chef-dev]] [chef-dev] Grouping servers for a better overview


Chronological Thread 
  • From: WEINHAPL Andreas < >
  • To: Daniel DeLeo < >
  • Cc: " " < >, " " < >
  • Subject: [chef] RE: [[chef-dev]] [chef-dev] Grouping servers for a better overview
  • Date: Fri, 11 Mar 2011 15:51:36 +0100
  • Accept-language: en-US, fr-FR
  • Acceptlanguage: en-US, fr-FR

Hi,

Many thanks for your reply! I will help me a lot J It is soooo easy :D

regards

 

From: Daniel DeLeo [mailto: On Behalf Of Daniel DeLeo
Sent: Dienstag, 08. März 2011 17:21
To: WEINHAPL Andreas
Cc: ;
Subject: Re: [[chef-dev]] [chef] [chef-dev] Grouping servers for a better overview

 

On Monday, March 7, 2011 at 11:32 PM, WEINHAPL Andreas wrote:

So I will describe it a little bit. In our environment we don’t have only Windos / Ubuntu/Debian /RH servers (just like you J ). So my problem is that we want to create a maintenance role for updating these servers! But here is the problem. If you see the server name doesn’t describe the function or the OS running on it. Is there a way to create “server-groups” which include only windows servers or something like this because with these groups we can easily put a the correct “maintenance-role” (cookbooks for maintenance) to them if they are needed.

Probably the best way to go about this is to have a single maintenance cookbook which will selectively include recipes based on platform. It'd look something like this:

 

    case node.platform

    when :debian

      include_recipe("maintenance::debian")

    when :ubuntu

      include_recipe("mainentance::ubuntu")

    else

      # ...

    end

 

The other option, if you already have the nodes in chef, is to use shef or a knife exec script to search for the nodes by platform and edit their run lists programmatically. There's a bit of documentation here: http://wiki.opscode.com/display/chef/Shef#Shef-ManagingChefServerwithShef but the most comprehensive documentation is available by running shef and using the `help` command. In particular, you want to use the `nodes.transform` command.

 

 

 

Best regards

Andreas Weinhapl

HTH,

 

-- 
Dan DeLeo

 




Archive powered by MHonArc 2.6.16.

§