sentry搭建和使用

premise安装:https://github.com/getsentry/onpremise

cp sentry/config.example.yml sentry/config.yml 

cp sentry/sentry.conf.example.py sentry/sentry.conf.py

执行install.sh 

安装完成后打开:ip:9000端口即可

 

docker安装参考:https://hub.docker.com/_/sentry/

How to setup a full Sentry instance

  1. Start a Redis container

    $ docker run -d --name sentry-redis redis
  2. Start a Postgres container

    $ docker run -d --name sentry-postgres -e POSTGRES_PASSWORD=secret -e POSTGRES_USER=sentry postgres
  3. Generate a new secret key to be shared by all sentry containers. This value will then be used as the SENTRY_SECRET_KEY environment variable.

    $ docker run --rm sentry config generate-secret-key

    生成的密码:
    n2er7#1^&&=v*w%%jvwg46wlv!59vt^*^qgid_fn1(e#mhe*t! 

  4. If this is a new database, you'll need to run upgrade

    $ docker run -it --rm -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-postgres:postgres --link sentry-redis:redis sentry upgrade

    Note: the -it is important as the initial upgrade will prompt to create an initial user and will fail without it

  5. Now start up Sentry server  -p 9000:9000 启动端口映射

    $ docker run -d --name my-sentry -p 9000:9000 -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-redis:redis --link sentry-postgres:postgres sentry
  6. The default config needs a celery beat and celery workers, start as many workers as you need (each with a unique name)

    $ docker run -d --name sentry-cron -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-postgres:postgres --link sentry-redis:redis sentry run cron
    $ docker run -d --name sentry-worker-1 -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-postgres:postgres --link sentry-redis:redis sentry run worker

Port mapping

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used. Just add -p 8080:9000 to the docker run arguments and then access either http://localhost:8080 or http://host-ip:8080 in a browser.

Configuring the initial user

If you did not create a superuser during upgrade, use the following to create one:

$ docker run -it --rm -e SENTRY_SECRET_KEY='<secret-key>' --link sentry-redis:redis --link sentry-postgres:postgres sentry createuser

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值