To process multiple jobs at scale in an organized and manageable way, organizations might choose from a variety of tools.
One powerful tool to run and scheduled jobs is Kubernetes, an open source platform first created by Google. Kubernetes (or K8S) orchestrates dozens or even hundreds (or thousands) of containerized jobs using a "declared state" model - which is to say that developers describe the state of their application and the cluster makes it happen.
In this lab you will create and submit a CronJob to run in the UVA Kubernetes cluster.
- Create a fork of this repository: https://github.com/uvasds-systems/uvasds-services/
- Clone your new fork to your local laptop, or open it in a GitHub Codespace.
cd
intouvasds-services/templates/ds2002
and find thenem2p.yaml
file.- Copy that file, renaming it with your username. Be sure to keep the
.yaml
suffix. - Edit that new file. Replace all instances of
nem2p
with your computing ID. - (Refer to the example below) Replace the values between the quotes on line 7 so that it runs every 30 minutes:
0-59/30 * * * *
- Most importantly, line 14 should point to the container you created for Lab 8. Your GitHub Actions workflow should build that container and push it to the GHCR, where K8S can pull it.
- Once you have made these edits, ADD, COMMIT, and PUSH your changes to your fork.
- From the home page of your fork in GitHub, click on the "Contribute" button and submit a Pull Request to the parent repository. From there the instructor will review and approve your submission.
- That's it! We will see your deployment on the backend, which will be graded automatically.