Deploying Failure Flags on Pivotal Cloud Foundry (PCF)
Supported platforms:
Learn how to use Failure Flags to run application-level reliability tests in Cloud Foundry.
Failure Flags lets you run Gremlin experiments on applications running on Cloud Foundry. This includes adding latency to network calls, generating exceptions, and triggering custom behaviors.
Setting environment variables
You will need to provide several secrets to Gremlin, such as your team ID and certificates for authentication. The easiest method is to create a new vars.yml file containing your variables. Configuration comes in via environment variables and or configuration files.
GREMLIN_SIDECAR_ENABLED
must be set to either true or yes or 1 to enable Failure-Flags-Sidecar. If unset or set to any other value Failure-Flags-Sidecar will operate in NOOP mode.GREMLIN_TEAM_ID
must be set to your Gremlin Team ID. This and other credential material is available through the Gremlin UI.GREMLIN_TEAM_CERTIFICATE
must be set to your Gremlin Team certificate. Newlines may be preserved using the \n escape characters or omited entirely. This and other credential material is available through the Gremlin UI.GREMLIN_TEAM_PRIVATE_KEY
must be set to your Gremlin Team private key. Newlines may be preserved using the \n escape characters or omited entirely. This and other credential material is available through the Gremlin UI.SERVICE_NAME
must be set to the name of the service as you want it to appear in Gremlin. Service names can only contain alphanumeric characters, hyphens, and underscores, and must be less than 64 characters long.
The easiest method is to create a new vars.yml
file containing these variables and their values.
Configuring your deployment manifest
Failure Flags runs on Cloud Foundry using a sidecar. However, unlike the regular Failure Flags sidecar, PCF sidecars run in the same container as your application. To accomplish this, you must download and extract the Failure Flags sidecar to your project folder.
First, download and extract the archive from one of these links, depending on your architecture: arm64 or x86_64.
Next, add the Gremlin sidecar to your deployment manifest. This example shows how to bundle Gremlin with a Python Flask application, including necessary environment variables. You can adjust the memory a
Finally, push your application to Cloud Foundry: