Skip to content

Commit

Permalink
wb | get the Nomad client/host where the node's task is deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Feb 5, 2024
1 parent 36e843e commit ae22a4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nix/workbench/nomad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ usage_nomad() {
$(helpcmd job monitor-alloc-id)
$(helpcmd job monitor-alloc-id-task-name)
$(helpcmd job task-name-allocation-id)
$(helpcmd job task-name-node-name)
EOF
}

Expand Down Expand Up @@ -2154,6 +2155,13 @@ EOF
local task_name=${1:?$usage}; shift
jq -r '.ID' "${job_file}".run/task.${task_name}.final.json
;;
####### job -> task-name-node-name )############################################
task-name-node-name )
local usage="USAGE:wb nomad ${op} ${subop} JOB-FILE TASK-NAME"
local job_file=${1:?$usage}; shift
local task_name=${1:?$usage}; shift
jq -r '.NodeName' "${job_file}".run/task.${task_name}.final.json
;;
####### job -> stop )###########################################################
stop )
local usage="USAGE: wb nomad ${op} ${subop} JOB-FILE TASK-NAME"
Expand Down

0 comments on commit ae22a4b

Please sign in to comment.