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
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.