ExceptionLess windows部署。

前言

windows部署

1、一个api项目,里面包含了所有api。

2、一个elasticsearch项目,用来存储相关数据。

3、一个UI项目,也就是查看异常、设置新异常邮件通知等操作的后台。

异常在客户端提交的代码原理:一个异常被提交,先写入一个队列,然后随后会被post 到 api ,api收到数据后也是先写队列,然后再通过job作业同步到elasticsearch。
expectionless允许不要redis缓存,job作业随api项目一起启动,不需要单独部署。
综上,该项目最小化运行的方案:不要redis,不要job单独进程,只需要部署:1、api项目。2、elasticsearch项目。3、ui项目

ExceptionLess

  • 进入Github下载最新包。

    • 本次采用ExceptionLess 8.0
    • net 7 runtime
    • ElasticSearch至少为 7.x
  • Visual Studio 编译项目。打开Exceptionless.Web 编译项目。

  • 参考配置如下

    • 发布环境运行appsettings.Production.yml配置文件。
    • 配置文件键值对 xx=xx;xx=xx
    • css放置在文件夹中编译完成拷贝。js会错误。
ConnectionStrings:
  Redis: server="192.11.0.22:6379,defaultDatabase=6,password=pwd,connectTimeout=1500,connectRetry=1,syncTimeout=1000,abortConnect=false"
  Elasticsearch: server=http://192.168.199.30:9200
  Cache: provider=redis;
  MessageBus: provider=redis;
  Queue: provider=redis;
  Storage: provider=folder;path=.\storage
#  LDAP: ''
# 此处为邮件发送,例如:smtps://xxx%40qq.com:xxx@smtp.qq.com:465 . 邮箱地址@请转义为 %40
#  Email: smtp://localhost:1025 

# Base url for the ui used to build links in emails and other places.
BaseURL: 'http://localhost:9001/#!'

# Email from
SmtpFrom: xxx@xx.com

# Wether or not to run the jobs in process. Requires Redis to be configured when running jobs out of process.
RunJobsInProcess: true
#AppScope: dev
#EnableAccountCreation: false
#DisableIndexConfiguration: false
#AllowedOutboundAddresses: "exceptionless"

Serilog:
  MinimumLevel:
    Default: Debug

Apm:
  #Endpoint: http://localhost:4317
  Insecure: true
  #SslThumbprint: CB16E1B3DFE42DF751F93A8575942DA89E10BC98
  EnableLogs: false
  EnableTracing: false
  EnableMetrics: true
  FullDetails: true
  Debug: false
  Console: false

  • 邮件配置

    • 取得SMTP授信信息。例如QQ smtps://10000:bsvfwsfcucxwagfa@smtp.qq.com:465
    • 接收邮件服务器: pop.qq.com,使用 SSL,端口号 995
    • 发送邮件服务器: smtp.qq.com,使用 SSL,端口号 465 或 587
    • smtps://QQ号:授权码@发送邮件服务器
    • 配置额外参数 SmtpFrom: xxx@xx.com。此处在官方配置文件并没有
  • 在8.0版本中,ExceptionLess已将UI项目集成到Exceptionless.Web

    • 本地安装Node
    • Visual Studio Code打开ClientApp项目
    • npm install安装依赖
    • npm run build编译项目
    • npm run serve运行编译项目
    • 编译之后的项目文件为ClientApp中的dist文件
    • app.config.97c8c67dce8f8f20.js类似此名字,为配置文件。
    • 配置UI项目中的BASE_URL即可
    • 参考如下
    (function () {
        'use strict';
    
        angular.module('app.config', [])
            .constant('BASE_URL', 'https://localhost:5201')
            .constant('EXCEPTIONLESS_API_KEY')
            .constant('EXCEPTIONLESS_SERVER_URL')
            .constant('FACEBOOK_APPID')
            .constant('GITHUB_APPID')
            .constant('GOOGLE_APPID')
            .constant('INTERCOM_APPID')
            .constant('LIVE_APPID')
            .constant('SLACK_APPID')
            .constant('STRIPE_PUBLISHABLE_KEY')
            .constant('SYSTEM_NOTIFICATION_MESSAGE')
            .constant('USE_HTML5_MODE', false)
            .constant('USE_SSL', false)
            .constant('ENABLE_ACCOUNT_CREATION', true);
        }());
    

ElasticSearch

  • 服务器安装ElasticSearch
  • 需安装对应mapper-size插件!!!非常重要!!
    • Mapper-Size
    • 相关端口,IP地址开放
    • 如果不启用SSL,需要停用

Redis

  • 服务器安装Redis

其它事项

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值