Skip to content
Charlie Voiselle edited this page Feb 11, 2022 · 1 revision

layout: commands page_title: "Commands: Stop" sidebar_title: "stop" description: "Stop a running pack"

Nomad-Pack Stop

Command: nomad-pack stop

Stop a running pack

Usage

Usage: nomad-pack stop <pack name> [options]

Stop the specified Nomad Pack in the configured Nomad cluster. To delete the pack from
the cluster, specify "--purge", or use the command "nomad-pack destroy <pack name>."
By default, the stop command will stop ALL jobs in the pack deployment. If a pack
was run using var overrides to specify the job name(s), the var overrides MUST be
provided when stopping the pack to guarantee nomad-pack targets the correct job(s)
in the pack deployment.

Examples: # Stop an example pack in deployment "dev" nomad-pack stop example --name=dev

# Stop an example pack in deployment "dev" and purge it from the system
nomad-pack stop example --name=dev --purge

# Stop an example pack in deployment "dev" that has a job named "test"
# If the same pack has been installed in deployment "dev" but overriding the job 
# name to "hello", only "test" will be stopped
nomad-pack stop example --name=dev --var=job_name=test

Operation Options

  • -var-file=<string> - Specifies the path to a variable override file. This can be provided multiple times on a single command to result in a list of files.
  • -var=<key=value> - Specifies single override variables in the form of HCL syntax and can be specified multiple times per command.
  • -name=<string> - If set, this will be the unique identifier of this deployed instance of the specified pack. If not set, the pack name will be used. This is useful for running more than one instance of a pack within the same cluster. Note that this name must be globally unique within a cluster. Running the run command multiple times with the same name, will just re-submit the same pack, and apply changes if you have made any to the underlying pack. Be mindful that, whether you have made changes or not, the underlying Allocations will be replaced. When managing packs, the name specified here is the name that should be passed to the plan or destroy commands.

Stop Options

  • -registry=<string> - Specific registry name containing the pack to be stopped.
  • -ref=<string> - Specific git ref of the pack to be stopped. Supports tags, SHA, and latest. If no ref is specified, defaults to latest.

Using ref with a file path is not supported.

  • -purge - Purge is used to stop packs and purge them from the system. If not set, packs will still be queryable and will be purged by the garbage collector.
  • -global - Stop multi-region pack in all its regions. By default, pack stop will stop only a single region at a time. Ignored for single-region jobs.