Skip to content

Latest commit

 

History

History
164 lines (132 loc) · 3.16 KB

02-client-tools.md

File metadata and controls

164 lines (132 loc) · 3.16 KB

Installing the Client Tools

In this lab you will install the command line utilities required throughout the tutorial: nomad, cfssl, and jq

Install jq

The jq tool is used to process JSON data retrieved from the Nomad API.

export JQ_VERSION=1.6

MacOS

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

Linux

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

Verification

Verify the version:

jq --help

output

jq - commandline JSON processor [version 1.6]
...

Install Nomad

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)

MacOS

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

Linux

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

Verification

Verify the version:

nomad version

output

Nomad v1.3.5

Install cfssl

The cfssl and cfssljson tools are used to provision a PKI infratructure and generate TLS certificates.

export CFSSL_VERSION=1.6.2

MacOS

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

Linux

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

Verification:

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

Next: Provisioning Compute Resources