- From: Morgan Blackthorne <
>
- To:
- Subject: [chef] Re: Re: Best practices for autoscaling nodes?
- Date: Mon, 23 Jul 2012 12:23:13 -0700
Thanks, I just read that.
So basically, you set it up to bootstrap Chef each time using the userdata. When customizing an AMI at an ops level, wouldn't it make more sense to do something along the lines of:
- install chef-client and get it configured to talk to Chef, with your validation key
- disable chef-client from running at boot time
- create a script that runs from rc.local to delete & reconfigure the client.rb file, and then start chef-client with the bootstrap.json file
- build the AMI
I'm newish to this, but I'm thinking that the less you need to change when spinning up an instance, the better. And doing it this way, if you need to push user-data to the instance (which I do for our nightly Selenium testing), it doesn't interfere with that at all.
Thoughts? I want to make sure I'm not missing something before I go down this road...
~*~ StormeRider ~*~
"With hearts immortal, we stand before our lives
A soul against oblivion, forever asking why
This upside down symphony in a paradox called life
Our hearts immortal
What you give to love, will never die"
On Mon, Jul 23, 2012 at 6:00 AM, Edward Sargisson
<
" target="_blank">
> wrote:
I wrote a blog post on how to do this *way back*. I still use the technique today.
The short answer is that you use your OS' AWS bootstrap code to write your node_name to /etc/chef/client.rb based on the AWS instance id.
Cheers,
Edward
On Sun, Jul 22, 2012 at 8:21 PM, Morgan Blackthorne
<
" target="_blank">
> wrote:
I was wondering what the best practice is for dealing with nodes on AWS that are set up to autoscale. Right now I have a CMS cluster that autoscales and all of the nodes identify themselves to the Chef server as the same node (since the contents of /etc/chef are identical on all of the nodes).
I'm guessing that this isn't the best practice, but I'm not sure how to set up the nodes so that they autoregister with the chef server and request a given role when doing so (I'm still getting up to speed on this install that my former cosysadmin configured). Ideally I'd like to be able to use "knife ssh" with the various client nodes down the road, and if multiple nodes are appearing as one, that's not really going to have the desired effect.
Thanks,
Morgan.
Archive powered by MHonArc 2.6.16.