Skip to content

Yelp/sticht

Repository files navigation

Sticht: simple automatic rollbacks

Build Status Coverage Status

Sticht is a library for building deployment workflows. Workflows are encoded as state machines, using the transitions library. Sticht lets users control the workflow via Slack, and makes it simple to write reusable code that triggers rollbacks when conditions are met, such as metrics exceeding thresholds.

We use this library within Paasta for automatically rolling back deployments of code when SLOs start failing.

Usage

To write a deployment workflow using Sticht, subclass one of:

  • sticht.state_machine.DeploymentProcess
  • sticht.slack.SlackDeploymentProcess (to get Slack buttons)
  • sticht.slo.SLOSlackDeploymentProcess (to get both Slack buttons and automatic rollbacks when SLOs are violated.)

Note: at the moment, SLOSlackDeploymentProcess requires a non-open-source library, slo_transcoder, so this can only be used internally at Yelp.

You will need to list your available states in states and valid transitions from valid_transitions, and write code to handle these transitions in on_enter_<state> methods.

An example usage of Sticht is Paasta's mark-for-deployment.