Chaos Engineering Automation with Drone and Gremlin

Tammy Butow
3 min readNov 19, 2020

In this tutorial, we will demonstrate how to use Drone to create an automated chaos gauntlet for our services and applications. This will be done using Drone to inject a controlled amount of failure with Gremlin while building new services. We’ll then also share how to use Gremlin to automatically run a Chaos Guantlet when deploying new services to Staging and Production environments.

Gremlin can be easily integrated with Drone using the Gremlin API.


Before you begin this tutorial, you’ll need the following:

Step 1 —Choose a repository

In this step, you’ll choose a repository. For example, I am choosing to build the Drone_Memcache repository:

We will be using the drone_memcache repository as an example

Step 2— Add Gremlin secrets to Drone

In this step, you’ll need to add your Gremlin secrets to Drone. This includes your Gremlin API Key, Gremlin Team ID, and Gremlin Secret. These are secrets that are required to run attacks in an automated manner. Select your repository, select settings, then add your secrets:

Step 3 — Create a .drone.yml file in your repository

Create a file called .drone.yml in your repository. This file should be used to build your services and call the Gremlin API to run your first set of Chaos Engineering attacks using Gremlin. Once you save this drone file you’ll be able to kick off the build of the drone_memcache repository and your automated Chaos Engineering attacks. We recommend using the Gremlin in-app API examples provided for you to craft your curl commands.

Drone will automatically spin up a Docker container (or Kubernetes pod) to build your service and run automated Chaos Engineering attacks with Gremlin.

Congratulations, you have now completed your first set of automated Chaos Engineering attacks. We also recommend you run a set of Chaos Engineering attacks after deploying your code to Staging and Production.


This tutorial walked you through how to create a Chaos Pipeline for Staging that runs an automated Chaos Gauntlet. This makes use of the Gremlin API, Drone, and Concord. We used Drone to create these CI stages, but you can also use Gremlin with other tools such as Jenkins, AWS Pipelines and Spinnaker.