Installation script for HashiCorp binaries hosted on https://releases.hashicorp.com (e.g. packer, terraform, vault).
Download the installtion script
Linux / MacOS:
curl -LO https://raw.github.com/ZEISS/install-hashicorp-binaries/master/install-hashicorp.sh
chmod +x install-hashicorp.sh
Windows:
Invoke-WebRequest -UseBasicParsing `
-Uri https://raw.github.com/ZEISS/install-hashicorp-binaries/master/install-hashicorp.ps1 `
-OutFile install-hashicorp.ps1
MacOS:
- GNU utilities (see Homebrew GNU bin) for
sed
andgrep
Linux / MacOS:
bash
for executing scriptcurl
for fetching metadata and archiveunzip
for extracting binary from archiveshasum
/sha256sum
for verifying archive checksumgpg
for verifying checksum signature (optional)
Windows:
powershell
/pwsh
for executing scriptgpg
for verifying checksum signature (optional)
Install the required HashiCorp binaries
Linux / MacOS:
# ./install-hashicorp.sh <name>[:<version>] [...]
./install-hashicorp.sh packer terraform:0.14.0-rc1 vault:latest
Windows:
# .\install-hashicorp.ps1 <name>[:<version>] [...]
.\install-hashicorp.ps1 packer terraform:0.14.0-rc1 vault:latest
- Determines pre-compiled binary archive based on
- specified name
- specified or latest stable version
- detected operating system
- detected CPU architecture
- Verifies system requirements
- Verifies and imports PGP key (optional)
- Fetchs archive, checksums and signature files
- Verifies checksum signature (optional)
- Verifies archive checksum
- Extract binary from archive
- Verifies binary code signature (for MacOS and Windows)
- Adds binary to system's PATH
- Moves binary to
/usr/local/bin
(for Linux and MacOS) - Moves binary to
${env:ProgramW6432}\HashiCorp\bin
(for Windows) - Adds
${env:ProgramW6432}\HashiCorp\bin
to system's PATH (for Windows)
- Moves binary to
- Cleans up archive, checksums and signature files
- Verifies binary installation
If you find issues, please register them at this GitHub project issue page or consider contributing code by following this guideline.
This project is licensed under the MIT License - see the LICENSE file for details.