简体   繁体   English

使用Chef Solo配置Windows EC2实例并引导它

[英]Using Chef Solo to provision a Windows EC2 instance and bootstrap it

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. 我正在尝试为几个.NET应用程序自动执行CI过程,在一个完美的世界中,我想为每个实例启动一个Windows EC2实例,引导实例来安装Chef Solo,然后执行Chef配方到安装一些依赖项和打包的软件本身。

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. 我对AWS的命令行工具非常熟悉,所以可以启动AMI,但是超过这一点我很困难。 I would like to avoid building a custom AMI with chef pre-installed as that takes a lot of the advantages away. 我想避免使用预先安装的厨师来构建自定义AMI,因为这会带来很多优势。

I think this is essentially what I need to do - but is (unsurprisingly) focused on Linux: 我认为这基本上是我需要做的 - 但是(不出所料)专注于Linux:

http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/ 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. 任何帮助赞赏。

Okay, this requires that you have Chef preinstalled on your AMI: 好的,这要求您在AMI上预装了Chef:

http://scottwb.com/blog/2012/12/13/provision-and-bootstrap-windows-ec2-instances-with-chef/ 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: 但是, 是安装木偶A股的Windows AMI,这很容易对厨师进行修改的策略:

http://dansrandombits.blogspot.com/2012/06/bootstrapping-custom-windows-ec2.html 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. 似乎只要有一个坚实的无声安装为厨师,你可以把它拉下来。

I realize this post is a bit old, but for those that still may come across this. 我意识到这篇文章有点陈旧,但对于那些仍然可能会遇到这个问题的人来说。 I'm provisioning servers using Chef-Solo. 我使用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. 基本上我配置实例的用户数据来下载和安装Chef,下载cookbook / recipes,然后启动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 这是我用来演示步骤的博客文章: http//thesysadminswatercooler.blogspot.com/2015/11/aws-bootstrap-windows-ec2-instance-with.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM