In this lab you will install the command line utilities required throughout the tutorial: nomad, cfssl, and jq
The jq
tool is used to process JSON data retrieved from the Nomad API.
export JQ_VERSION=1.6
wget -O jq https://github.com/stedolan/jq/releases/download/jq-"$JQ_VERSION"/jq-osx-amd64
sudo mv jq /usr/local/jq
Can also install with Homebrew:
brew instal jq
wget -O jq https://github.com/stedolan/jq/releases/download/jq-"$JQ_VERSION"/jq-linux64
sudo mv jq /usr/local/bin
sudo chmod u+x /usr/local/bin/jq
Verify the version:
jq --help
output
jq - commandline JSON processor [version 1.6]
...
The nomad
command line utility is used to interact with your Nomad servers. Download and install nomad
from the official HashiCorp releases page:
export NOMAD_VERSION=$(curl -L -s https://api.releases.hashicorp.com/v1/releases/nomad | jq -r '.[0]'.version)
wget https://releases.hashicorp.com/nomad/"$NOMAD_VERSION"/nomad_"$NOMAD_VERSION"_darwin_amd64.zip
unzip nomad_"$NOMAD_VERSION"_darwin_amd64.zip
sudo mv nomad /usr/local/bin
rm nomad_"$NOMAD_VERSION"_darwin_amd64.zip
Can also install with Homebrew:
brew install nomad
wget https://releases.hashicorp.com/nomad/"$NOMAD_VERSION"/nomad_"$NOMAD_VERSION"_linux_amd64.zip
unzip nomad_"$NOMAD_VERSION"_linux_amd64.zip
sudo mv nomad /usr/local/bin
rm nomad_"$NOMAD_VERSION"_linux_amd64.zip
Verify the version:
nomad version
output
Nomad v1.3.5
The cfssl
and cfssljson
tools are used to provision a PKI infratructure and generate TLS certificates.
export CFSSL_VERSION=1.6.2
wget -O cfssl https://github.com/cloudflare/cfssl/releases/download/v"$CFSSL_VERSION"/cfssl_"$CFSSL_VERSION"_darwin_amd64
wget -O cfssljson https://github.com/cloudflare/cfssl/releases/download/v"$CFSSL_VERSION"/cfssljson_"$CFSSL_VERSION"_darwin_amd64
sudo mv cfssl /usr/local/cfssl
sudo mv cfssljson /usr/local/cfssljson
Can also install with Homebrew:
brew instal cfssl
wget -O cfssl https://github.com/cloudflare/cfssl/releases/download/v"$CFSSL_VERSION"/cfssl_"$CFSSL_VERSION"_linux_amd64
wget -O cfssljson https://github.com/cloudflare/cfssl/releases/download/v"$CFSSL_VERSION"/cfssljson_"$CFSSL_VERSION"_linux_amd64
sudo mv cfssl /usr/local/bin
sudo mv cfssljson /usr/local/bin
sudo chmod u+x /usr/local/bin/cfssl
sudo chmod u+x /usr/local/bin/cfssljson
Verify the version of cfssl
and cfssljson
:
cfssl version
output
Version: 1.6.1
Runtime: go1.17.2
cfssljson -version
output
Version: 1.6.1
Runtime: go1.17.2