Brief introduction
Sentry is a real-time event logging and collection platforms. Its focus on error monitoring, and post-processing to extract all the required information without relying on cumbersome user feedback.
Preparing the Environment
- ubuntu
- docker this
- git
- sentry
Installation in ubuntu docker-ce
- Older versions of ubuntu is called docker, docker.io or docker-engine. If you have already installed, uninstall them
sudo apt-get remove docker docker-engine docker.io containerd runc
- Update apt Package Index
sudo apt-get update
- Apt to allow the installation package repository over HTTPS
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- Add the official GPG key Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
Search by last 8 characters of the fingerprint, verify that you now have the keys with fingerprints.
sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
- Set stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
If the ModuleNotFoundError: No module named 'apt_pkg'
wrong solution
sudo apt-get remove --purge python-apt
sudo apt-get install python-apt -f
cd /usr/lib/python3/dist-packages/
sudo cp [apt_pkg.cpython-3?m-x86_64-linux-gnu.so](apt_pkg.cpython-3?m-x86_64-linux-gnu.so) [apt_pkg.cpython-36m-x86_64-linux-gnu.so](apt_pkg.cpython-36m-x86_64-linux-gnu.so)
- Update apt package index.
sudo apt-get update
- Install the latest version of Docker CE and containerd
sudo apt-get install docker-ce docker-ce-cli containerd.io
To install a specific version of Docker CE, please list the available versions in the repo, and then select and install:
- List your warehouse available version
apt-cache madison docker-ce
docker-ce | 5:18.09.1~3-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 5:18.09.0~3-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 18.06.1~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 18.06.0~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
...
For example, the second column used in certain versions version string. 5: 18.09.1 3-0 Ubuntu-xenial
sudo apt-get install docker-ce=5:18.09.0~3-0~ubuntu-xenial
- Start docker Service
systemctl status docker
- Hello-world image by running verify Docker CE installed correctly.
sudo docker run hello-world
-
The following represents the docker-ce successful installation.
Install git
Installation git clone sentry mainly used items on the github
sudo apt-get install git
Installation sentry server
- Ubuntu easily find a path in the local storage cloned down sentry, perform the following path begins clone
git clone https://github.com/getsentry/onpremise.git
After cloning sentry project, cd to the project
cd onpremise
- Create a local database file storage and sentry
docker volume create --name=sentry-data && docker volume create --name=sentry-postgres
- Creating env configuration file
cp -n .env.example .env
- Construction and service marks Docker
docker-compose build
5. generate the key
docker-compose run --rm web config generate-secret-key
Copy the generated key to .env file SENTRY_SECRET_KEY = back
Note: .env are hidden files ls -a can be viewed
vim .env
6. Building the database. Use the interactive prompt to create a user account
docker-compose run --rm web upgrade
- Start Service
docker-compose up -d
- Open a browser to access localhost: 9000
ok, enter the account password created on top of the landing.
The sentry even build a good system, the next step is to integrate it into the project.
Specific Integrated Reference sentry official documents
Reproduced in: https: //www.jianshu.com/p/513d107f255e