Grouping servers for a better overview


#1

Hi,

I just want to create this:
[cid:image001.png@01CBDD6A.AB5F9130]
So I will describe it a little bit. In our environment we don’t have only Windos / Ubuntu/Debian /RH servers (just like you :slight_smile: ). 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.

Best regards
Andreas Weinhapl


#2

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


#3

Hi,
Many thanks for your reply! I will help me a lot :slight_smile: It is soooo easy :smiley:
regards

From: Daniel DeLeo [mailto:ddeleo@kallistec.com] On Behalf Of Daniel DeLeo
Sent: Dienstag, 08. März 2011 17:21
To: WEINHAPL Andreas
Cc: chef@lists.opscode.com; chef-dev@lists.opscode.com
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 :slight_smile: ). 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