Nomad
nomad-pack plan command reference
Use the nomad-pack plan command to perform a dry run that determines the effects of submitting a new or updated Nomad Pack.
The nomad-pack plan command returns one of the following exit codes:
0: No objects will be created or destroyed.1: Objects will be created or destroyed.255: An error occurred determining the plan.
Usage
nomad-pack plan <pack_name> [options]
Options
-registry=<string>: Specific registry name containing the pack.-ref=<string>: Specific Git reference of the pack to retrieve info about. Supports tags, SHA, and@latest. If you do not specify a reference, the value defaults to@latest. Usingrefwith a file path is not supported.-diff: Determines whether to output the diff between the remote job and planned job. Defaults to true.-policy-override: Sets the flag to force override any soft mandatory Sentinel policies.-verbose: Increase diff verbosity.-exit-code-no-changes=<int>: Override exit code returned when the plan shown no changes.-exit-code-makes-changes=<int>: Override exit code returned when the plan shows changes.-exit-code-error=<int>: Override exit code returned when there is an error.
Operation options
-var-file=<string>: Specifies the path to a variable override file. You may provide this multiple times on a single command for multiple files.-allow-unset-vars: Suppress errors from unset variables without default values. Equivalent of setting the NOMAD_PACK_ALLOW_UNSET_VARS environment variable to1ortrue.-ignore-missing-vars: Determines whether the command should override variables not present in the pack or should produce an error.-var=<key=value>: Specifies single override variables in the form of HCL syntax. You may specify multiple times per command.-name=<string>: If set, this is the unique identifier of this deployed instance of the specified pack. If not set, the pack name becomes the unique identifier. Setting a name 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 re-submits the same pack and applies changes if you have made any to the underlying pack. Be mindful that, whether you have made changes or not, the underlying allocations are replaced.When managing packs, the name specified here is the name that you should be pass to Nomad Packs'plananddestroycommands.-parser-v1: Use the legacy syntax parser to parse your job. This enables pack to run packs for earlier versions while you are migrating them to the new syntax
Nomad cluster options
-address=<string>: The address of the Nomad server. Overrides the NOMAD_ADDR environment variable if set.-namespace=<string>: The target namespace for queries and actions bound to a namespace. Overrides the NOMAD_NAMESPACE environment variable if set.-region=<string>: The region of the Nomad servers to forward commands to. Overrides the NOMAD_REGION environment variable if set.-ca-cert=<string>: Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate. Overrides the NOMAD_CACERT environment variable if set.-client-cert=<string>: Path to a PEM encoded client certificate for TLS authentication to the Nomad server. Must also specify--client-key. Overrides the NOMAD_CLIENT_CERT environment variable if set.-client-key=<string>: Path to an unencrypted PEM encoded private key matching the client certificate from--client-cert. Overrides the NOMAD_CLIENT_KEY environment variable if set.-tls-server-name=<string>: The server name to use as the SNI host when connecting via TLS. Overrides the NOMAD_TLS_SERVER_NAME environment variable if set.-token=<string>: The SecretID of an ACL token to use to authenticate API requests with. Overrides the NOMAD_TOKEN environment variable if set.-tls-skip-verify: Do not verify TLS certificate. We do not recommend this. Verification is also skipped if you set the NOMAD_SKIP_VERIFY environment variable.
Examples
Plan an example pack with the default deployment name.
nomad-pack plan example
Plan an example pack at a specific ref.
nomad-pack plan example --ref=v0.0.1
Plan a pack from a registry other than the default registry.
nomad-pack plan traefik --registry=community --ref=v0.0.1
Plan an example pack without showing the diff.
nomad-pack plan example --diff=false
Plan a pack under development from the current filesystem.
nomad-pack plan .