Duologic.sentry

Duologic.sentry

Build Status

This role sets up and installs Sentry using Python.

Requirements

You will need Postgresql and Redis to run Sentry. Check the Example Playbook for details.

NOTE: Make sure your machine has enough memory (at least 2GB) since Sentry’s upgrade has a memory leak. (See getsentry/sentry#8862)

Role Variables

It’s a good idea to create a strong secret key:

sentry_secret_key: 'UNSAFE'

You can install additional packages with pip in the virtual environment, such as a plugin bundle:

sentry_extra_pip_packages:
  - 'sentry-plugins==9.0.0'

The extra packages or plugins might need more settings:

sentry_extra_conf_py: |
    GITHUB_APP_ID = 'Your GitHub Application Client ID'
    GITHUB_API_SECRET = 'Your GitHub Application Client Secret'
    GITHUB_EXTENDED_PERMISSIONS = ['repo']

You can schedule a cleanup of old data and set how many days to keep that data by using:

sentry_schedule_cleanup: true # to schedule a cleanup, true by default
sentry_cleanup_days: 30 # how many days to keep old data

Please note that this won't delete metadata like organization and project settings.

Refer to defaults/main.yml for more configuration options.

Example Playbook

---
- become: true
  hosts: servers
  tasks:
    - name: Enable EPEL repository on EL for Redis role
      yum: pkg=epel-release state=present
      when: ansible_os_family == 'RedHat'
    - import_role:
        name: geerlingguy.redis
    - import_role:
        name: Duologic.postgresql_repository
      vars:
        postgres_repo_version: '9.5'
    - import_role:
        name: geerlingguy.postgresql
      vars:
        postgresql_hba_entries:
            - {type: local, database: sentry, user: sentry, auth_method: trust}
            - {type: local, database: all, user: postgres, auth_method: peer}
        postgresql_databases:
            - name: sentry
        postgresql_users:
            - name: sentry
              db: sentry
              role_attr_flags: SUPERUSER
    - name: Flush handlers to restart services before Sentry is installed
      meta: flush_handlers
    - import_role:
        name: sentry
      vars:
        sentry_db_user: 'sentry'
        sentry_secret_key: 'SAFE'
        sentry_extra_pip_packages:
            - 'sentry-plugins==9.0.0'

Supported Distributions

This project has been tested on CentOS 7, Debian 9, and Ubuntu 18.04.

Known issues with other distributions include:

  • CentOS 6: python2.7 is not available
  • Ubuntu 16.04: redis-server is not available
  • Debian 8: has issues with cryptography (and possibly setuptools)

Check this build for more info.

Testing

Create a python virtualenv and run:

pip install molecule docker-py
molecule test

License

MIT

Author Information

Jeroen Op 't Eynde, jeroen@simplistic.be

Informazioni sul progetto

Sentry installation with Python.

Installa
ansible-galaxy install Duologic.sentry
Licenza
mit
Download
10.7k
Proprietario
Freelance Linux System engineer