DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Running Duplicate Batch Jobs in HashiCorp Nomad

3 years ago www.hashicorp.com
Running Duplicate Batch Jobs in HashiCorp Nomad

Summary: This is a summary of an article originally published by the source. Read the full original article here →

A fully managed platform to automate infrastructure on any cloud with HashiCorp products. Two approaches to injecting variability into your Nomad batch job template without having to modify the template in the future.

You can use the UUID function to inject variation and thus ensure the job is unique every time you run the command nomad run.

This will submit the batch job to Nomad: Check the status of the job allocation by using the nomad alloc status command: The output indicates a successful job with an exit code 0.

This batch does the exact same thing as the uuid.nomad file, except this code snippet is using variables: Go ahead and submit the batch job by running the command nomad run -var run_index variable.nomad: Check the status of the job with the nomad alloc status command: The output reveals that the job completed successfully.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com