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.
Successfully complete this lab by achieving the following learning objectives:
- Log in to the Provided Nomad Server
Log in to the server as the
cloud_userwith 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
Using the appropriate commands, and the Nomad CLI, initialize a job file called
Change the count to 2.
updatestanza, and set it to update only one job at a time, with a min_healthy_time of 50 seconds.
- Submit the Job
- Submit the
example.nomadjob to run.
- Check to ensure it says placed 2 and healthy 2 before continuing.
- Submit the
- Change the `example.nomad` Job File to Use Redis Version 4, and Submit the Job
Edit the job file so that it will use Redis version 4.
While the original job is still running, submit the updated job to run.
Check that only one job gets updated at a time.
Once the deployment says healthy, check the logs to ensure that both jobs are running the updated version of Redis.