Run chef-client parallely in various nodes


#1

Greetings Masters

What is the best way to run chef-client remotely in multiple nodes parallely? Some of my nodes are windows and others are Linux.

Regards
Manish Mehra


#2

I am still waiting for your kind response. If there is no in-built feature then please suggest a hack.


#3

For linux nodes you can knife ssh. For windows nodes you can knife winrm. If you can’t script between the two, you may want to look into push jobs.


#4

My nodes are windows. Seems like push jobs is not available for Chef High Availability. And knife winrm is having trouble fixing this issue: https://github.com/chef/knife-windows/issues/348.


#5

We use serf(https://www.serf.io/) and a homegrown tool called Blender (https://github.com/pagerduty/blender) for orchestrating chef run across the fleet. We run it exclusively on Linux, but I think it will work for you as well. You may not need the blender layer, and just serf event handler or consul watch might suffice.


#6

Thanks @Ranjib. I am looking into serf.
Could you please tell how does it executes chef-client remotely?


#7

Read up on serf event handler :slight_smile: . Docs are pretty solid. Only extra thing i’ll suggest is to use serfx::async job style module that executes chef-client in background… so that serf communication is not blocked during chef client run


#8

Thanks a lot @Ranjib. This looks really cool. I am already excited about this tool.