环境:centos7、docker19

基础环境需求

* Docker 17.05.0+
* Compose 1.23.0+

流程:docker安装-->docker-compose安装-->clone项目-->安装sentry-->启动sentry-->访问验证(可以直接查看安装文档  more onpremise/README.md )

1、sentry概念

    Sentry是一个实时事件日志记录和汇集的日志平台,其专注于错误监控,以及提取一切事后处理所需的信息。他基于Django开发,目的在于帮助开发人员从散落在多个不同服务器上的日志文件里提取发掘异常,方便debug。Sentry由python编写,源码开放,性能卓越,易于扩展,
目前著名的用户有Disqus, Path, mozilla, Pinterest等。它分为客户端和服务端,客户端就嵌入在你的应用程序中间,程序出现异常就向服务端发送消息,服务端将消息记录到数据库中并提供一个web节目方便查看。 sentry是一个强大的分布式报错信息收集平台,图形化程度很高,可以帮助我们直观的发现当前部署的系统存在哪些问题。

2、docker-compose安装

下载文件
链接: https://pan.baidu.com/s/1iVw8HoLHnDlE9sKZhKllPQ 提取码: v8sj
上传文件到目录/usr/local/bin 
chmod +x /usr/local/bin/docker-compose

3、下载sentry项目

git clone https://github.com/getsentry/onpremise.git

4、安装sentry并输入管理员用户密码

cd onpremise
./install.sh
.......
显示输入管理员邮箱 密码
......
Generating Relay credentials...
Relay credentials written to relay/credentials.json

----------------
You're all done! Run the following command to get Sentry running:

  docker-compose up -d

5、docker-compose up -d 启动所有服务

[root@k8s-node2 onpremise]# docker ps -a
CONTAINER ID        IMAGE                                                                     COMMAND                  CREATED             STATUS                      PORTS                          NAMES
91517d13a589        nginx:1.16                                                                "nginx -g 'daemon of…"   19 minutes ago      Up 19 minutes               0.0.0.0:9000->80/tcp           sentry_onpremise_nginx_1
9995e22e6ce8        sentry-onpremise-local                                                    "/bin/sh -c 'exec /d…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_cron_1
2a299b656dbb        sentry-cleanup-onpremise-local                                            "/entrypoint.sh '0 0…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_sentry-cleanup_1
4a1b6ad6144f        sentry-onpremise-local                                                    "/bin/sh -c 'exec /d…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_post-process-forwarder_1
94193f7117cc        sentry-onpremise-local                                                    "/bin/sh -c 'exec /d…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_web_1
fe1132ad6014        sentry-onpremise-local                                                    "/bin/sh -c 'exec /d…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_ingest-consumer_1
4e0165b5838a        sentry-onpremise-local                                                    "/bin/sh -c 'exec /d…"   19 minutes ago      Up 19 minutes               9000/tcp                       sentry_onpremise_worker_1
e76f985645d2        getsentry/relay:latest                                                    "/bin/bash /docker-e…"   19 minutes ago      Up 19 minutes               3000/tcp                       sentry_onpremise_relay_1
67d35258365b        snuba-cleanup-onpremise-local                                             "/entrypoint.sh '*/5…"   19 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-cleanup_1
94748fa6b6ea        symbolicator-cleanup-onpremise-local                                      "/entrypoint.sh '55 …"   19 minutes ago      Up 19 minutes               3021/tcp                       sentry_onpremise_symbolicator-cleanup_1
6f155bec15fe        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-api_1
f4bcb44d143f        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-consumer_1
017bae2465d0        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-sessions-consumer_1
d6455150efa5        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-replacer_1
96aa886284b9        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-outcomes-consumer_1
dc93de67c8e2        getsentry/snuba:latest                                                    "./docker_entrypoint…"   38 minutes ago      Up 19 minutes               1218/tcp                       sentry_onpremise_snuba-transactions-consumer_1
4226c8d8aea6        memcached:1.5-alpine                                                      "docker-entrypoint.s…"   38 minutes ago      Up 19 minutes               11211/tcp                      sentry_onpremise_memcached_1
23c69c6ec4fe        postgres:9.6                                                              "docker-entrypoint.s…"   38 minutes ago      Up 19 minutes               5432/tcp                       sentry_onpremise_postgres_1
3602fcf04d0b        getsentry/symbolicator:latest                                             "/bin/bash /docker-e…"   38 minutes ago      Up 19 minutes               3021/tcp                       sentry_onpremise_symbolicator_1
419fce9177a7        tianon/exim4                                                              "docker-entrypoint.s…"   38 minutes ago      Up 19 minutes               25/tcp                         sentry_onpremise_smtp_1
f858cce674ba        confluentinc/cp-kafka:5.5.0                                               "/etc/confluent/dock…"   39 minutes ago      Up 19 minutes               9092/tcp                       sentry_onpremise_kafka_1
90e0ebd70cd2        confluentinc/cp-zookeeper:5.5.0                                           "/etc/confluent/dock…"   39 minutes ago      Up 19 minutes               2181/tcp, 2888/tcp, 3888/tcp   sentry_onpremise_zookeeper_1
b377d34ef836        yandex/clickhouse-server:20.3.9.70                                        "/entrypoint.sh"         39 minutes ago      Up 19 minutes               8123/tcp, 9000/tcp, 9009/tcp   sentry_onpremise_clickhouse_1
4d11e54544ae        redis:5.0-alpine                                                          "docker-entrypoint.s…"   39 minutes ago      Up 19 minutes               6379/tcp                       sentry_onpremise_redis_1

6、登陆http://ip:9000,用户密码密码为刚才上方输入的用户名密码centos7使用docker安装sentry