From c6aa391e60d93f94babc019ae84cf06eccd506b2 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 13 Jul 2022 21:41:23 -0400 Subject: [PATCH 1/5] Add initial windows packer templates for ami Signed-off-by: Peter Zhu --- packer/README.md | 34 +++++++ packer/config/windows/launch-config.json | 8 ++ packer/jenkins-agent-win2016-x64.json | 86 +++++++++++++++++ .../jenkins-agent-win2019-x64-alpine-wsl.json | 95 +++++++++++++++++++ packer/jenkins-agent-win2019-x64.json | 88 +++++++++++++++++ packer/scripts/windows/pip-install.ps1 | 25 +++++ .../windows/scoop-install-alpinewsl.ps1 | 13 +++ .../scripts/windows/scoop-install-commons.ps1 | 84 ++++++++++++++++ .../scripts/windows/scoop-install-scoop.ps1 | 15 +++ .../scripts/windows/smb-setup-2019-plus.ps1 | 12 +++ packer/scripts/windows/smb-setup.ps1 | 15 +++ packer/scripts/windows/userdata.ps1 | 26 +++++ packer/scripts/windows/wsl-setup.ps1 | 8 ++ 13 files changed, 509 insertions(+) create mode 100644 packer/README.md create mode 100644 packer/config/windows/launch-config.json create mode 100644 packer/jenkins-agent-win2016-x64.json create mode 100644 packer/jenkins-agent-win2019-x64-alpine-wsl.json create mode 100644 packer/jenkins-agent-win2019-x64.json create mode 100644 packer/scripts/windows/pip-install.ps1 create mode 100644 packer/scripts/windows/scoop-install-alpinewsl.ps1 create mode 100644 packer/scripts/windows/scoop-install-commons.ps1 create mode 100644 packer/scripts/windows/scoop-install-scoop.ps1 create mode 100644 packer/scripts/windows/smb-setup-2019-plus.ps1 create mode 100644 packer/scripts/windows/smb-setup.ps1 create mode 100644 packer/scripts/windows/userdata.ps1 create mode 100644 packer/scripts/windows/wsl-setup.ps1 diff --git a/packer/README.md b/packer/README.md new file mode 100644 index 0000000..6333250 --- /dev/null +++ b/packer/README.md @@ -0,0 +1,34 @@ +## Packer Templates for Creating EC2 AMI + +### Structure + +* **config:** This folder contains all the configuration files +* **scripts:** This folder contains all the running scripts during the image creation +* **.json:** All templates are now in JSON format, we have not converted them into HCL2 yet + +### Usages + +* You need to install `packer` on your host as a pre-requisite +``` +# Needs to be run in this directory +$ cd packer/ + +# Run build AMI: +$ packer build