Look at Chef push jobs
https://docs.chef.io/push_jobs.html. You can setup an algorithm to search all your front end machines, then iterate through your search results to
front_end_machines.each do |fe| knife job start “cookbook_to_restart_machine” fe end Chris From: Rafał Radecki [mailto:
Hi Everyone :) I have a set of frontend machines with a loadbalancer on top of them. There is a need to restart a service on all of them once a new delivery package comes. I now how to do this but I do not know how to force chef to perform the restart
on one node at a time FOR SURE. Loadbalancer can be asked for the status of all frontends and a decision which frontend should be made based on returned info but there is a possibility for race conditions in this case. Have you done something similar? What do you propose? BR, Rafal. |
Archive powered by MHonArc 2.6.16.