在Windows上似乎缺少股票自举过程。
It seems that the stock bootstrapping process is a bit lacking on Windows.
Linux具有cloud-init,它将安装软件包,存储文件并运行bash脚本。
Linux has cloud-init which will install packages, store files, and run a bash script from user data.
Windows具有ec2config,但是当前不支持在系统就绪时运行cmd或powershell脚本,这意味着所有初始重新启动完成。
Windows has ec2config but there is currently no support to run a cmd or powershell script when the system is "ready"--meaning that all the initial reboots are completed.
似乎有第三方选择。例如,RightScale具有执行此功能的RightLink代理。
There seem to be third party options. For example RightScale has the RightLink agent which performs this function.
是否有可用的开源选项? 是否有计划将此功能添加到Ec2Config? 我必须建立自己的自我吗?
Are there open source options available? Are there any plans to add this feature to Ec2Config? Do I have to build this my self?
我错过了什么吗?
推荐答案从 2012年4月11日更新。
文档尚未更新,因此很难告诉它是否支持PowerShell或仅支持cmd.exe脚本。我已经在AWS论坛上发布了一个问题,试图获得一些帮助
The documentation has not yet been updated, so it's hard to tell if it supports PowerShell or just cmd.exe scripts. I've posted a question on the AWS forums to try and get some more detail, and will update here when I learn more.
更新:似乎支持cmd.exe批处理语法,该语法可以在依次调用PowerShell。 AMI中包含一个新版本的EC2Config文档。引用它:
UPDATE: It looks like cmd.exe batch syntax is supported, which can in turn invoke PowerShell. There's a new version of the EC2Config documentation included on the AMI. Quoting from it:
[EC2Config]将读取为实例指定的用户数据,然后检查它是否包含标签< script> 和< / script> 。如果找到两者,它将在这两个标签之间获取信息,并将其保存到位于此应用程序设置文件夹中的批处理文件中。然后,它将在实例启动期间执行批处理文件。
[EC2Config] will read in the user data specified for the instance and then check if it contain the tags <script> and </script>. If it finds both then it will take the information between those two tags and save it to a batch file located in the Settings folder of this application. It will then execute the batch file during the start of an instance.
该批处理文件仅在sysprep之后首次启动实例时创建和执行。如果要创建并再次执行该批处理文件,请将Ec2HandleUserdata插件状态设置为Enabled。
The batch file will only be created and executed on the first launch of an instance after a sysprep. If you want to have the batch file created and executed again set the Ec2HandleUserdata plugin state to Enabled.
更新2: forums.aws.amazon/profile.jspa?userID=191080 rel = noreferrer> AWS团队敬上
UPDATE 2: My interpretation is confirmed by Shon from the AWS Team
更新3:并且从2012年5月的AMI开始,使用< powershell /> 标记支持PowerShell。
UPDATE 3: And as of the May-2012 AMIs, PowerShell is supported using the <powershell/> tag.
更多推荐
Windows的Cloud
发布评论