packer-community / packer-windows-plugins

A suite of Packer plugins for provisioning Windows machines
112 stars 20 forks source link

Create option to run EC2Config service on AWS builds #27

Open mefellows opened 9 years ago

mefellows commented 9 years ago

To enable image pipelining (e.g. enriching images by building on top of other images) you need to ensure the EC2Config service has been run and possibly sysprepped, before snapshotting into an AMI. Otherwise the next attempt to run the user-data will fail as this feature is only enabled once, unless explicitly configured via that service.

See http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html for details.

I think we should create some simple way for users to do this, although its possible running sysprep on a shutdown may resolve that issue. For now, marking as an enhancement/question until we can refine a solution.

aalbertson commented 8 years ago

I'm definitely keen on this option to be enabled. I'm currently working on some automation for our build environments that creates a gold windows AMI for the purposes of ensuring when AWS deprecates their patched AMI's, we're not caught off guard anymore.

mefellows commented 8 years ago

Hi @aalbertson, whilst this feature hasn't been built directly into Packer, it is easily achieved with minimal scripting. See https://github.com/packer-community/packer-windows-plugins/issues/46#issuecomment-98293520 for details.

aalbertson commented 8 years ago

Hi @mefellows, thanks for pointing that, that is actually what I'm already doing, but it would be nice if it could be baked into packer directly. :) Perhaps even a full control of the ec2config service.