tilloo

A distributed cron with cli and web ui

Build Status

Installation

Prerequisites:

Steps:

Features

Recent Changes

Tilloo has been a great tool for distributed cron at my current startup for the last five years. We are now moving to containers and want to add the ability to schedule runs in containers. As we thought through this we decided to radically change the implementation of Tilloo. I have created a v1.0 branch for folks who want to continue to use the older version. Master will become the containerized implementation. I plan on making the following changes:

Background

I have been a long time user of Sooner.io https://github.com/seven1m/sooner.io but have hit issues around zero downtime deployments and worker scale out. We looked at extending Sooner.io but the original author is no longer maintaining it and it has some fundamental architectural issues that would require a significant overhaul to hit our goals.

We evaluated Chronos https://mesos.github.io/chronos/ but found it to be quite a bit more complex than what we needed. That complexity came with overhead in terms of getting it setup, etc.

I wrote this to help my startup get past these issues.

We evaluated the built in cron support in k8s 1.10 but found it lacking in terms of tracking what each job is doing and liked the realtime nature of this solution. We liked the concept of Jobs and the ability to schedule them across the k8s cluster. We also liked the deployment flexibility of containers. This motivated us to update tilloo to focus on a containerized workload on k8s.

Getting Started

Prerequisites

We leverage:

Mongodb will be installed using helm with the default install script. The app.yaml will run a rabbitmq pod.

Configuration

The default configuration is:

If your environment satisfies the prequisites and is good with the above ports you are good to go.

Start up services

The typical Tilloo environment consists of:

Once everything is installed in k8s open a web browser to http://.

Enjoy!

CLI Documentation

In a k8s environment the cli is best run from an interactive shell started on the k8s cluster inside the tilloo-services namespace.

Running npm link will put symlinks to the tilloo-cli into your /usr/local/bin directory.

tilloo-cli addjob <schedule> <imageuri> [options]

Adds a job to the system.

Arguments

Options

tilloo-cli deletejob <jobId>

Deletes a job from the system.

Arguments

tilloo-cli expireruns <days>

Each run represents a document in mongodb. Each log line is also a document. If you have jobs that run frequently this can impact the performance of mongodb. This command line allows you to expire runs and their logs from mongodb based on the created at date of the run. The days argument represents how many days worth of data to keep. If you specify 7 days any runs created more than 7 days ago will be expired.

Arguments

tilloo-cli jobdetail <jobId>

Get a json description of the job. Includes job details not shown elsewhere. Useful for debugging.

Arguments

tilloo-cli killrun <runId>

Arguments

Options

tilloo-cli listjobs

Lists all jobs

tilloo-cli listruns <jobId>

Lists all runs for a jobId chronological order

Arguments

tilloo-cli rundetail <runId>

Get a json description of the run. Includes run details not shown elsewhere. Useful for debugging.

Arguments

tilloo-cli runoutput <runId>

Gets the stdout/stderr from the run of a job.

Arguments

Config Documentation

The config file has sensible defaults filled in. All keys present in the shipped config file must remain. Removing settings will cause tilloo to fail to run.

Settings

Notifications

There are notifiers included that can notify of job failures via Mandrill, AWS SNS, or AWS SES. Notifiers are easily added for other destinations. If you add one please submit a pull request and share it.

Resources

People

The author is Chris Kinsman

License

MIT