Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

bodywork-ml/bodywork-batch-job-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run Batch Jobs on Kubernetes with Bodywork

bodywork

This repository contains a Bodywork project that demonstrates how to run a batch workload (or job) on Kubernetes, with Bodywork. For information on this demo, take a look here. To run this project, follow the steps below. If you are new to Kubernetes, then take a look at our Kubernetes Quickstart Guide.

Install Bodywork

Bodywork is distributed as a Python package that can be installed using Pip,

$ pip install bodywork

Run the Job

To execute the workload defined in this repository run,

$ bodywork create deployment https://github.com/bodywork-ml/bodywork-batch-job-project

Logs will be streamed to your terminal until the job has been successfully completed.

Running the Job on a Schedule

If you're happy with the result, you can schedule the workflow-controller to operate remotely on the cluster on a pre-defined schedule. For example, to setup the the workflow to run every hour, use the following command,

$ bodywork create cronjob https://github.com/bodywork-ml/bodywork-batch-job-project \
    --name=hourly-job \
    --schedule="0 * * * *"

Each scheduled workflow will attempt to re-run the batch-job, as defined by the state of this repository's master branch at the time of execution.

Make this Project Your Own

This repository is a GitHub template repository that can be automatically copied into your own GitHub account by clicking the Use this template button above.

After you've cloned the template project, use official Bodywork documentation to help modify the project to meet your own requirements.