For what it’s worth, I’ve done some work like this using cloud-init and handing each node a shell script that has what run-list and other parameters I want for each node. You can take your pseudocode for such a script directly from knife’s bootstrap steps if you like.
Martin B. Smith, firstname.lastname@example.org:email@example.com
From: Ranjib Dey [firstname.lastname@example.org]
Sent: Wednesday, May 21, 2014 3:07 PM
Subject: [chef] Re: Re: Bootstrapping a lot of nodes
who triggers chef-initstrap ? how you spawn a cluster of say 10 nodes? what if some them requires different runlist, currently its hard coded in your script.
On Wed, May 21, 2014 at 12:34 PM, ameirh . <email@example.com:firstname.lastname@example.org> wrote:
I think the best way to accomplish this is to trigger the bootstrap from the node itself, rather than spawn off a ton of knife commands en masse. chef-client 11.12.x supports the -r parameter, which allows you to specify the run list.
I achieve this in my projects by creating a template that has an init script that triggers the chef-client run. A gist of what I use is at https://github.com/ameir/chef-initstrap if you want to adapt it for your needs. It’s been working well for us thus far.
On Wed, May 21, 2014 at 1:00 PM, ChristopherHall@air-watch.commailto:ChristopherHall@air-watch.com <ChristopherHall@air-watch.commailto:ChristopherHall@air-watch.com> wrote:
We have a requirement soon to add several hundred nodes to our OpenSource Chef server. My question is: does anyone know a good way to handle this?
I’ve googled quite a lot and cannot find much info about do a ‘mass bootstrapping’.
I will have a list of Environments and the nodes contained within those environments, and I suspect with a little ruby code I could get a script together to parse a file containing this information and bootstrap nodes appropriately, but this seems a little inelegant.
Are there tools out there to help? Anyone devise a good method to do this?