Armada iconArmada text
Docs

CLI reference

Install armadactl, configure it, and look up every command.

armadactl is the command-line tool for Armada. Use it to submit and watch jobs, manage queues, and ask the scheduler what it's doing.

Install armadactl

On a laptop install, Getting started installs armadactl into ~/bin for you.

Otherwise, use one of these:

The install script. From a clone of the Armada repository:

scripts/get-armadactl.sh

It downloads the latest release for your system and copies it into ~/bin. It says armadactl is now available on your PATH, but that change only lasts while the script runs: if armadactl isn't found afterwards, add ~/bin to your PATH (below).

A release download. Download the archive for your system from the Armada releases page (armadactl_<version>_darwin_all.tar.gz for any Mac, armadactl_<version>_linux_amd64.tar.gz or armadactl_<version>_linux_arm64.tar.gz for Linux, armadactl_<version>_windows_amd64.zip for Windows), then, on a Mac or Linux:

tar -xzf armadactl_*.tar.gz armadactl
mkdir -p ~/bin && mv armadactl ~/bin/

Check it works:

armadactl version

If you see command not found, add ~/bin to your PATH: export PATH="$HOME/bin:$PATH". To keep it for new terminals, add that line to ~/.zshrc (the macOS default) or ~/.bashrc.

Configure armadactl

armadactl reads ~/.armadactl.yaml. Each Armada installation is a named context:

currentContext: laptop
contexts:
  laptop:
    armadaUrl: localhost:30002
  prod:
    armadaUrl: armada.example.com:443
    openIdAuth:
      providerUrl: 'https://login.example.com/realms/armada'
      clientId: 'armada'
      localPort: 8085
      scopes: ['openid', 'profile', 'email']

An older config format, with armadaUrl at the top level and no contexts, still works but prints No context defined. This method of providing connection details will soon be deprecated. Move the settings into a context to stop the warning.

Options that work with every command:

OptionMeaning
-c, --context <name>Use this context for one command
--config <path>Use a different config file
--armadaUrl <address>Override the configured address; other context settings still apply

Common tasks

# Submit jobs from a file, checking it first
armadactl submit job.yaml --dry-run
armadactl submit job.yaml

# Follow a job set (press Ctrl-C to stop)
armadactl watch my-team demo-1

# Cancel one job, or a whole job set
armadactl cancel job my-team demo-1 <job-id>
armadactl cancel job-set my-team demo-1

# Change the order of waiting jobs (lower runs first)
armadactl reprioritize job my-team demo-1 <job-id> 5
armadactl reprioritize job-set my-team demo-1 5

# Queues
armadactl create queue my-team --priority-factor 1
armadactl get queues
armadactl get queue my-team
armadactl delete queue my-team

# Why isn't my job running?
armadactl get job-report <job-id>
armadactl get queue-report my-team

Command reference

Every command has detailed help: armadactl <command> --help. For the full documentation in your terminal, run armadactl docs.

Jobs

CommandWhat it does
submit <file> [--dry-run]Submit the jobs in a file. --dry-run only checks the file, and prints nothing if it's fine.
watch <queue> <job-set> [--raw] [--exit-if-inactive]Stream a job set's events. --raw shows every event in full. Press Ctrl-C to stop.
cancel job <queue> <job-set> <job-id>Cancel one job.
cancel job-set <queue> <job-set>Cancel every job in a job set.
cancel queues [<queues...>] --job-states <states> [--priority-classes ...] [--selector ...] [--pools ...] [--dry-run]Cancel jobs across whole queues. Choose queues by name or with --selector, not both. Needs the global cancel_any_jobs right. Leaving out --priority-classes means every class.
reprioritize job <queue> <job-set> <job-id> <priority>Change one waiting job's order in its queue.
reprioritize job-set <queue> <job-set> <priority>Change the order of every waiting job in a job set.
preempt job <queue> <job-set> <job-id> <reason>Stop one running job. Only works on preemptible jobs.
preempt queues [<queues...>] [--priority-classes ...] [--selector ...] [--pools ...] [--dry-run]Stop running jobs across whole queues. Choose queues by name or with --selector, not both. Needs the global preempt_any_jobs right.

Queues

CommandWhat it does
create queue <name> [--priority-factor N] [--owners ...] [--group-owners ...] [--labels k=v] [--retry-policies ...]Create a queue. Replaces an existing queue with the same name.
create -f <file>Create a queue (or retry policy) from a file.
get queue <name>Show one queue's settings.
get queues [<names...>] [--match-labels k=v] [--only-cordoned]List queues. Filter by name or with --match-labels, not both. With neither, it lists every queue.
update queue <name> [flags]Replace a queue's settings. Every flag you leave out is reset.
delete queue <name>Delete a queue. Cancel its jobs first.
cordon queues [<names...>] [--match-labels ...] [--dry-run]Stop new jobs starting from these queues. Choose queues by name or with --match-labels, not both. Needs cordon_queue.
uncordon queues [<names...>] [--match-labels ...] [--dry-run]Undo cordon queues. Choose queues by name or with --match-labels, not both. Needs cordon_queue.

Reports

CommandWhat it does
get job-report <job-id>Why the scheduler did or didn't schedule this job.
get queue-report <queue>What the scheduler last did for this queue.
get scheduling-report [-v]The scheduler's report on its latest round. Repeat -v for more detail.

get scheduling-report also accepts --job-id and --queue, but both are deprecated: they print This flag is deprecated and will be removed in a future release. Please use `job-report` instead. (or `queue-report`). Use get job-report and get queue-report instead.

A report for a job that's already running may say Most recent scheduling round that affected job <job-id>: none: reports only cover recent rounds.

Retry policies

CommandWhat it does
create retry-policy -f <file>Create a retry policy.
update retry-policy -f <file>Update a retry policy.
get retry-policy <name>, get retry-policiesShow retry policies.
delete retry-policy <name>Delete a retry policy.

Managing policies needs create_retry_policy, update_retry_policy or delete_retry_policy; anyone can read them.

Configuration and other commands

CommandWhat it does
config get-contextsList the contexts in your config.
config current-contextShow the active context.
config use-context <name>Switch the active context.
versionShow armadactl's version.
completion <shell>Print a shell completion script.
docsPrint detailed armadactl documentation, formatted for the terminal. (Piped to a file or head, the formatting shows as escape codes.)

Worker clusters and nodes

These act on whole worker clusters (executors) or nodes, and are usually platform-team actions. The cancel and preempt commands only affect jobs already placed on that executor or node, and have no --dry-run. See Monitoring and fleet.

CommandWhat it doesNeeds
cancel executor <executor> [--queues ...] [--priority-classes ...] [--pools ...]Cancel jobs running on a worker cluster. Leaving out a filter means all.cancel_any_jobs
preempt executor <executor> [--queues ...] [--priority-classes ...] [--pools ...]Preempt jobs running on a worker cluster.preempt_any_jobs
cancel node <node> --executor <executor> [--queues ...] [--priority-classes ...]Cancel jobs running on one node.cancel_any_jobs
preempt node <node> --executor <executor> [--queues ...] [--priority-classes ...]Preempt jobs running on one node.preempt_any_jobs
cordon executor <executor> <reason>Stop new jobs being placed on a worker cluster.update_executor_settings
uncordon executor <executor>Undo cordon executor.update_executor_settings
delete executor <executor>Remove a worker cluster from the scheduler's database. A running executor registers again, and any cordon stays: use uncordon executor to clear it.update_executor_settings

On a laptop install, the executor is Cluster1 and the worker node is armada-worker. The laptop grants cancel_any_jobs but not preempt_any_jobs or update_executor_settings.

Troubleshooting

What you seeCauseFix
command not found: armadactlarmadactl isn't on your PATHexport PATH="$HOME/bin:$PATH"
zsh: killed armadactl, or it prints nothing and exits with code 137, after reinstallingmacOS stopped the new file because the install overwrote the old one in placecp ~/bin/armadactl ~/bin/armadactl.new && mv ~/bin/armadactl.new ~/bin/armadactl
Request could not be authenticated with any of the supported schemes.The installation needs a login, and your context has noneAdd a login to the context.
get queues prints []You may not be logged in: an Unauthenticated line appears above the list, and the command still exits with code 0Check for an error line above the list.
[GetJobSetEvents] Jobset <job-set> for queue <queue> does not exist from watchYou started watch straight after submittingWait a few seconds and run it again.
A --dry-run worked, but the real command was denied--dry-run doesn't check your rightsAsk for the right named in the error.
connection refusedWrong address, or Armada isn't runningCheck armadaUrl in ~/.armadactl.yaml.
accepts N arg(s), received MMissing or extra argumentsRun the command with --help. Most job commands need the queue and the job set as well as the ID.
A command prints its help instead of runningA subcommand is missing, for example cancel <id> instead of cancel job ...Use the full form from the reference above.
lacks permission <right> required for action <right>You don't have a global right the command needs (see the Needs column above).Ask your platform team.
This flag is deprecated and will be removed in a future release.You used scheduling-report --job-id or --queueUse get job-report or get queue-report.
unknown flagThe flag doesn't exist in your versionRun the command with --help.
zsh: no such file or directory: job-id (or bash: job-id: No such file or directory)A placeholder was pasted with its angle bracketsReplace <job-id>, including < and >, with the real value.
Edit on GitHub

Last updated on