Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

This is an example of a standard production-sized Braintrust data plane deployment. Copy this directory to a new directory in your own repository and modify the files to match your environment.

Tip

For a smaller deployment suitable for testing and evaluation, see examples/braintrust-data-plane-sandbox/.

Configure Terraform

  • provider.tf should be modified to use your AWS account and region.
  • terraform.tf should be modified to use the remote backend that your company uses. Typically this is an S3 bucket and DynamoDB table.
  • main.tf should be modified to meet your needs for the Braintrust deployment. The defaults are sensible only for a small development deployment.
  • Brainstore requires a license key which you can find in the Braintrust UI under Settings > Data Plane Brainstore License Key
  • The recommended approach is to store the license key in AWS Secrets Manager and reference it using a Terraform data source:
    data "aws_secretsmanager_secret_version" "brainstore_license" {
      secret_id = "braintrust/brainstore-license-key"
    }
    Then pass data.aws_secretsmanager_secret_version.brainstore_license.secret_string as the brainstore_license_key value in the module.
  • Alternatively, you can pass the key without storing it in Secrets Manager:
    • Set TF_VAR_brainstore_license_key=your-key in your terraform environment
    • Pass it into terraform as a flag terraform apply -var 'brainstore_license_key=your-key'
    • Add it to an uncommitted terraform.tfvars or .auto.tfvars file.

Initialize your AWS account

If you're using a brand new AWS account for your Braintrust data plane you will need to run ./scripts/create-service-linked-roles.sh once to ensure IAM service-linked roles are created.

Pointing your Organization to your data plane

After applying this configuration you will have a Braintrust data plane deployed in your AWS account. You can then run terraform output to get the API URL you need to enter into the Braintrust UI for your Organization.

❯ terraform output
api_url = "https://dx6ntff6gocr6.cloudfront.net"

To configure your Organization to use your new data plane, click your user icon on the top right > Settings > Data Plane.

Warning

If you are testing, it is HIGHLY recommended that you create a new Braintrust Organization for testing your new data plane. If you change your live Organization's API URL, you might break users who are currently using it.

Setting the API URL in Braintrust

Click Edit

Edit the API URL in Braintrust

Paste the API URL into the text field, and click Save. Leave the Proxy and Realtime URL blank.

Paste the API URL

Verify in the UI that the ping to each endpoint is successful. Verify Successful Ping