Nomad
nomad-pack render command reference
Use the nomad-pack render command to render the specified Nomad Pack and review the results.
Usage
nomad-pack render <pack_name> [options]
Options
-registry=<string>: Specific registry name containing the pack. If not specified, the default registry is used.-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.-render-output-template: Controls whether or not to render and display the output template file within the pack.-skip-aux-files: Controls whether or not the rendered output contains auxiliary files found in thetemplatesfolder.-no-format: Controls whether or not to format templates before outputting.-to-dir=<string>: Path to write rendered job files to in addition to standard output.
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
Approval options
-auto-approve: Automatically answer confirmation prompts in the affirmative.
Examples
Render an example pack with override variables in a variable file.
nomad-pack render example --var-file="./overrides.hcl"
Render an example pack with CLI variable overrides.
nomad-pack render example --var="redis_image_version=latest" \
--var="redis_resources={"cpu": "1000", "memory": "512"}"
Render an example pack including the outputs template file.
nomad-pack render example --render-output-template
Render an example pack, outputting the rendered templates to file in
addition to the terminal. Setting auto-approve allows the command to
overwrite existing files.
nomad-pack render example --to-dir ~/out --auto-approve
Render a pack under development from the filesystem. Supports current working directory or relative path.
nomad-pack render .