#!/bin/bash # Nomad Bootstrap Script # Params: # client : bootstraps as client # exit on error set -e # create nomad dir mkdir -p /opt/nomad nomaduser=nomad nomadgroup=nomad if [ "$#" -eq 1 ] && [ "$1" == "-client" ]; then echo "bootstraping as nomad client" nomaduser=root nomadgroup=root fi # write systemd conf cat >/etc/systemd/system/nomad.service </etc/nomad.d/nomad.hcl </etc/nomad.d/server.hcl </etc/nomad.d/client.hcl <