Gremlin Configuration

Introduction

Gremlin’s “Resilience as a Service” makes it easy to find weaknesses in your system before they cause problems for your customers. Gremlin is a simple, safe and secure way to use Chaos Engineering to improve system resilience. After registering your Gremlin clients you can then set tags to enable you to easily identify hosts in the Gremlin Control Panel.

Registering with Gremlin

Run gremlin init to initialize a new client session with the Gremlin Service. This command will authenticate the Gremlin client and assign tags to it. These tags can be used to filter attacks in the Web UI, e.g. to only attack service X in region Y.

Tagging Gremlin Clients

Every Gremlin client can be tagged with a set of key-value pairs.

gremlin init \
    --tag service=api \
    --tag service-version=1.0.0 \
    --tag service-type=http

Tagging Gremlin Clients on EC2

If your Gremlin client is running on an EC2 instance, Gremlin will try to inspect AWS EC2 metadata to determine the following tags:

  • region
  • zone
  • public-ip
  • public-hostname

Any of these tags can also be supplied via the --tag argument and will take priority over auto-discovery.

gremlin init --tag zone=my-custom-zone

Environment Variables

gremlin init supports the following environment variables:

Environment variable Description
GREMLIN_ORG_ID Your Org ID, required for authentication
GREMLIN_ORG_SECRET Your Org secret, required for authentication
GREMLIN_IDENTIFIER Custom name assigned to the client
GREMLIN_CONFIG_SERVICE Service or group tag
GREMLIN_CONFIG_REGION Region or datacenter
GREMLIN_CONFIG_ZONE Availability zone
GREMLIN_CONFIG_PUBLIC_IP Public IP address
GREMLIN_CONFIG_PUBLIC_HOSTNAME Public hostname
GREMLIN_CONFIG_LOCAL_IP Internal IP address
GREMLIN_CONFIG_LOCAL_HOSTNAME Internal hostname

Conclusion

You’ve now configured Gremlin by registering Gremlin Clients, adding tags and setting environment variables. You now possess tools that make it possible for you to explore additional Gremlin Attacks including attacks that impact State and Network.

You can also explore the Gremlin Blog for more information on how to use Chaos Engineering with your application infrastructure.