Pergunta

I'm trying to automate our CI process for a couple of .NET apps, and in a perfect world I'd like to spin up a Windows EC2 instance for each, bootstrap the instance to install Chef Solo and then execute a Chef recipe to install some dependencies and the packaged software itself.

However - I'm a novice and have no idea even if that is feasible let alone where to start :)

I'm fairly well versed with the command line tools for AWS so can spin up an AMI ok, but beyond that point I'm pretty stuck. I would like to avoid building a custom AMI with chef pre-installed as that takes a lot of the advantages away.

I think this is essentially what I need to do - but is (unsurprisingly) focused on Linux:

http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/

Does anyone have a link to someone who has done this or similar before? Or a better way of achieving what I'd like to do?

Any help appreciated.

Foi útil?

Solução

Okay, this requires that you have Chef preinstalled on your AMI:

http://scottwb.com/blog/2012/12/13/provision-and-bootstrap-windows-ec2-instances-with-chef/

But this is a strategy for installing Puppet to a stock Windows AMI, which could easily be modified for Chef:

http://dansrandombits.blogspot.com/2012/06/bootstrapping-custom-windows-ec2.html

I can't say I've done this yet, but I've both in my bookmarks bar since they was posted and have been planning on giving it a shot in at least our dev environment at some point. It seems like as long as there's a solid silent install for Chef, you could pull this off.

Outras dicas

I realize this post is a bit old, but for those that still may come across this. I'm provisioning servers using Chef-Solo. Essentially I configure the User-Data of the instance to download and install Chef, download the cookbooks/recipes, and then launch Chef-Solo.

Here's a blog post I've made to demonstrate the steps: http://thesysadminswatercooler.blogspot.com/2015/11/aws-bootstrap-windows-ec2-instance-with.html

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top