简体   繁体   English

CloudFormation Windows实例引导

[英]CloudFormation Windows Instances Bootstrapping

I understand that we need leverage user-data to inject any script or code. 我了解我们需要利用user-data来注入任何脚本或代码。 There are few aspects of automation like - changing the host-name or joining to a domain controller which would involve restarting of the instance. 自动化的方面很少,例如- changing the host-namejoining to a domain controller ,这将涉及重新启动实例。

Say if I want to do both ie change the host-name - the instance would perform restart and for the subsequent steps of domain-join would be ignored. 假设我要同时执行两个操作,即更改host-name -实例将执行重新启动,并且随后的domain-join步骤将被忽略。

Is there a way / work around to get this through ? 有办法解决这个问题吗?

You could just run all necesary commands and run 'Restart-Computer'. 您可以只运行所有必需的命令并运行“ Restart-Computer”。 Userdata runs only on the initial start of the instance lifecycle so you're fine to do this. Userdata仅在实例生命周期的初始开始时运行,因此您可以这样做。

暂无
暂无

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

相关问题 VPC和自动调用的Windows实例的AWS Cloudformation问题 - AWS Cloudformation trouble with VPC and Autoscalled Windows instances 如何使用CloudFormation模板从S3获取用于引导应用程序的文件,而无需启动具有角色的EC2实例? - How to get file from S3 for bootstrapping application using CloudFormation template and without launching EC2 instances with a role? CloudFormation 条件 EMR 实例 - CloudFormation conditional EMR instances 此实例类型当前不支持虚拟化类型为“hvm”的非Windows实例:[AWS Cloudformation] - Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type : [AWS Cloudformation] 如何在AWS Windows实例的CloudFormation脚本中将DeleteOnTermination设置为true? - How do I set DeleteOnTermination to true in CloudFormation script for AWS Windows Instances? Cloudformation模板提供了“该实例类型当前不支持虚拟化类型为'hvm'的非Windows实例 - Cloudformation template gives " Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type 由LaunchConfig创建的实例的CloudFormation标记 - CloudFormation tags for instances created by LaunchConfig 在环境中使用Chef&Knife在Amazon VPC中引导EC2实例 - Bootstrapping EC2 instances in an Amazon VPC using Chef & Knife in an environment 在CloudFormation中的多个LoadBalancers之后添加实例? - Adding instances behind multiple LoadBalancers in CloudFormation? 在AWS CloudFormation中一一生成实例 - Spawn instances one by one in AWS CloudFormation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM