Consul
Install Consul Template
Consul Template is available as a pre-compiled binary or as a package for several operating systems. You can also build Consul Template from source.
Precompiled Binaries
Install the required packages.
$ sudo apt-get update && \
sudo apt-get install wget gpg coreutils
Add the HashiCorp [GPG key][gpg-key].
$ wget -O- https://apt.releases.hashicorp.com/gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Add the official HashiCorp Linux repository.
$ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/hashicorp.list
Update and install.
$ sudo apt-get update && sudo apt-get install consul-template
Compile from the source
Clone the repository from GitHub hashicorp/consul-terraform-sync
to build and install Consul Template binary in your path $GOPATH/bin
. Building from source requires git
and Golang.
$ git clone https://github.com/hashicorp/consul-template.git
Enter the repository directory.
$ cd consul-template
Select the release you want to compile.
$ git checkout tags/<vX.Y.Z>
Build Consul Template for your system. The binary will be placed in ./bin
.
$ make dev
Once installed, verify the installation works by prompting the -version
or -help
option.
$ consul-template -version
Run Consul Template as a Docker container
Install and run Consul Template as a Docker container.
$ docker pull hashicorp/consul-template
Once installed, verify the installation works by prompting the -version
or -help
option.
$ docker run --rm hashicorp/consul-template -version