Supported providers
Supported sandbox providers lists every provider with its workflow and CI runner support. Each provider’s page lists the fields to enter, the key to create, and the permissions that key needs. Use a provider key limited to creating and deleting sandboxes. Keep it separate from any key you connect to CostGraph for cost data.Connect
- In CostGraph, go to Integrations > Sandbox, and select your provider.
- Enter the provider’s key and any other required fields. The provider’s page lists them.
- Click Connect.
<Provider> refused CostGraph's key; reconnect it on Integrations.
Connect it again with a key that works.
Run your own dispatcher
The dispatcher is the container that holds your provider key and starts the sandboxes. It’s the same dispatcher as in running workflows in your environment. Only where each sandbox runs changes. In a self-hosted installation, first set up the relay in Run workflows in your cluster.Before you begin
- A CostGraph API key with the
deployment:registerandsandbox:workerscopes. The first pulls the dispatcher image fromregistry.costgraph.ai, the second lets the dispatcher take code changes. - Credentials for one account listed in Supported providers.
- Somewhere to run one container that can reach
agent-relay.costgraph.aiand your provider’s API over port 443.
Install
Each provider’s page names itsprovider value and the variables to set in
the dispatcher’s environment.
- Kubernetes
- Docker
Store the provider credentials in a Secret whose keys are the variable
names, then install the chart with your provider:Create
costgraph-sandbox-key and costgraph-registry as described in
Install. With a managed
sandbox provider the dispatcher needs no permissions in the cluster.WORKER_NAME names this dispatcher in CostGraph: lowercase letters, digits and
hyphens, up to 63 characters. After it connects, it is available in a
goal’s Sandbox setting. See
Choose where a goal runs.
Sandbox image
By default each sandbox starts from the provider’s default image, and the dispatcher installs the agent into it before the code change starts. The image must havecurl, sha256sum, base64 and git, and either run as root or
allow sudo. The install adds a few seconds to every code change.
To skip the install and add your own tools, build a template in your provider.
It must already contain the agent and our two scripts. Then name it in your own
dispatcher:
registry.costgraph.ai/costgraph-sandbox-worker, with your provider’s own
template tooling. The requirements are the same as for
your own sandbox image.
Network
Each provider controls egress in its own settings. The sandbox must reachagent-relay.costgraph.ai and github.com on port 443. Everything else is your
choice.
Lifetime and cost
A code change that runs longer than two hours is stopped, and the provider removes its sandbox. On your own dispatcher,dispatcher.sandbox.ttlSeconds
sets this timeout. Sandbox time is billed by your provider to your account.
If your own dispatcher stops while a code change is running, that sandbox keeps
running until the change ends or the timeout removes it.
Arker, Sail and Uno sandboxes have no lifetime, so the timeout cannot remove
them. Delete any that a stopped dispatcher leaves behind.