[chef] Re: Re: Re: Bootstrapping a lot of nodes


Chronological Thread 
  • From: "ameirh ." < >
  • To:
  • Subject: [chef] Re: Re: Re: Bootstrapping a lot of nodes
  • Date: Wed, 21 May 2014 18:01:15 -0400

Ranjib, if you have a template and install the file on the 10 nodes, they will each be bootstrapped at boot time.  You would place the file in /etc/init.d, chmod +x it, and enable it via chkconfig/update-rc.d in your template.  You can also run it manually with `service chef-initstrap start`.

If all of your nodes are identical, this would work well, but if you have different run lists, you'd have to rinse and repeat this process if you keep the script as-is.  You could expand it further to, for example, use AWS user data/metadata, or contact some other external source for the config options; they don't necessarily have to be defined in the script.  It's pretty much as flexible as your coding abilities will allow.

Hope that helps!

-Ameir


On Wed, May 21, 2014 at 4:07 PM, Ranjib Dey < " target="_blank"> > wrote:
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 . < " target="_blank"> > 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.

Thanks,
Ameir


On Wed, May 21, 2014 at 1:00 PM, " target="_blank"> < " target="_blank"> > wrote:

Hi,

  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?

 

Thanks

Chris







Archive powered by MHonArc 2.6.16.

§