Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zeiss/install-hashicorp-binaries


https://github.com/zeiss/install-hashicorp-binaries

bash-script hashicorp install-script linux macos packer powershell-script terraform vault windows

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# Install HashiCorp binaries

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/ZEISS/install-hashicorp-binaries?sort=semver&logo=github)][github_releases]

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

## Getting Started

Download the installtion script

Linux / MacOS:

```shell
curl -LO https://raw.github.com/ZEISS/install-hashicorp-binaries/master/install-hashicorp.sh
chmod +x install-hashicorp.sh
```

Windows:

```shell
Invoke-WebRequest -UseBasicParsing `
-Uri https://raw.github.com/ZEISS/install-hashicorp-binaries/master/install-hashicorp.ps1 `
-OutFile install-hashicorp.ps1
```

### Prerequisities

MacOS:
* GNU utilities (see [Homebrew GNU bin](https://gist.github.com/skyzyx/3438280b18e4f7c490db8a2a2ca0b9da)) for `sed` and `grep`

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`](https://gnupg.org/) for verifying checksum signature (optional)

Windows:

* `powershell` / `pwsh` for executing script
* [`gpg`](https://gnupg.org/) for verifying checksum signature (optional)

### Usage

Install the required HashiCorp binaries

Linux / MacOS:

```shell
# ./install-hashicorp.sh [:] [...]
./install-hashicorp.sh packer terraform:0.14.0-rc1 vault:latest
```

Windows:

```shell
# .\install-hashicorp.ps1 [:] [...]
.\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][github_issue] or consider contributing code by following this [guideline][github_guide].

## Authors

* [Brian Rimek](https://github.com/rembik)

## License

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

[github_releases]: https://github.com/ZEISS/install-hashicorp-binaries/releases
[github_issue]: http://github.com/ZEISS/install-hashicorp-binaries/issues/new/choose
[github_guide]: http://github.com/ZEISS/install-hashicorp-binaries/tree/master/.github/CONTRIBUTING.md
[github_licence]: http://github.com/ZEISS/install-hashicorp-binaries/tree/master/LICENSE