Build Windows and Linux server templates on vSphere with Packer
- Windows Server 2019 (
ws2019
) - Windows Server 2022 (
ws2022
)
- Red Hat Enterprise Linux 8 (
rhel8
) - Red Hat Enterprise Linux 9 (
rhel9
) - Rocky Linux 9 (
rocky9
) - Ubuntu Server 20.04 LTS (
ubuntu2004
) - Ubuntu Server 22.04 LTS (
ubuntu2204
)
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/" # your Vault server
export VAULT_NAMESPACE="example/LAB" # (if using namespaces in Vault Enterprise)
export VAULT_TOKEN="abcdefg" # insert a Vault token ID
Alternatively, put those same export
commands into a script called vault-env.sh
.
Then just run ./build.sh [BUILD]
, where [BUILD]
is one of the descriptors listed above. For example, to build Ubuntu 22.04:
./build.sh ubuntu2204