最近研究微服务,在GitHub上看到这个微服务框架,研究并学习。。。
功能还是比较齐全的,集成了consul,DotNetty ,skywalking,Mq。。。
记录下windows启动过程:
skywalking需要自己配置以下,先下载skywalking,https://archive.apache.org/dist/skywalking/ 下载7.0的版本,下载完成后去\apache-skywalking-apm-7.0.0\apache-skywalking-apm-bin\bin文件夹中,双击startup.bat,不管三七二十一,先跑起来(如果没有java jdk,需要先安装下jdk)。高版本我本地测试,连接成功,但就是没有数据
项目Jimu.Client.Diagnostic.Skywalking 依赖项,SkyAPM.Agent.AspNetCore和SkyAPM.Agent.GeneralHost降级到0.9版本,本地1.2版本怎么试都没数据。。。
然后去Samples/ApiGateway,修改skyapm.json, 修改Servers节点"Servers": "192.168.117.108:11800",这里的ip改成自己电脑的ip,修改Properties/launchSettings.json,主要是增加了标红行的配置
{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:54762", "sslPort": 0 } }, "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "launchUrl": "swagger", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SkyAPM.Agent.AspNetCore" } }, "ApiGateway": { "commandName": "Project", "launchBrowser": true, "launchUrl": "weatherforecast", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SkyAPM.Agent.AspNetCore" }, "applicationUrl": "http://localhost:5000" } } }
下载consoul,https://www.consul.io/downloads,在exe所在文件夹地址栏输入cmd,执行命令consul agent -dev
然后右键解决方案,多启动项,ApiGateway、Server.Auth、Server.Order、Server.User,启动,启动成功后界面:
框架地址:https://github.com/grissomlau/jimu