How to Self Host Sentry?

Step-1: You need to start with setting up your Kubernetes Cluster, to know the Step-by-step flow of setting up a cluster follow these Instructions.

Step-2: Navigate to the "App Store" section on the left side navigation bar. And type 'sentry', in the search bar.

Step-3: Click on the 'Sentry' app card on the App store to open the 'Pre Deployment' screen of Sentry open source app.

  • Select the desired 'Cluster' where you want to deploy the Sentry app. If there is no cluster been added yet, you will be asked to be first add a cluster and then start the Sentry deployment process.

  • The input field beside the cluster input drop-down is for entering the desired 'Namespace' where you want to deploy the Sentry and it resources.

Step-4: Once you fill in the cluster details, you can switch to the next tab - 'Environment Variables'.

  • At the top right corner, click on the 'Chart Version' drop-down, where you can select your desired Sentry helm chart version to deploy it on your cluster.

Step-5: Once you finalize your Sentry Helm Chart Version, it will open the values.yaml file on this screen, where you have to edit the following variables:

  1. Disable the 'Ingress' variable key:

    ingress: enabled: false

  2. Search for "controller" in the search bar inside the Monaco code editor:

  • You will be directed to this section where just below the variable 'controller' add an extra variable:

    broker:

    replicaCount: 1

  1. Search for "pdb" in the search bar inside the Monaco code editor:

  • Change the key value create: true to create: false.

Step-6: After setting up all the above variable values, hit on the CTA 'Deploy' button at the top right corner.

  • You will be redirected to the Logs page where you can check the details of each step which Scoutflo automates for the deployment of the Sentry open source tool.


Post Deployment of Sentry:

  • Once the Sentry app is successfully deployed you can open the 'Post Deploy' screen of the Sentry, where you can check all these details:

  • When you try to open the App URL, you will see this error on the externally exposed service:

  • You will have to take two more steps before being able to start using the Sentry.

  1. Post the Sentry deployment, there are various cronjobs that are automatically run for clean up and setup of the Sentry Databases.

  2. First we need to run an script which will run a command 'Sentry Upgrade' which is used to do the PostgreSQL DB migration and create a new Sentry Organization.

resource: |
  apiVersion: batch/v1
  kind: Job
  metadata:
   name: sentry-upgrade
   namespace: <your-sentry-namespace>
   labels:
   app: sentry
   component: upgrade
  spec:
   backoffLimit: 1
   template:
   spec:
   restartPolicy: Never
   containers:
   - name: sentry-upgrade
   image: ghcr.io/getsentry/sentry:25.8.0
   command: ["sentry", "upgrade", "--noinput"]
   env:
   - name: SENTRY_SECRET_KEY
   valueFrom:
   secretKeyRef:
   name: <your-sentry-namespace>-sentry-secret
   key: key
   - name: POSTGRES_PASSWORD
   valueFrom:
   secretKeyRef:
   name: <your-sentry-namespace>-sentry-postgresql
   key: postgres-password
   - name: POSTGRES_USER
   value: postgres
   - name: POSTGRES_NAME
   value: sentry
   - name: POSTGRES_HOST
   value: <your-sentry-namespace>-sentry-postgresql
   - name: POSTGRES_PORT
   value: "5432"
   - name: SNUBA
   value: http://<your-sentry-namespace>-snuba:1218
   - name: VROOM
   value: http://<your-sentry-namespace>-vroom:8085
   volumeMounts:
   - name: config
   mountPath: /etc/sentry
   volumes:
   - name: config
   configMap:
   name: <your-sentry-namespace>-sentry

Organization creation details:

  • The Sentry upgrade command internally creates a default organization in the database as part of migrations.

  • The organization is not explicitly named in the Kubernetes job YAML.

  • Usually, the default organization will be created with a default or internal name.

  • To customize or rename the organization (e.g., "Your-org-Sentry"), you typically do this after login via the Sentry UI or through Sentry API.

  • The superuser created in the second job can log in and manage the organization settings afterward.

  1. Run another Script to create a username and password to signup in the Sentry organization created above.

resource: |
  apiVersion: batch/v1
  kind: Job
  metadata:
    name: sentry-create-superuser
    namespace: <your-sentry-namespace>
    labels:
      app: sentry
      component: create-superuser
  spec:
    backoffLimit: 1
    template:
      spec:
        restartPolicy: Never
        containers:
          - name: sentry-create-superuser
            image: ghcr.io/getsentry/sentry:25.8.0
            command:
              - sentry
              - createuser
              - --email
              - <your-login-email>
              - --password
              - <your-login-pssword>
              - --superuser
              - --no-input
            env:
              - name: SENTRY_SECRET_KEY
                valueFrom:
                  secretKeyRef:
                    name: <your-sentry-namespace>-sentry-secret
                    key: key
              - name: POSTGRES_PASSWORD
                valueFrom:
                  secretKeyRef:
                    name: <your-sentry-namespace>-sentry-postgresql
                    key: postgres-password
              - name: POSTGRES_USER
                value: postgres
              - name: POSTGRES_NAME
                value: sentry
              - name: POSTGRES_HOST
                value: <your-sentry-namespace>-sentry-postgresql
              - name: POSTGRES_PORT
                value: "5432"
              - name: SNUBA
                value: http://<your-sentry-namespace>-snuba:1218
              - name: VROOM
                value: http://<your-sentry-namespace>-vroom:8085
            volumeMounts:
              - name: config
                mountPath: /etc/sentry
        volumes:
          - name: config
            configMap:
              name: <your-sentry-namespace>-sentry

Scoutflo Voyager:

  • To continue the Post Deployment setup of the Sentry app, you can use the Scoutflo's AI powered Kubernetes Chat to directly apply the above Job scripts in your cluster where the sentry is setup.

  • Click on the CTA button "Try Scoutflo AI":

  • Navigate to the "Provisioner" mode on the left side nav bar:

  • Click and switch to the "Kubernetes" sub mode and select the cluster you have deployed the Sentry:

  • You can now enter your NLP prompt for applying the job scripts.

Last updated