Reputation: 453
How can a rolling restart of a cluster be handled through chef where change done on one of the node of cluster will lead to restarting/reconfiguration of other nodes in a cluster in a specific sequence.
Is it ideal to initiate remote shh connections from inside a recipe running on one node to other nodes of a cluster to do such reconfiguration?
Upvotes: 1
Views: 677
Reputation: 3836
You can do so by using some state. chef-dominodes does so with help of databags
dominodes 'rolling_apache_restarts'
recipe do
execute 'service apache2 restart'
end
action :nothing
end
Upvotes: 1
Reputation: 37580
By default, the chef clients check in at different times (in a repeating interval). Therefore, usually the apply the changes at different times.
There is no coordination built in that would trigger the chef-client runs (e.g. triggered by a push job) in a coordinated way.
Upvotes: 1