[chef] Re: Newbie on autoscaling with Chef


Chronological Thread 
  • From: Ryutaro YOSHIBA < >
  • To: " " < >
  • Cc: " " < >
  • Subject: [chef] Re: Newbie on autoscaling with Chef
  • Date: Tue, 26 Nov 2013 20:03:08 +0900

Hi,

I've just wrote sample code which let new servers register automatically to chef server and deregister when instances are terminated.

When creating autoscaling, you can set user_data at launch configuration and if user_data is set and user_data starts with #!, cloud-init will execute this user_data as executable script.

Another point is that it is not good to store validation key in the AMI. I recommend you to set IAM role to instances(which can be set at launch configuration) and you can get validation key from S3 bucket.

--
Ryutaro YOSHIBA

On 2013/11/26, at 19:25, James Crosswell < "> > wrote:

I'd like to use Chef to manage an application hosted on Amazon's EC2 platform. There are three "components" to the appliction:
  1. Web application
  2. Database server
  3. Background worker/application
I'd like to have the 3rd component (background worker) automatically scale based on CPU usage. So there might be one permanent background worker, but if CPU levels on that worker remained above x% for over y seconds then a couple of extra background workers would automatically be powered up. Similarly, if CPU levels dropped below z% for y seconds, a couple of background workers would automatically be terminated.

I think a major piece of the puzzle that is missing for me is how to register new instances as nodes with the Chef server along with the necessary cookbooks. All of the stuff I've read on using chef so far appears to assume a static list of nodes that are being managed manually from a workstation. What I'd like to do is have new nodes (not necessarily workstations) register themselves to be configured by Chef... and also drop off the list of managed nodes when they are terminated.

Is this possible using Chef?

Kind Regards,

James Crosswell
Founder | Tea Boy



Archive powered by MHonArc 2.6.16.

§