- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Using Spread Job Placement for a Nomad Job in a Cluster
In this lab, we will be creating a job in Nomad that runs 10 allocations. We will set this up in such a way that 70% of the allocations will go to one location and 30% of allocations will go to another. To accomplish this, we will use spread job placement to spread the jobs around our cluster.

Lab Info
Table of Contents
-
Challenge
Log in to the Provided Nomad Server
Log into the server as "cloud_user" with the provided password to perform the tasks.
-
Challenge
Create a Job and Add a Weighting of 70% for dc1
You will create a Nomad job called spread-test.nomad. As part of the job creation, you will set it to start 10 allocations. This job will make use of a Nomad stanza to spread the allocations between two data centers, dc1 and dc2, with 70% of the allocations going to dc1.
-
Challenge
Submit the Job to Run in the Cluster
Submit the job you created to run in the cluster. The job should start 10 copies of the job.
-
Challenge
Check How Many Jobs are Running in Which Datacenters
When you check the number of running jobs, 7 should be in dc1 and 3 should be in dc2.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.