Skip to content

Sentry in your environment using the Ametnes Platform#

This tutorial explains how to provision a Sentry data service in your environment using the Ametnes Platform.

Prerequisites#

  • An Ametnes Platform account.
  • A configured Data Service Location.

Provision Sentry on Ametnes Platform#

  1. Sign in to the Ametnes Platform console.
  2. Click New Resource.
  3. Enter:
  4. Name: a unique name for your Sentry service.
  5. Resource Kind: sentry.
  6. Tier: choose a preset tier size that matches your expected event volume and retention needs.
  7. Storage: choose capacity for Sentry's bundled storage-backed services.
  8. Select your Data Service Location.
  9. Click Create.
  10. Save the generated connection details, including the URL.

Deploying data services at scale is easier with the Ametnes Cloud Terraform provider.

Create an API token

In your Ametnes Cloud account:

  1. Navigate to Users.
  2. Click Edit on your user.
  3. Click Get User Token and a user token will be generated for you.
  4. Keep the generated token in a secure place, as it will not be shown again.

Install Terraform

Follow the instructions here to install Terraform on your computer.

Create your project

Add these files to an empty folder on your workstation.

Set up the variables

variables.tf
variable "token" {
  type = string
  description = "The Ametnes Cloud API token to use. Create one in the Ametnes Cloud console for your registered email."
}

variable "username" {
  type = string
  description = "Your Ametnes Cloud registered email address."
}

variable "project" {
  type = string
  description = "The project you'd like to create your resources in."
  default = "Default"
}

Add your API key secrets

secrets.auto.tfvars
username = "Your.Email@domain.com"
token = "YourApiToken"

Define your resources

main.tf
terraform {
  required_providers {
    ametnes = {
      source  = "ametnes.com/cloud/ametnes"
    }
  }
}

provider "ametnes" {
  token    = var.token
  username = var.username
}

data "ametnes_location" "location" {
  name = "Your Data Service Location"
  code = "DSL1"
}

data "ametnes_project" "project" {
  name = var.project
}

resource "ametnes_service" "sentry" {
  name        = "SentryService"
  project     = data.ametnes_project.project.id
  location    = data.ametnes_location.location.id
  kind        = "sentry:26.2"
  description = "Sentry data service"
  capacity {
    storage = 20
  }
  config = {
    architecture     = "Starter"
    "admin.email"    = var.username
    "admin.password" = "YourStrongPassword"
  }
}

output "service_connections" {
  value = ametnes_service.sentry.connections
}

The architecture config option selects the preset tier size (Starter, Small, Basic, Medium, Large, XLarge, 2XLarge, 3XLarge, or 4XLarge) and capacity.storage sizes Sentry's bundled storage. You do not need to attach a separate Network Access resource: it is created for you automatically.

Deploy your Terraform resources

  1. Run terraform init.
  2. Run terraform plan to see the resources that will be created.
  3. Run terraform apply -auto-approve.
  4. Once Terraform finishes, the service_connections output contains the endpoint (URL) of your Sentry service.

Note

Sentry is deployed inside your private environment and is only accessible within your internal network.

Overview#

  1. Open the Sentry URL in a browser (from your resource details in the console, or from the service_connections output if you used Terraform).
  2. On first launch, complete the initial Sentry setup and sign in with the admin credentials you created.
  3. Use the Sentry UI to confirm projects, alerts, and incoming events are working as expected.

Validation checklist#

  • Sentry resource status is online in Ametnes Platform.
  • You can open the Sentry URL and sign in successfully.
  • Configuration changes, such as SMTP, are reflected after the update completes.
  • If you upgraded the version, the resource reports the expected Sentry release.