Skip to content

felixZdi/install-hashicorp-binaries

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install HashiCorp binaries

GitHub release (latest SemVer)

Installation script for HashiCorp binaries hosted on https://releases.hashicorp.com (e.g. packer, terraform, vault).

Getting Started

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

Prerequisities

MacOS:

Linux / MacOS:

  • bash for executing script
  • curl for fetching metadata and archive
  • unzip for extracting binary from archive
  • shasum / sha256sum for verifying archive checksum
  • gpg for verifying checksum signature (optional)

Windows:

  • powershell / pwsh for executing script
  • gpg for verifying checksum signature (optional)

Usage

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

Script Details

  • 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)
  • Cleans up archive, checksums and signature files
  • Verifies binary installation

Contributing

If you find issues, please register them at this GitHub project issue page or consider contributing code by following this guideline.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 66.9%
  • Shell 33.1%