In this hands-on lab, you will be provided with a pre-configured Nomad cluster, that is running on a single instance in Developer mode. You will need to create a Nomad job file, and then edit the file, so that the environment variables will be shown in the running allocation once it has been submitted to Nomad.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log in to the Provided Nomad Server
- Log in to the server using the credentials provided.
Note: The Nomad server has been configured with one server agent and one client agent. Docker has been installed so server is ready to run jobs.
- Log in to the server using the credentials provided.
- Create a New Nomad Job Called `example.nomad`
This job will be using Docker and redis. You may choose to create the example file with comments included or not included.
- Edit the example.nomad job file to add the provided database variables
- Edit the example.nomad file and add the following database variables.
"DB_HOST" = "db01.example.com" "DB_USER" = "web" "DB_PASS" = "loremipsum"
Note: These variables are to be set to show inside the running redis docker image, when the job file has been submitted, and the job is running.
- Edit the example.nomad file and add the following database variables.
- Submit the File and Verify the Changes
- Connect to the running allocation.
- Verify that the environment variables have been set.