A language agnostic job runner for kubernetes. Run compute heavy tasks as kubernetes jobs and get autoscaling for free.
Bossman contains two parts, the bossman_server
(written in rust) and the client (worker
), which can be written in any language. Communication between bossman_server and clients are done via gRPC.
As a result, you can easily generate most of the code needed to implement a worker in your favourite language using a protobuf cli (brew install protobuf
on MacOS) and the protobuf files found in the protos folder.
- elixir client
- go client (coming soon, contributions welcome ...)
- python client (coming soon, contributions welcome ...)
- php client (coming soon, contributions welcome ...)
- rust client (coming soon, contributions welcome ...)
- ruby client (coming soon, contributions welcome ...)
- javascript client (coming soon, contributions welcome ...)
bossman_server
is a extremely lightweight server that lives in your kubernetes cluster.
The worker
is a library written in your favourite language which makes it easy to communicate with the server via gRPC.
You can use Bossman to easily spin up kubernetes v1/batch
jobs and to check the status of those jobs.
The simplest way to create a job is with the perform
function. For this function you need to give the job a group name and a the docker image name. You can optionally also provide some kubernetes options.
- job group name – any user provided string that identifies similar jobs, this can be used with the
get_list
function get a list of all the jobs with the same group name - docker image name – this refers to the docker image the job will run
- options (optional) – kubernetes options, see a list of available options below
Bossman.Job.perform("png-conversion", "myregister/png-to-jpg-converter")
Usually you will need to set some options to get anything useful for example:
Bossman.Job.perform(
"png-conversion",
"docker.pkg.github.com/kuberails/bossman/png-to-jpg-converter:master",
%{
image_pull_secrets: "github",
namespace: "default2",
env: %{name: "IMAGE_NAME", value: "cute_kitty.png"}
}
)
perform(group_name, docker_image, // options)
– perform a job. Creates the job in kubernetes. Returns the job with an id which is a generated uuid.get(id)
– get the job with the id (the generated uuid returned from the perform function)get_status(id)
– get the status of the jobget_list(group_name)
– returns a list of jobs with the given group nameget_all()
– returns all jobs managed by BossMan
Apache 2.0 licensed. See LICENSE for details.