NanoFabric-ServiceFabric 操做手冊

service-fabric-52abp-ocelot

A Service Fabric sample with a Frontend, one API Gateway and 52abp Microservices
基於Service fabric + Ocelot + Identity Server4 + 52ABP 的案例展現前端

倉庫地址信息:https://github.com/geffzhang/NanoFabric-ServiceFabric
本案例是由張善友staneee梁桐銘 共同協做打造
基於Service fabric + Ocelot + Identity Server4 + 52ABP 的案例展現git

關於service farbic的基礎部分參考

https://docs.microsoft.com/zh-cn/azure/service-fabric/service-fabric-overview
以上爲 基礎內容github

解決方案內項目說明

項目截圖.png

1 Service Fabric Application -> NanoFabric_ServiceFabric

ServiceFabric App,可理解爲其他全部項目的啓動引導

2 IdentityServer 4 -> ServiceOAuth

IdentityServer4 Server

3 Gateway (Ocelot) -> Gateway

API網關

4 Microservices -> 01 - ServiceA -> ServiceA

default values api
IdentityServer4 Client:default.client

5 Frontend(52ABP) -> LTMCompanyNameFree.YoyoCmsTemplate.Web.Host

52ABP API Host,無狀態服務,端口10090
IdentityServer4 Client:52abp.client

5 Frontend(52ABP) -> SPAHost

52abp前端計算靜態站點,無狀態服務,端口10091
運行程序前,使用命令行打開此路徑
一、輸入 npm install 還原依賴  或  輸入 yarn 進行還原依賴
二、還原成功後,輸入 npm run build 打包

5 Frontend(52ABP) -> FrontendConsoleApp

測試的控制檯程序

5 Frontend(52ABP) -> 52ABP -> All

* 此目錄下爲 ServiceOAuth 和 LTMCompanyNameFree.YoyoCmsTemplate.Web.Host的依賴

* ServiceOAuth 依賴於 52ABP 的 User 和登錄等等,其他都不依賴,只是爲了臨時使用方便

* LTMCompanyNameFree.YoyoCmsTemplate.Web.Host 依賴全部,並提供全部api

本地啓動項目操做說明

一、 啓動 Service fabric local cluster manager ,保證本地集羣是打開的狀態。
image.png
二、 打開NanoFabric-ServiceFabric.sln解決方案,須要使用管理員權限這點很重要,不然報錯。
三、 默認生成數據庫內容,LTMCompanyNameFree.YoyoCmsTemplate.Migrator啓動遷移文件工具,生成數據庫。
image.png
四、52abp前端計算靜態站點,無狀態服務,端口10091 運行程序前,使用命令行打開此路徑,
須要編譯前端包,打開ClientApp而後運行web

一、輸入 npm install 還原依賴  或  輸入 yarn 進行還原依賴
二、還原成功後,輸入 npm run build 打包

五、設置NanoFabric_ServiceFabric爲默認啓動項目,而後啓動它。
image.png數據庫

六、啓動成功,訪問 http://localhost:10091npm

調用的是ocelot的網關

## PS: 帳號和密碼
默認帳號:Admin
默認密碼:123qweapi

相關文章
相關標籤/搜索