Skip to content

feat(packer): optional AD content seed for the AWS pre-promoted DC bake - #2534

Merged
Brad-Edwards merged 2 commits into
devfrom
feat/aws-dc-prebaked-content-seed
Oct 11, 2026
Merged

Brad-Edwards merged 2 commits into
devfrom
feat/aws-dc-prebaked-content-seed

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Owner

The GCE dc-prebaked template stages a scenario's AD content seed for finalize.ps1. The AWS template's finalize.ps1 already runs a staged seed, but the template had no way to stage one, so a scenario could not bake its own directory on AWS without carrying scenario content in Shifter.

  • dc_content_script (default empty) stages the given seed at C:\shifter-build\content-seed.ps1. Both staging provisioners are skipped when it is empty, so the base internal.shifter DC bakes as before.
  • As on GCE, the finalize step accepts Windows status 16001, which is reported when a seed rotates the Administrator password before Packer queries the finished elevated task.
  • dev.pkrvars.hcl and proof.pkrvars.hcl are reformatted for the current packer fmt (whitespace only).

No scenario content is added; a scenario keeps its seed and profile var-file in its own repository.

Verification

  • tests/test_packer.py passes (112), and packer validate is clean with and without dc_content_script.
  • Live: an aws-dev bake staged a scenario seed, promoted boreas.local, ran the seed through finalize.ps1 (OUs, users, groups and shares verified in the transcript) and registered the AMI.

The GCE dc-prebaked template stages a scenario's AD content seed for
finalize.ps1; the AWS template ran a staged seed but had no way to stage one.
dc_content_script now does so when set, and an empty value still bakes the base
DC. As on GCE, finalize accepts Windows' 16001 status when the seed rotates the
Administrator password before Packer queries the completed elevated task.

The two pkrvars files are reformatted for the current packer fmt.
Resolve the modify/delete conflict on shifter/packer/proof.pkrvars.hcl by
accepting dev's deletion: the proof tenant was decommissioned, so its packer
var-file is gone. The dc-prebaked content-seed feature (dc-prebaked.pkr.hcl,
variables.pkr.hcl, dev.pkrvars.hcl, test_packer.py) is unaffected.
@sonarqubecloud

Copy link
Copy Markdown

@Brad-Edwards
Brad-Edwards merged commit 03a799d into dev Oct 11, 2026
83 checks passed
@Brad-Edwards
Brad-Edwards deleted the feat/aws-dc-prebaked-content-seed branch October 11, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant