github.com/hernad/nomad@v1.6.112/e2e/upgrades/run_node.sh (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  #/bin/bash
     5  # this script runs a nomad node (client/server)
     6  # first arg is the binary and second arg is of the format (<client|server><num>).
     7  # this is only meant to be used within the context of the cluster created in run_cluster.sh 
     8  # e.g usage ./run_node.sh nomad client1
     9  if [ "$#" -ne 2 ]; then
    10      echo "Expected usage ./run_node.sh /path/to/binary <client|server><1|2>"
    11      exit 255
    12  fi
    13  NOMAD_BINARY=$1
    14  NODE=$2
    15  ( $NOMAD_BINARY agent -config=${NODE}.hcl 2>&1 | tee -a "/tmp/$NODE/log" ; echo "Exit code: $?" >> "/tmp/$NODE/log" ) &