From a823c62c532950b58805166a00d8558a5d2f4c7d Mon Sep 17 00:00:00 2001 From: dystewart Date: Fri, 19 Jan 2024 14:47:43 -0500 Subject: [PATCH] Update README.md to include instructions for running ope-notebook-culler --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ded972a..d120e25 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,43 @@ This repository is a collection of useful scripts and tools for TAs and professors to manage students workloads. -## get_url.py +## Cronjobs + +### ope-notebook-culler + +This cronjob runs once every 48 hours at 7am, removing all notebooks from the rhods-notebooks namespace. To add resources to the rhods-notebooks namespace: + +1. Ensure you are logged in to your OpenShift account via the CLI and you have access to rhods-notebooks namespace. +2. Switch to rhods-notebooks namespace: +``` + oc project rhods-notebooks +``` + +3. From cronjobs/ope-notebook-culler/ directory run: +``` + oc apply -k . +``` + + This will deploy all the necessary resources for the cronjob to run on the specified schedule. + +Alternatively, to run the script immediately: + +1. Ensure you followed the steps above +2. Verify the cronjob ope-notebook-culler exists +``` + oc get cronjob ope-notebook-culler +``` + +3. Run: +``` + kubectl create -n rhods-notebooks job --from=cronjob/ope-notebook-culler ope-notebook-culler +``` + + This will trigger the cronjob to spawn a job manually. + +## Scripts + +### get_url.py This script is used to retrieve the URL for a particular notebook associated with one student. To execute this script: