Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

You can, for example, to deploy an an Auto Scaling groups consists of web severs, ELB and DB using AWS CloudFormation (with Chef server):

But, you need to initially create a CF template, is it possible to do it only using Chef Server and Knife? We don't want to rely much on the CloudFormation and seems the hosted Chef server at ( is able to do so.

Any opensource alternative?


share|improve this question
I don't think I understand the question. Are you trying to use AutoScaling without CloudFormation? – Mike Fiedler Apr 26 '12 at 13:03
@MikeFiedler, yes, you are right. Like what you can do inside the hosted chef. – Ryan May 3 '12 at 4:50
up vote 4 down vote accepted

You can auto scale your EC2 instance. Check this post, but before doing it have read this discussion. I am currently using chef for configure my ec2 instaces and cloudformation for amazon resources set up. Recetly CloudFormation has integrated chef. I am using Cloud formation and chef both and it works well for me.

share|improve this answer

You could use the knife ec2 plugin to create and delete ec2 instances, but it won't create the full range of resources (ELB, Route 53 RecordSet, security groups, etc.) that you can use cloud formation to support. So you would either need to create these manually, or build your own policy based scaling code that would respond to alerts by your monitoring infrastructure that would cause ec2 instances to be provisioned and de-provisioned using chef.

There is also a knife cfn plugin that allows you to create and delete cloud formation stacks using knife.

If you are relying on AWS, I think cloud formation templates will help you orchestrate your chef deployments nicely. Beyond that, the templates fit nicely into the "infrastructure as code" mantra. Using Chef your infrastructure will be specified in code. It would be a shame to keep all the scaling policies which could be turned into code/CFN templates out of your source code control system. The template format has also been adopted by third parties such as Cloudsidekick so it could be relevant for deploying to other cloud providers beyond AWS.

share|improve this answer

From I have gleaned, you should be able to do this:

Create a custom AMI that has chef-client installed, and have your organization's validation cert, but not a client cert, that will auto-register on the first invocation of chef-client, and register the new node.

Use this custom AMI with a new Auto Scaling Launch Config, and then proceed with the rest of regular Auto Scaling steps.

The challenge, I think, is how do you have a newly created and registered instance inform Chef Server that "I want to be a new type of XXXX server". It doesn't look like there's a flag from chef-client to send that to chef server, and automatically associate itself with roles, etc.

So it seems that Auto Scaling can indeed be done without the use of a CloudFormation template, I just don't see how the Auto Scaling would work with Chef.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.