Incremental Upgrades in Nomad

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab you will be creating a job, and then editing the job to increase how many allocations are sent to the cluster, to change the time it takes to update each running allocation when updates are performed. Then, you will test the changes to the Nomad job file by submitting a new version of the job, and checking to ensure that changes are performed as specified by the job file.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log in to the Provided Nomad Server
  1. Log in to the server as the cloud_user with the provided password to perform the tasks.

    Note: The Nomad server has been configured with one server agent, and one client agent. Docker has also been installed so Nomad is ready to run jobs.

Create a Default `example.nomad` Job File, and Change the Count and Update Stanza
  1. Using the appropriate commands, and the Nomad CLI, initialize a job file called example.nomad.

  2. Change the count to 2.

  3. Change the update stanza, and set it to update only one job at a time, with a min_healthy_time of 50 seconds.

Submit the Job
  1. Submit the example.nomad job to run.
  2. Check to ensure it says placed 2 and healthy 2 before continuing.
Change the `example.nomad` Job File to Use Redis Version 4, and Submit the Job
  1. Edit the job file so that it will use Redis version 4.

  2. While the original job is still running, submit the updated job to run.

  3. Check that only one job gets updated at a time.

  4. Once the deployment says healthy, check the logs to ensure that both jobs are running the updated version of Redis.

Additional Resources

Your organization has had problems with updates to software in the past. You want to show that you can use Nomad to control the timing for updates to software.

You will be creating a Nomad job file, and making changes to how many allocations are created, and how long it will take to push updates out to the Nomad clients.

You should change the count to 2 in the Nomad job file.

You will also need to change the update stanza, and set it to update only one job at a time, with a min_healthy_time of 50 seconds.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?