[chef] Re: Snowflake attributes


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Snowflake attributes
  • Date: Tue, 29 Oct 2013 10:00:52 -0700

will it be possible to control both the apps from single role, where the main role is composed of two sub roles, and each of the sub role uses the parent port attribute to derive a new port number and then used that number against the underlying recipe. we encounter such situations in scheduling crons or other background jobs (e.g. performing log rotations for high volume files on ext3), where we dont want them to run at same time. some time its more complex and involves multi node setup (e.g. you can have multiple cassandra nodes, and you dont want to run the repair jobs at same time). this is not very elegant, but with sufficient specs, it works predictably

best
ranjib


On Tue, Oct 29, 2013 at 9:17 AM, < " target="_blank"> > wrote:
Hi everyone,

I am fairly experienced with Chef and always try to follow the rule to not
create 'snowflake' nodes and to put all attributes in a
role/environment/databag.

What if I want to setup more than one application server on the same machine?
My setup would be to create 2 chef nodes for the same machine and configure
them each separately, but I can't use the same role because of port collisions.

Some possible solutions,

 * Create X roles if we need X servers on a single machine
 * Don't put multiple servers on the same machine
 * Use node attributes
 * Have cookbook select free ports

The best solution to seems to be 'Don't put multiple servers on the same
machine', but while I want that for other reasons then this problem it is
outside my control.

'Create X roles if we need X servers on a single machine' and 'Use node
attributes' are both obviously bad but work.

'Have cookbook select free ports', seems like it could have merit but could
complicate the deployment.

Any thoughts?




Archive powered by MHonArc 2.6.16.

§