Packer

Build Windows and Linux server templates on vSphere with Packer

Currently supported builds:

Windows

Linux

To run a build locally (not via GitLab CI), you'll need to first export a few Vault-related environment variables:

export VAULT_ADDR="https://vault.lab.example.com"
export VAULT_NAMESPACE="example/LAB"
export VAULT_TOKEN=""     # insert a Vault token ID

Then just copy/paste the corresponding packer build line from .gitlab-ci.yml. For example, to run a Windows Server 2022 build:

packer build -on-error=abort -force \
  -var-file="builds/common_configs/common.pkrvars.hcl" \
  "builds/windows/server/2022/"