Requirements¶
Platform¶
The project is tested on the following platforms:
Platform | Version |
VMware vSphere | 8.0 or later |
7.0 Update 3D or later |
Operating Systems¶
The project is tested on the following operating systems for the Packer host 1 :
Operating System | Version | Architecture |
VMware Photon OS | 5.0 | x86_64 |
Ubuntu Server | 22.04 LTS | x86_64 |
macOS | Sonoma | Intel or Apple Silicon |
Packer¶
Packer CLI¶
HashiCorp Packer 1.10.0 or higher.
You can install Packer on VMware Photon OS using the following commands:
PACKER_VERSION="1.10.0"
OS_PACKAGES="wget unzip"
if [[ $(uname -m) == "x86_64" ]]; then
LINUX_ARCH="amd64"
elif [[ $(uname -m) == "aarch64" ]]; then
LINUX_ARCH="arm64"
fi
tdnf install ${OS_PACKAGES} -y
wget -q https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_${LINUX_ARCH}.zip
unzip -o -d /usr/local/bin/ packer_${PACKER_VERSION}_linux_${LINUX_ARCH}.zip
You must configure your system to trust that HashiCorp key for package authentication.
-
Configure the repository:
sudo bash -c 'wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor > /usr/share/keyrings/hashicorp-archive-keyring.gpg'
-
Verify the fingerprint:
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
You can verify that the fingerprint matches the HashiCorp public key published on Security at HashiCorp.
-
Add the official HashiCorp repository to your system:
sudo bash -c 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list'
-
Install Packer from the HashiCorp repository:
sudo apt update && sudo apt install packer
You can install Packer on macOS using Homebrew.
brew tap hashicorp/tap
brew install hashicorp/tap/packer
Packer Plugins¶
Required plugins are automatically downloaded and initialized when using ./build.sh
.
For disconnected sites (e.g., air-gapped or dark sites), you may download the plugins and place
these same directory as your Packer executable /usr/local/bin
or $HOME/.packer.d/plugins
.
Plugin | Version | Description | Resources |
---|---|---|---|
Packer Plugin for Ansible | >= 1.1.0 | By HashiCorp | |
Packer Plugin for VMware vSphere | >= 1.2.7 | By HashiCorp | |
Packer Plugin for Git | >= 0.6.2 | Community Plugin |
Additional Software Packages¶
The following additional software packages must be installed on the operating system running Packer.
-
git command-line tools.
-
ansible-core 2.15.
-
jq - A command-line JSON processor.
-
xorriso - A command-line ISO creator.
pip3 install --user ansible-core==2.15 export PATH="$HOME/.local/bin:$PATH" tdnf -y install git jq xorriso
-
HashiCorp Terraform 1.7.1 or higher.
TERRAFORM_VERSION="1.7.1" OS_PACKAGES="wget unzip" if [[ $(uname -m) == "x86_64" ]]; then LINUX_ARCH="amd64" elif [[ $(uname -m) == "aarch64" ]]; then LINUX_ARCH="arm64" fi tdnf install ${OS_PACKAGES} -y wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${LINUX_ARCH}.zip unzip -o -d /usr/local/bin/ terraform_${TERRAFORM_VERSION}_linux_${LINUX_ARCH}.zip
-
git command-line tools.
-
ansible-core 2.15.
-
jq - A command-line JSON processor.
-
xorriso - A command-line ISO creator.
-
mkpasswd - A password generating utility.
-
HashiCorp Terraform 1.7.1 or higher.
pip3 install --user ansible-core==2.15 sudo apt -y install git jq xorriso whois terraform
-
gomplate 3.11.7 or higher.
GOMPLATE_VERSION="3.11.7" LINUX_ARCH="amd64" sudo curl -o /usr/local/bin/gomplate -sSL https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-${LINUX_ARCH} sudo chmod 755 /usr/local/bin/gomplate
- git command-line tools.
- ansible-core 2.15.
- jq - A command-line JSON processor.
- Coreutils
- HashiCorp Terraform 1.7.1 or higher.
-
gomplate 3.11.7 or higher.
pip3 install --user ansible-core==2.15 brew install git jq coreutils hashicorp/tap/terraform gomplate
-
mkpasswd - A password generating utility.
brew install --cask docker
-
The project may work on other operating systems and versions, but has not been tested by the maintainers. ↩