# Cloud Deployments

**URL:** https://discourse.chef.io/t/cloud-deployments/2947
**Category:** Chef Infra (archive)
**Created:** [July 23, 2012, 2:12pm UTC](https://discourse.chef.io/t/cloud-deployments/2947 "2012-07-23T14:12:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Torben\_Knerr](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@Torben\_Knerr](https://discourse.chef.io/u/Torben_Knerr)
#### Post date: [July 23, 2012, 2:12pm UTC](https://discourse.chef.io/t/cloud-deployments/2947/1 "2012-07-23T14:12:59Z")

</div>

Hey guys,

do you have recommendations for a tool that can spin up new  
chef-managed vm instances in AWS and provision them using Chef solo?

My first thought was using the ec2-tools and knife-solo[1], but then I  
was looking for a more “integrated” approach. For that mccloud[2] and  
vagrant-aws[3] look appealing to me.

Would you recoommend either of them or do you have suggestions for other tools?

Thanks a lot,  
Torben

[1] [https://github.com/matschaffer/knife-solo](https://github.com/matschaffer/knife-solo)  
[2] [https://github.com/jedi4ever/mccloud](https://github.com/jedi4ever/mccloud)  
[3] [https://github.com/mlinderm/vagrant-aws](https://github.com/mlinderm/vagrant-aws)

---

<div class="post-metadata">

### Author: ![Torben\_Knerr](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@Torben\_Knerr](https://discourse.chef.io/u/Torben_Knerr)
#### Post date: [July 23, 2012, 2:16pm UTC](https://discourse.chef.io/t/cloud-deployments/2947/2 "2012-07-23T14:16:13Z")

</div>

P.S.: from reading the wiki page it appeared to me as knife-ec2 would  
be tied to Chef Server usage. True?  
[http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)

On Mon, Jul 23, 2012 at 4:12 PM, Torben Knerr [ukio@gmx.de](mailto:ukio@gmx.de) wrote:

> Hey guys,
> 
> do you have recommendations for a tool that can spin up new  
> chef-managed vm instances in AWS and provision them using Chef solo?
> 
> My first thought was using the ec2-tools and knife-solo[1], but then I  
> was looking for a more "integrated" approach. For that mccloud[2] and  
> vagrant-aws[3] look appealing to me.
> 
> Would you recoommend either of them or do you have suggestions for other tools?
> 
> Thanks a lot,  
> Torben
> 
> [1] [GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas](https://github.com/matschaffer/knife-solo)  
> [2] [GitHub - jedi4ever/mccloud: Vagrant for the cloud](https://github.com/jedi4ever/mccloud)  
> [3] [GitHub - mlinderm/vagrant-aws: Plugin for Vagrant for working with Amazon AWS](https://github.com/mlinderm/vagrant-aws)

---

<div class="post-metadata">

### Author: ![adfasdfasdfasdf](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@adfasdfasdfasdf](https://discourse.chef.io/u/adfasdfasdfasdf)
#### Post date: [July 23, 2012, 6:16pm UTC](https://discourse.chef.io/t/cloud-deployments/2947/3 "2012-07-23T18:16:36Z")

</div>

On 23/07/2012 15:16, Torben Knerr wrote:

> P.S.: from reading the wiki page it appeared to me as knife-ec2 would  
> be tied to Chef Server usage. True?  
> [http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)
> 
> On Mon, Jul 23, 2012 at 4:12 PM, Torben Knerr[ukio@gmx.de](mailto:ukio@gmx.de) wrote:
> 
> > Hey guys,
> > 
> > do you have recommendations for a tool that can spin up new  
> > chef-managed vm instances in AWS and provision them using Chef solo?
> > 
> > My first thought was using the ec2-tools and knife-solo[1], but then I  
> > was looking for a more "integrated" approach. For that mccloud[2] and  
> > vagrant-aws[3] look appealing to me.
> > 
> > Would you recoommend either of them or do you have suggestions for other tools?
> > 
> > Thanks a lot,  
> > Torben
> > 
> > [1] [GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas](https://github.com/matschaffer/knife-solo)  
> > [2] [GitHub - jedi4ever/mccloud: Vagrant for the cloud](https://github.com/jedi4ever/mccloud)  
> > [3] [GitHub - mlinderm/vagrant-aws: Plugin for Vagrant for working with Amazon AWS](https://github.com/mlinderm/vagrant-aws)  
> > We're looking at the same thing at the moment and we've gone with AWS  
> > CloudFormation. There's a whitepaper on it from Amazon here:  
> > [https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf](https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf)

That's from this page:

> **[AWS CloudFormation Developer Resources](https://aws.amazon.com/cloudformation/resources/)**

Various templates are available here:

> **[CloudFormation Templates](https://aws.amazon.com/cloudformation/resources/templates/)**

That's not to say the tools you've mentioned won't work, but I've not  
used them.

Cheers  
Nick

---

<div class="post-metadata">

### Author: ![johnmartinez](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/johnmartinez/32/558_2.png) [@johnmartinez](https://discourse.chef.io/u/johnmartinez)
#### Post date: [July 23, 2012, 6:37pm UTC](https://discourse.chef.io/t/cloud-deployments/2947/4 "2012-07-23T18:37:04Z")

</div>

We also use CloudFormation with Autoscaler for deploying Hosted Chef  
managed instances in AWS. The biggest issues are:

- Chef bootstrap, since you can't use any of the knife bootstrap methods  
to launch instances
- Dealing with the Chef validation key
- Dealing with encrypted data bag secrets

We use a combination of EC2 instance metadata (user-data), custom bootstrap  
scripts and policy-secured S3 buckets to make this all work.

-john

On Mon, Jul 23, 2012 at 11:16 AM, Nick Peirson [nickpeirson@gmail.com](mailto:nickpeirson@gmail.com)wrote:

> On 23/07/2012 15:16, Torben Knerr wrote:
> 
> > P.S.: from reading the wiki page it appeared to me as knife-ec2 would  
> > be tied to Chef Server usage. True?  
> > [http://wiki.opscode.com/\*\*display/chef/Launch+Cloud+](http://wiki.opscode.com/**display/chef/Launch+Cloud+)\*\*  
> > Instances+with+Knife[http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)
> > 
> > On Mon, Jul 23, 2012 at 4:12 PM, Torben Knerr[ukio@gmx.de](mailto:ukio@gmx.de) wrote:
> > 
> > > Hey guys,
> > > 
> > > do you have recommendations for a tool that can spin up new  
> > > chef-managed vm instances in AWS and provision them using Chef solo?
> > > 
> > > My first thought was using the ec2-tools and knife-solo[1], but then I  
> > > was looking for a more "integrated" approach. For that mccloud[2] and  
> > > vagrant-aws[3] look appealing to me.
> > > 
> > > Would you recoommend either of them or do you have suggestions for other  
> > > tools?
> > > 
> > > Thanks a lot,  
> > > Torben
> > > 
> > > [1] [https://github.com/\*\*matschaffer/knife-solo](https://github.com/**matschaffer/knife-solo)[https://github.com/matschaffer/knife-solo](https://github.com/matschaffer/knife-solo)  
> > > [2] [https://github.com/jedi4ever/\*\*mccloud](https://github.com/jedi4ever/**mccloud)[https://github.com/jedi4ever/mccloud](https://github.com/jedi4ever/mccloud)  
> > > [3] [https://github.com/mlinderm/\*\*vagrant-aws](https://github.com/mlinderm/**vagrant-aws)[https://github.com/mlinderm/vagrant-aws](https://github.com/mlinderm/vagrant-aws)
> > 
> > We're looking at the same thing at the moment and we've gone with AWS  
> > CloudFormation. There's a whitepaper on it from Amazon here:  
> > [https://s3.amazonaws.com/\*\*cloudformation-examples/](https://s3.amazonaws.com/**cloudformation-examples/)\*\*  
> > IntegratingAWSCloudFormationWi\*\*thOpscodeChef.pdf[https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf](https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf)
> 
> That's from this page:  
> [http://aws.amazon.com/\*\*cloudformation/aws-\*\*cloudformation-articles-and-](http://aws.amazon.com/ **cloudformation/aws-** cloudformation-articles-and-)\*  
> \*tutorials/[http://aws.amazon.com/cloudformation/aws-cloudformation-articles-and-tutorials/](http://aws.amazon.com/cloudformation/aws-cloudformation-articles-and-tutorials/)
> 
> Various templates are available here:  
> [http://aws.amazon.com/\*\*cloudformation/aws-\*\*cloudformation-templates/](http://aws.amazon.com/ **cloudformation/aws-** cloudformation-templates/)[http://aws.amazon.com/cloudformation/aws-cloudformation-templates/](http://aws.amazon.com/cloudformation/aws-cloudformation-templates/)
> 
> That's not to say the tools you've mentioned won't work, but I've not used  
> them.
> 
> Cheers  
> Nick

---

<div class="post-metadata">

### Author: ![adfasdfasdfasdf](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@adfasdfasdfasdf](https://discourse.chef.io/u/adfasdfasdfasdf)
#### Post date: [July 24, 2012, 10:09am UTC](https://discourse.chef.io/t/cloud-deployments/2947/5 "2012-07-24T10:09:35Z")

</div>

On 23/07/2012 19:37, John Martinez wrote:

> We also use CloudFormation with Autoscaler for deploying Hosted Chef  
> managed instances in AWS. The biggest issues are:
> 
> - Chef bootstrap, since you can't use any of the knife bootstrap  
> methods to launch instances
> - Dealing with the Chef validation key
> - Dealing with encrypted data bag secrets
> 
> We use a combination of EC2 instance metadata (user-data), custom  
> bootstrap scripts and policy-secured S3 buckets to make this all work.
> 
> -john  
> I'd be interested to here how you do ongoing application deployments to  
> your application servers. We've developed our template to the point the  
> initial deployment works well and scales. Looking at deploying new  
> versions of our application code to our server we've come up with  
> suspending autoscaling on our app servers, deploying using capistrano  
> with the capify\_cloud plugin (previously capify\_ec2), then resuming  
> scaling. This prevents the race condition where new instances are  
> started mid deployment and we'd get a mix of code versions deployed.

We've looked at a few alternatives such as starting a new stack and  
switching DNS entries to that, however we're using RDS which is part of  
the stack, so we'd lose data. We've also looked at creating new auto  
scaling groups and launch configs within the template and updating the  
stack with the new template, but there's no way to enforce (that I can  
see) that the new AS group is up and running and attached to the ELB  
before the old one is removed.

The solution we've got works, however I don't think it's very slick and  
I'd like to reduce the moving parts where possible.

Cheers  
Nick

---

<div class="post-metadata">

### Author: ![Torben\_Knerr](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@Torben\_Knerr](https://discourse.chef.io/u/Torben_Knerr)
#### Post date: [July 30, 2012, 5:54am UTC](https://discourse.chef.io/t/cloud-deployments/2947/6 "2012-07-30T05:54:44Z")

</div>

Hi Nick, John,

thanks for the responses!

I'm giving Mccloud a try now. I like it because it is just as awesome  
as Vagrant is, and supports Chef Solo and Puppet standalone.

CloudFormation is too overkill for my use case (single VM), but  
interestingly Mccloud supports the definition of stacks based on  
CloudFormation templates as well...

Cheers,  
Torben

On Mon, Jul 23, 2012 at 8:37 PM, John Martinez [john@johnmartinez.com](mailto:john@johnmartinez.com) wrote:

> We also use CloudFormation with Autoscaler for deploying Hosted Chef managed  
> instances in AWS. The biggest issues are:
> 
> Chef bootstrap, since you can't use any of the knife bootstrap methods to  
> launch instances  
> Dealing with the Chef validation key  
> Dealing with encrypted data bag secrets
> 
> We use a combination of EC2 instance metadata (user-data), custom bootstrap  
> scripts and policy-secured S3 buckets to make this all work.
> 
> -john
> 
> On Mon, Jul 23, 2012 at 11:16 AM, Nick Peirson [nickpeirson@gmail.com](mailto:nickpeirson@gmail.com)  
> wrote:
> 
> > On 23/07/2012 15:16, Torben Knerr wrote:
> > 
> > > P.S.: from reading the wiki page it appeared to me as knife-ec2 would  
> > > be tied to Chef Server usage. True?  
> > > [http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)
> > > 
> > > On Mon, Jul 23, 2012 at 4:12 PM, Torben Knerr[ukio@gmx.de](mailto:ukio@gmx.de) wrote:
> > > 
> > > > Hey guys,
> > > > 
> > > > do you have recommendations for a tool that can spin up new  
> > > > chef-managed vm instances in AWS and provision them using Chef solo?
> > > > 
> > > > My first thought was using the ec2-tools and knife-solo[1], but then I  
> > > > was looking for a more "integrated" approach. For that mccloud[2] and  
> > > > vagrant-aws[3] look appealing to me.
> > > > 
> > > > Would you recoommend either of them or do you have suggestions for other  
> > > > tools?
> > > > 
> > > > Thanks a lot,  
> > > > Torben
> > > > 
> > > > [1] [GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas](https://github.com/matschaffer/knife-solo)  
> > > > [2] [GitHub - jedi4ever/mccloud: Vagrant for the cloud](https://github.com/jedi4ever/mccloud)  
> > > > [3] [GitHub - mlinderm/vagrant-aws: Plugin for Vagrant for working with Amazon AWS](https://github.com/mlinderm/vagrant-aws)
> > 
> > We're looking at the same thing at the moment and we've gone with AWS  
> > CloudFormation. There's a whitepaper on it from Amazon here:
> > 
> > [https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf](https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf)
> > 
> > That's from this page:
> > 
> > [AWS CloudFormation Developer Resources](http://aws.amazon.com/cloudformation/aws-cloudformation-articles-and-tutorials/)
> > 
> > Various templates are available here:  
> > [http://aws.amazon.com/cloudformation/aws-cloudformation-templates/](http://aws.amazon.com/cloudformation/aws-cloudformation-templates/)
> > 
> > That's not to say the tools you've mentioned won't work, but I've not used  
> > them.
> > 
> > Cheers  
> > Nick

---

<div class="post-metadata">

### Author: ![John\_E\_Vincent\_lusis](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@John\_E\_Vincent\_lusis](https://discourse.chef.io/u/John_E_Vincent_lusis)
#### Post date: [July 31, 2012, 11:08am UTC](https://discourse.chef.io/t/cloud-deployments/2947/7 "2012-07-31T11:08:47Z")

</div>

On Mon, Jul 23, 2012 at 2:37 PM, John Martinez [john@johnmartinez.com](mailto:john@johnmartinez.com) wrote:

> We also use CloudFormation with Autoscaler for deploying Hosted Chef managed  
> instances in AWS. The biggest issues are:
> 
> Chef bootstrap, since you can't use any of the knife bootstrap methods to  
> launch instances

Not entirely true. Knife bootstraps are all custom templates anyway.  
Nothing says you can't use a custom bootstrap template that just calls  
chef-solo instead of chef-client.

> Dealing with the Chef validation key  
> Dealing with encrypted data bag secrets
> 
> We use a combination of EC2 instance metadata (user-data), custom bootstrap  
> scripts and policy-secured S3 buckets to make this all work.
> 
> -john
> 
> On Mon, Jul 23, 2012 at 11:16 AM, Nick Peirson [nickpeirson@gmail.com](mailto:nickpeirson@gmail.com)  
> wrote:
> 
> > On 23/07/2012 15:16, Torben Knerr wrote:
> > 
> > > P.S.: from reading the wiki page it appeared to me as knife-ec2 would  
> > > be tied to Chef Server usage. True?  
> > > [http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)
> > > 
> > > On Mon, Jul 23, 2012 at 4:12 PM, Torben Knerr[ukio@gmx.de](mailto:ukio@gmx.de) wrote:
> > > 
> > > > Hey guys,
> > > > 
> > > > do you have recommendations for a tool that can spin up new  
> > > > chef-managed vm instances in AWS and provision them using Chef solo?
> > > > 
> > > > My first thought was using the ec2-tools and knife-solo[1], but then I  
> > > > was looking for a more "integrated" approach. For that mccloud[2] and  
> > > > vagrant-aws[3] look appealing to me.
> > > > 
> > > > Would you recoommend either of them or do you have suggestions for other  
> > > > tools?
> > > > 
> > > > Thanks a lot,  
> > > > Torben
> > > > 
> > > > [1] [GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas](https://github.com/matschaffer/knife-solo)  
> > > > [2] [GitHub - jedi4ever/mccloud: Vagrant for the cloud](https://github.com/jedi4ever/mccloud)  
> > > > [3] [GitHub - mlinderm/vagrant-aws: Plugin for Vagrant for working with Amazon AWS](https://github.com/mlinderm/vagrant-aws)
> > 
> > We're looking at the same thing at the moment and we've gone with AWS  
> > CloudFormation. There's a whitepaper on it from Amazon here:
> > 
> > [https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf](https://s3.amazonaws.com/cloudformation-examples/IntegratingAWSCloudFormationWithOpscodeChef.pdf)
> > 
> > That's from this page:
> > 
> > [AWS CloudFormation Developer Resources](http://aws.amazon.com/cloudformation/aws-cloudformation-articles-and-tutorials/)
> > 
> > Various templates are available here:  
> > [http://aws.amazon.com/cloudformation/aws-cloudformation-templates/](http://aws.amazon.com/cloudformation/aws-cloudformation-templates/)
> > 
> > That's not to say the tools you've mentioned won't work, but I've not used  
> > them.
> > 
> > Cheers  
> > Nick
