1. Introduction
-
According to the main Sentry monitoring deployment and usage process, use
Docker 方式
the deployment method. -
docker 方式
The deployment operation is relatively simple, and it is also the official method recommended by Sentry . Just follow the method provided by Sentry On-Premise and deploy step by step. Or you can directly refer to Docker to deploy Sentry to monitor Django applications and use Email+DingTalk notification .
2. Deployment
-
1.
Windows
In the environment, you also need to configureWSL
the environment (notWindows
skip)-
turn on
Windows 虚拟化
andLinux 子系统(WSL2)
-
Ubuntu(乌班图)
It is an operating system based onDebian
desktop applicationsLinux
, which can be searched and downloaded online in the application, or installed through commands. -
The command install (default install
ubuntu linux
) must be run onWindows 10 版本 2004
and above (build19041
and above) orWindows 11
to use the following:# 安装好 ubuntu 后,并启动,会要求输入账号密码 $ wsl --install # 上面等于下面,默认安装就是 Ubuntu $ wsl --install -d Ubuntu # 输出 正在安装: Ubuntu 已安装 Ubuntu。 正在启动 Ubuntu... Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: <https://aka.ms/wslusers> Enter new UNIX username: xxxx New password: Retype new password: passwd: password updated successfully Installation successful! To run a command as administrator (user "root"), use "sudo <command>". ...
After installation, how to enter
ubuntu
?1. You can
cmd/PowerShell
execute$ ubuntu
the command in to enterubuntu
.2. In the system search, search for
ubuntu
the application and open it.[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-7p3ilgDl-1689156412262) (https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d111dd5ab9fd4e4c9c1410f973524359~tplv-k3 u1fbpfcp-watermark.image?)]
-
Upgrade
wsl1
towsl2
(note that it must be opened with administrator privilegesPowerShell
)# 查看版本 $ wsl -l -v # 全部子系统使用版本 2 $ wsl --set-default-version 2 # 指定某个子系统使用版本 2 $ wsl --set-version Ubuntu 2
-
switch default subsystem
$ wslconfig /setdefault Ubuntu
-
-
2. Docker installation and basic use
-
Note: If it is
windows
installation, the original plan is that the machine needs to be installedDocker Desktop
, turned onUbuntu
,linux
installed in the subsystemDocker
, and then connectedwindows
toDocker Desktop
.But the blogger found that after the machine is installed and
Docker Desktop
hasDocker
the environment, it is also possible to enterUbuntu Linux
and enter$ docker -v
, so let's use it like this.
-
-
3. Download
Sentry
the automatic deployment warehouse onpremise-
When downloading, I found
onpremise
that it has been renamedself-hosted
, and you can place the folder anywhere.$ git clone https://github.com/getsentry/self-hosted.git
-
Enter
self-hosted
the folder and execute the installation command.# 进入文件夹 $ cd self-hosted # 执行部署 $ ./install.sh
-
If the error message permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info”: dial unix /var/run/docker.sock: connect: permission denied is reported, click to view the solution, and then Execute the deployment again.
-
Notice! The old version
Sentry On-Premise
does not provideinstall.sh
a script, and at the same time, during the installation process, it will also prompt whether to create a user. Currently, the version used does not create users by default. So you need to manually create a super user:# 创建方式 $ docker-compose run --rm web createuser --email 邮箱 --password 密码 --superuser # 例如 $ docker-compose run --rm web createuser --email [email protected] --password admin --superuser
-
Once created, just log in.
-
Change the name of the organization, switch to Chinese, and switch to the time zone
Shanghai
. After switching, it needs to be refreshed to take effect.
-