Sentry¶
Sentry is used for crash monitoring on Python and Django side. This note will help you setup and integrate sentry
Install dependencies¶
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y clang
sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo apt-get install -y libsourcemap
sudo apt-get install -y libxml2-dev
sudo apt-get install -y libxml2-dev libxslt1-dev
sudo apt-get install -y software-properties-common
sudo apt-get install pip
Note: You need to upgrade cmake to version 3.5.2 or above for the sentry installation. Check cmake documentation for the latest version. We are using 3.5.2.
wget http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz
tar xf cmake-3.5.2.tar.gz
cd cmake-3.5.2
./configure
sudo make install
Install and setup Postgres
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
sudo apt-get install postgresql postgresql-contrib
Create Database¶
sudo su postgres
psql
On database shell type,
CREATE DATABASE sentry;
ALTER USER postgres WITH PASSWORD 'postgres';
Install Sentry¶
Make sure you’ve selected the right virtual environment before you install python packages
pip install --upgrade pip
pip install sentry
Configure Sentry¶
Execute on shell
sentry init
This will ask you for the initial setup for the config files for Sentry. Press enter for default.
Make sure to test installation using
SENTRY_CONF=/home/sentry/.sentry sentry upgrade
SENTRY_CONF=/home/sentry/.sentry sentry createuser
SENTRY_CONF=/home/sentry/.sentry sentry run cron
Finalize installation¶
As a final step, install supervisor and nginx
pip install supervisor
sudo apt-get install nginx