Ver Fonte

auto commit 2.1.6-temp

lith há 3 anos atrás
pai
commit
8c638804fc
100 ficheiros alterados com 3592 adições e 985 exclusões
  1. 63 0
      .github/workflows/action-main.yml
  2. 25 25
      Doc/Api/ApiMessage.md
  3. 12 12
      Doc/Api/RegistServiceStation.md
  4. 54 56
      Doc/Api/RpcContextData.md
  5. 68 68
      Doc/Api/SsApiDesc.md
  6. 109 109
      Doc/Api/SsModel.md
  7. 22 22
      Doc/Api/rpcVerify1.md
  8. 59 59
      Doc/Api/rpcVerify2.md
  9. 46 46
      Doc/CommunicationLayer.md
  10. 6 6
      Doc/ReleaseLog/Sers2.0.1.log
  11. 3 3
      Doc/ReleaseLog/Sers2.1.1.log
  12. 110 110
      Doc/Sers2(RequestQueue).md
  13. 64 64
      Doc/Sers微服务协议分层概要.txt
  14. 18 18
      Doc/readme.md
  15. 201 0
      LICENSE
  16. 37 0
      README.md
  17. 36 36
      cpp/CGateway1.2.0/Gateway/log.txt
  18. 27 27
      cpp/CGateway1.2.0/Gateway/readme.md
  19. 12 12
      cpp/CGateway1.2.0/ab压测.txt
  20. 3 3
      cpp/CGateway1.2.0/readme.md
  21. 0 9
      dotnet/Doc/Debug/01 ServiceCenter.bat
  22. 0 7
      dotnet/Doc/Debug/04 Demo.bat
  23. 0 8
      dotnet/Doc/Debug/05 Robot.bat
  24. 41 0
      dotnet/Doc/DevOps/github/30.nuget-pack.sh
  25. 35 0
      dotnet/Doc/DevOps/github/31.nuget-push.sh
  26. 37 0
      dotnet/Doc/DevOps/github/40.dotnet-publish.sh
  27. 75 0
      dotnet/Doc/DevOps/github/41.dotnet-publish-by-netVersion.bash
  28. 51 0
      dotnet/Doc/DevOps/github/50.sers压测CL-publish.sh
  29. 107 0
      dotnet/Doc/DevOps/github/51.sers压测-publish.sh
  30. 102 0
      dotnet/Doc/DevOps/github/70.docker-build.sh
  31. 93 0
      dotnet/Doc/DevOps/github/90.release-build.sh
  32. 58 0
      dotnet/Doc/DevOps/github/91.release-github.sh
  33. 62 0
      dotnet/Doc/DevOps/github/startup.sh
  34. 31 0
      dotnet/Doc/DevOps/k8s/00.svn-checkout.sh
  35. 33 0
      dotnet/Doc/DevOps/k8s/01.svn-update.sh
  36. 42 0
      dotnet/Doc/DevOps/k8s/10.code-changeVersion.sh
  37. 33 0
      dotnet/Doc/DevOps/k8s/20.nuget-publish-main.sh
  38. 19 0
      dotnet/Doc/DevOps/k8s/21.nuget-publish.sh
  39. 46 0
      dotnet/Doc/DevOps/k8s/99.jenkins.sh
  40. 15 15
      dotnet/Doc/HowToRun.md
  41. 0 29
      dotnet/Doc/Publish/ZZZ_copySersStatic.bat
  42. 106 0
      dotnet/Doc/Publish/echo qps.md
  43. 18 0
      dotnet/Doc/Publish/nuget-push to NugetServer.Sers.bat
  44. 0 139
      dotnet/Doc/Publish/pack sers_lib.bat
  45. 0 24
      dotnet/Doc/Publish/publish CL压测.bat
  46. 0 21
      dotnet/Doc/Publish/publish Sers单体压测.bat
  47. 0 45
      dotnet/Doc/Publish/publish sers.bat
  48. 1 1
      dotnet/Doc/PublishFile/CL压测/StartClient.bat
  49. 4 4
      dotnet/Doc/PublishFile/CL压测/StartServer.bat
  50. 32 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/docker导入导出镜像.txt
  51. 3 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/Dockerfile
  52. BIN
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/Gateway
  53. 65 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/appsettings.json
  54. 26 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/readme.md
  55. 5 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/startup.sh
  56. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-robot/Dockerfile
  57. 3 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-robot/root/app/startup.sh
  58. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-sersall/Dockerfile
  59. 3 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-sersall/root/app/startup.sh
  60. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo/Dockerfile
  61. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo/root/app/startup.sh
  62. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gateway/Dockerfile
  63. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gateway/root/app/startup.sh
  64. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gover/Dockerfile
  65. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gover/root/app/startup.sh
  66. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers/Dockerfile
  67. 2 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers/root/app/startup.sh
  68. 87 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/制作镜像Sers.txt
  69. 48 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/制作镜像sers-cgateway-1.2.0.txt
  70. 65 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-cgateway/appsettings.json
  71. 58 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-cgateway/docker部署cgateway.txt
  72. 63 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo-robot/docker部署sers-demo-robot.txt
  73. 58 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo-sersall/docker部署sers-demo-sersall.txt
  74. 60 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo/docker部署sers-demo.txt
  75. 61 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-gateway/docker部署sers-gateway.txt
  76. 61 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-gover/docker部署sers-gover.txt
  77. 66 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers/docker部署sers.txt
  78. 38 0
      dotnet/Doc/PublishFile/SersDocker(2021-05-19)/pack SersDocker.bat
  79. 32 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/docker导入导出镜像.txt
  80. 5 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/Dockerfile
  81. BIN
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/Gateway
  82. 65 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/appsettings.json
  83. 26 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/readme.md
  84. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo-robot/Dockerfile
  85. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo-sersall/Dockerfile
  86. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo/Dockerfile
  87. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-gateway/Dockerfile
  88. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-gover/Dockerfile
  89. 4 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers/Dockerfile
  90. 87 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/制作镜像Sers.txt
  91. 48 0
      dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/制作镜像sers-cgateway-1.2.0.txt
  92. 65 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-cgateway/appsettings.json
  93. 58 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-cgateway/docker部署cgateway.txt
  94. 63 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo-robot/docker部署sers-demo-robot.txt
  95. 58 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo-sersall/docker部署sers-demo-sersall.txt
  96. 60 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo/docker部署sers-demo.txt
  97. 61 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-gateway/docker部署sers-gateway.txt
  98. 61 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-gover/docker部署sers-gover.txt
  99. 66 0
      dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers/docker部署sers.txt
  100. 7 7
      dotnet/Doc/PublishFile/SersPublish/01 ServiceCenter.bat

+ 63 - 0
.github/workflows/action-main.yml

@@ -0,0 +1,63 @@
+# This is a basic workflow to help you get started with Actions
+
+name: CI
+
+# Controls when the action will run. 
+on:
+  # Triggers the workflow on push tag
+  push:
+    tags:
+      - '*'
+
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  # This workflow contains a single job called "build"
+  build:
+    # The type of runner that the job will run on
+    runs-on: ubuntu-latest
+
+    # Steps represent a sequence of tasks that will be executed as part of the job
+    steps:
+      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+      - uses: actions/checkout@v2
+
+      # Runs a set of commands using the runners shell
+      - name: Run startup.sh
+        run: |
+           set -e
+           echo start build
+           export DOCKER_USERNAME="${{ secrets.DOCKER_USERNAME  }}"
+           export DOCKER_PASSWORD="${{ secrets.DOCKER_PASSWORD }}"
+           export NUGET_SERVER="${{ secrets.NUGET_SERVER  }}"
+           export NUGET_KEY="${{ secrets.NUGET_KEY }}"
+           export GIT_SSH_SECRET="${{ secrets.GIT_SSH_SECRET }}"
+           cd ./dotnet/Doc/DevOps/github
+           bash startup.sh
+           echo build succeed!
+
+      - name: Release-Create
+        id: create_release
+        uses: actions/create-release@v1
+        if: hashFiles(env.release_assetPath)
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          release_name: ${{ env.release_name }}
+          tag_name: ${{ env.release_tag }}
+          draft: ${{ env.release_draft }}
+          prerelease: ${{ env.release_prerelease }}
+          body: ${{ env.release_body }}
+      - name: Release-Upload
+        id: upload-release-asset
+        uses: actions/upload-release-asset@v1
+        if: hashFiles(env.release_assetPath)
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a   `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+          asset_path: ${{ env.release_assetPath }}
+          asset_name: ${{ env.release_assetName }}
+          asset_content_type: ${{ env.release_contentType }}

+ 25 - 25
Doc/Api/ApiMessage.md

@@ -1,26 +1,26 @@
-# ApiMessage
->底层为SersFile
-
-## 第一个文件 为 RpcContextData
->json 字符串存储 见RpcContextData.md
- 
-
-## 第二个文件 为 value
->json 字符串存储,亦可为byte[],没有限制
-若为Request 则为 ArgValue
-若为Reply则 为 ReturnValue
-
-
-
-
-
-
-# SersFile
->SersFile是特殊的二进制文件(byte[])
-SersFile消息帧存储一组文件,每个文件都为文件帧格式
-
-
-## 文件帧
->一个文件帧存储一个文件
-              第1部分 FileLen          4 byte,  Int32类型 文件长度
+# ApiMessage
+>底层为SersFile
+
+## 第一个文件 为 RpcContextData
+>json 字符串存储 见RpcContextData.md
+ 
+
+## 第二个文件 为 value
+>json 字符串存储,亦可为byte[],没有限制
+若为Request 则为 ArgValue
+若为Reply则 为 ReturnValue
+
+
+
+
+
+
+# SersFile
+>SersFile是特殊的二进制文件(byte[])
+SersFile消息帧存储一组文件,每个文件都为文件帧格式
+
+
+## 文件帧
+>一个文件帧存储一个文件
+              第1部分 FileLen          4 byte,  Int32类型 文件长度
               第2部分 FileContent      文件内容,长度为FileLen

+ 12 - 12
Doc/Api/RegistServiceStation.md

@@ -1,13 +1,13 @@
-
-
-##  ServiceStation
-
-```javascript
-//Demo:
-{
-	"serviceStationInfo":{  "serviceStationKey":"xxx",... },	
-	"deviceInfo":{ "devicekey":"xxxx",...},	 
-	"apiNodes":[ {"apiDesc":{apiDesc1}},  {"apiDesc":{apiDesc2}},  ...         ]
-}
-
+
+
+##  ServiceStation
+
+```javascript
+//Demo:
+{
+	"serviceStationInfo":{  "serviceStationKey":"xxx",... },	
+	"deviceInfo":{ "devicekey":"xxxx",...},	 
+	"apiNodes":[ {"apiDesc":{apiDesc1}},  {"apiDesc":{apiDesc2}},  ...         ]
+}
+
 ```

+ 54 - 56
Doc/Api/RpcContextData.md

@@ -1,57 +1,55 @@
-
-# RpcContextData
->json 字符串
-
-json key  | 类型 | 说明 | Demo
- ------------- | ------------- | ------------- | ------------- 
-route  | string| 接口路由 |  ApiStation1/path1/path2/api1.html
- | | | 
-user| json| 用户 |
-user.userInfo |json| 用户详细信息 | {"userId":4515222,"姓名":"张三","性别":"男"}
- | | | 
-caller|json|| 
-caller.source| string |  调用来源 |  Internal 或 Outside
-caller.rid| string |requestId|
-caller.callStack| string |调用堆栈| [ ...ppprid,pprid,prid]
- | | | 
-http|json|| 
-http.url| string |       |  http://www.a.com/ApiStation/path1/path2/api1.html?A=b&c=d
-http.method| string |请求类型|   如 POST GET PUT等
-http.statusCode| int |HTTP状态码|   如 200、400等
-http.protocol| string | |   如 "HTTP/2.0"
-http.headers|json| |{"Content-Type":"application/json","Authorization":"Bearer #ssdfdasf"}
- | | | 
-error|SsError|若不为null,则说明接口调用出现异常,只定义架构层级错误,如 api不存在,调用超时等| 
-
-```javascript
-	//Demo:
-    {
-        "route": "/DemoStation/v1/api/5/rpc/2",
-        "caller": {
-            "rid": "8320becee0d945e9ab93de6fdac7627a",
-            "callStack": ["xxxx","xxxxxx"],    // parentRequestGuid array
-            "source": "Outside"
-        },
-        "http": {
-            "url": "https://127.0.0.1:6000/DemoStation/v1/api/5/rpc/2?a=1",
-            "method":"GET",
-            "statusCode":400,
-            "protocol":"HTTP/2.0",
-            "headers": {
-                "Cache-Control": "no-cache",
-                "Connection": "keep-alive",
-                "Content-Type": "application/javascript",
-                "Accept": "*/*",
-                "Accept-Encoding": "gzip, deflate",
-                "Authorization": "bearer",
-                "Host": "127.0.0.1:6000",
-                "User-Agent": "PostmanRuntime/7.6.0",
-                "Postman-Token": "78c5a1cb-764f-4e04-b2ae-514924a40d5a"
-            }
-        },
-	"error":{
-		//SsError格式
-	},
-        "user": {}
-    }
+
+# RpcContextData
+>json 字符串
+
+json key  | 类型 | 说明 | Demo
+ ------------- | ------------- | ------------- | ------------- 
+route  | string| 接口路由 |  ApiStation1/path1/path2/api1.html
+ | | | 
+user| json| 用户 |
+user.userInfo |json| 用户详细信息 | {"userId":4515222,"姓名":"张三","性别":"男"}
+ | | | 
+caller|json|| 
+caller.source| string |  调用来源 |  Internal 或 Outside
+caller.rid| string |requestId|
+caller.callStack| string |调用堆栈| [ ...ppprid,pprid,prid]
+ | | | 
+http|json|| 
+http.url| string |       |  http://www.a.com/ApiStation/path1/path2/api1.html?A=b&c=d
+http.method| string |请求类型|   如 POST GET PUT等
+http.statusCode| int |HTTP状态码|   如 200、400等
+http.protocol| string | |   如 "HTTP/2.0"
+http.headers|json| |{"Content-Type":"application/json","Authorization":"Bearer #ssdfdasf"}
+ | | | 
+error|SsError|若不为null,则说明接口调用出现异常,只定义架构层级错误,如 api不存在,调用超时等| 
+
+```javascript
+	//Demo:
+    {
+        "route": "/DemoStation/v1/api/5/rpc/2",
+        "caller": {
+            "rid": "8320becee0d945e9ab93de6fdac7627a",
+            "callStack": ["xxxx","xxxxxx"],    // parentRequestGuid array
+            "source": "Outside"
+        },
+        "http": {
+            "url": "https://127.0.0.1:6000/DemoStation/v1/api/5/rpc/2?a=1",
+            "method":"GET",
+            "statusCode":400,
+            "protocol":"HTTP/2.0",
+            "headers": {
+                "Cache-Control": "no-cache",
+                "Connection": "keep-alive",
+                "Content-Type": "application/javascript",
+                "Accept": "*/*",
+                "Accept-Encoding": "gzip, deflate",
+                "Authorization": "bearer",
+                "Host": "127.0.0.1:6000",
+                "User-Agent": "PostmanRuntime/7.6.0",
+                "Postman-Token": "78c5a1cb-764f-4e04-b2ae-514924a40d5a"
+            }
+        },
+	"error":{SsError},
+        "user": {"userInfo":{} }
+    }
 ```

+ 68 - 68
Doc/Api/SsApiDesc.md

@@ -1,69 +1,69 @@
-# SsApiDesc
-
-
-```javascript
-//Demo:
-
-{
-   "name":"获取用户信息",
-   "description":"用户必须登录",
-
-   //路由
-   "route":"/ApiStation1/path1/path2/api1.html"
-
- //扩展配置(json)
- ,"extendConfig":{
-    //请求方式,若不指定则默认支持所有方式(demo: POST、GET、DELETE、PUT等)
-    "httpMethod":"GET",
-
-    //原始路由
-    "oriRoute":"/apidemo/Values/arg1/{id}/{id2}",
-
-
-    //系统生成的接口文字描述
-    "sysDesc":"method:GET"
- },
- 
-
-
-   //请求参数类型   SsModel类型
-   "argType":  { SsModel },
-
-   //返回数据类型   SsModel类型
-   "returnType":  { SsModel },
-
-
-   //sers1版本使用(为了兼容,暂不禁用)
-   "rpcValidations":[
-		//SsLimit format:  {"path":"path in RpcContext","ssError":{ssError} , "ssValid": {SsValid} }
-
-		{  "path":"callerSource","ssError":{} , "ssValid": {"type":"Equal","value":"ServiceStation"}   }
-
-
-		/*
-		{  "path":"callerSource","ssError":{} , "ssValid": {"type":"Equal","value":"ServiceStation"}   }
-
-		{"path":"user.userType", "ssValid": [
-			{"type":"Equal","value":"Logined", "errorMessage": "必须为登陆用户"}
-		] } ,
-
-		{"path":"http.method", "ssValid": [
-			{"type":"Equal","value":"POST", "errorMessage": "接口只接受Post请求"}
-		] }  */
-   ],
-
-   //api调用限制(rpc),sers2版本使用
-   "rpcVerify2":{
-	//SsExp format:  {"type":"Switch", "body":[  {"condition":SsExp,"value":SsExp } ,...   ]   }   
-   },
-
- 
- 
-   ////调用api时构建RpcContext 的配置参数
-   //"rpcContextBuildConfig":  { 	
-   
-   //},
-
-}
-```
+# SsApiDesc
+
+
+```javascript
+//Demo:
+
+{
+   "name":"获取用户信息",
+   "description":"用户必须登录",
+
+   //路由
+   "route":"/ApiStation1/path1/path2/api1.html"
+
+ //扩展配置(json)
+ ,"extendConfig":{
+    //请求方式,若不指定则默认支持所有方式(demo: POST、GET、DELETE、PUT等)
+    "httpMethod":"GET",
+
+    //原始路由
+    "oriRoute":"/apidemo/Values/arg1/{id}/{id2}",
+
+
+    //系统生成的接口文字描述
+    "sysDesc":"method:GET"
+ },
+ 
+
+
+   //请求参数类型   SsModel类型
+   "argType":  { SsModel },
+
+   //返回数据类型   SsModel类型
+   "returnType":  { SsModel },
+
+
+   //sers1版本使用(为了兼容,暂不禁用)
+   "rpcValidations":[
+		//SsLimit format:  {"path":"path in RpcContext","ssError":{ssError} , "ssValid": {SsValid} }
+
+		{  "path":"callerSource","ssError":{} , "ssValid": {"type":"Equal","value":"ServiceStation"}   }
+
+
+		/*
+		{  "path":"callerSource","ssError":{} , "ssValid": {"type":"Equal","value":"ServiceStation"}   }
+
+		{"path":"user.userType", "ssValid": [
+			{"type":"Equal","value":"Logined", "errorMessage": "必须为登陆用户"}
+		] } ,
+
+		{"path":"http.method", "ssValid": [
+			{"type":"Equal","value":"POST", "errorMessage": "接口只接受Post请求"}
+		] }  */
+   ],
+
+   //api调用限制(rpc),sers2版本使用
+   "rpcVerify2":{
+	//SsExp format:  {"type":"Switch", "body":[  {"condition":SsExp,"value":SsExp } ,...   ]   }   
+   },
+
+ 
+ 
+   ////调用api时构建RpcContext 的配置参数
+   //"rpcContextBuildConfig":  { 	
+   
+   //},
+
+}
+```
  

+ 109 - 109
Doc/Api/SsModel.md

@@ -1,109 +1,109 @@
-
-参数项 描述
-`
-Name | 类型 | 说明  | Demo
- ------------- | ------------- | ------------- | ------------- 
-name  | string | 名称 |  mobile
-type  | string | 数据类型 | 可为 object、string、int32、int64、float、double、bool、datetime、binary 或 SsModelEntity的name
-mode  | string | 数据模式 |  只可为 value、object、array
-description | string | 描述 |  用户手机号
-valid | array | 限制 | 
-defaultValue | string| 默认值 | 15000000000
-example | string| 示例值 | 15012345678
-
-SsModelUnionId 生成规则:
-	按指定顺序序列化后的字符串  进行md5
-
-
-
-
-
-
-# (x.1)SsModel
-
-格式:
-```javascript
-{ 		 
-	"type":"type1",
-	"mode":"object",
-	//"valid":[ {SsValid1},{SsValid2} ]
-	"description":"用户手机号"
-	"defaultValue":"",
-	"example":"15000000000"
-  
-	"models":[ {SsModelEntity1} , {SsModelEntity2}  ]
-}
-```
-
-
-
-
-# (x.2)SsModelEntity
-格式:
-```javascript
-{	 
-	/*  数据类型。可以唯一定位到一个模型 */
-	"type":"type1",
-	"mode":"object",	 
-	"propertys":[ {SsModelProperty} , {SsModelProperty}  ]
-}
-```
-
-
-demo:
-```javascript
-{	 
-	"type":"LoginArg",	 
-	"mode":"object",	 
-	"propertys":[
-		{
-		"type":"string",
-		"name":"mobile",
-		"description":"用户手机号"
-		"example":"15000000000",
-		"defaultValue":""
-		}
-	]
-}
-```
-
-
-
-
-# (x.3)SsModelProperty.md
-
-格式:
-```javascript
-{
-	"name":"mobile",
-	"type":"type1",
-	"mode":"object",
-	//"valid":[ {SsValid1},{SsValid2} ]
-	"description":"用户手机号"
-	"defaultValue":"",
-	"example":"15000000000"
-}
-```
-
-
-Demo:
-```javascript
-{
-	"name":"mobile",
-	"type":"string",
-	"description":"用户手机号",
-	"defaultValue":"15000000000",
-	"example":"15012345678",
-	"valid":[
-		{"type":"MaxValue","value":"99999999999", "errorMessage": "手机号格式不正确,不是11位"},
-		{"type":"MinValue","value":"00000000000", "errorMessage": "手机号格式不正确,不是11位"},
-		{"type":"Regex","value":"^\\d{11}$", "errorMessage": "手机号格式不正确,不是11位"},
-		{"type":"Required","errorMessage": "手机号不能为空"}, 
-		{"type":"Equal","value":"15012345678", "errorMessage": "手机号必须为15012345678"},
-		//校验长度,可以用于Array,Collection,Map,String 等
-		{"type":"Size","min":5,"max":11,"errorMessage": "手机号长度错误"} 
-	]
-}
-```
-
-
+
+参数项 描述
+`
+Name | 类型 | 说明  | Demo
+ ------------- | ------------- | ------------- | ------------- 
+name  | string | 名称 |  mobile
+type  | string | 数据类型 | 可为 object、string、int32、int64、float、double、bool、datetime、binary 或 SsModelEntity的name
+mode  | string | 数据模式 |  只可为 value、object、array
+description | string | 描述 |  用户手机号
+valid | array | 限制 | 
+defaultValue | string| 默认值 | 15000000000
+example | string| 示例值 | 15012345678
+
+SsModelUnionId 生成规则:
+	按指定顺序序列化后的字符串  进行md5
+
+
+
+
+
+
+# (x.1)SsModel
+
+格式:
+```javascript
+{ 		 
+	"type":"type1",
+	"mode":"object",
+	//"valid":[ {SsValid1},{SsValid2} ]
+	"description":"用户手机号"
+	"defaultValue":"",
+	"example":"15000000000"
+  
+	"models":[ {SsModelEntity1} , {SsModelEntity2}  ]
+}
+```
+
+
+
+
+# (x.2)SsModelEntity
+格式:
+```javascript
+{	 
+	/*  数据类型。可以唯一定位到一个模型 */
+	"type":"type1",
+	"mode":"object",	 
+	"propertys":[ {SsModelProperty} , {SsModelProperty}  ]
+}
+```
+
+
+demo:
+```javascript
+{	 
+	"type":"LoginArg",	 
+	"mode":"object",	 
+	"propertys":[
+		{
+		"type":"string",
+		"name":"mobile",
+		"description":"用户手机号"
+		"example":"15000000000",
+		"defaultValue":""
+		}
+	]
+}
+```
+
+
+
+
+# (x.3)SsModelProperty.md
+
+格式:
+```javascript
+{
+	"name":"mobile",
+	"type":"type1",
+	"mode":"object",
+	//"valid":[ {SsValid1},{SsValid2} ]
+	"description":"用户手机号"
+	"defaultValue":"",
+	"example":"15000000000"
+}
+```
+
+
+Demo:
+```javascript
+{
+	"name":"mobile",
+	"type":"string",
+	"description":"用户手机号",
+	"defaultValue":"15000000000",
+	"example":"15012345678",
+	"valid":[
+		{"type":"MaxValue","value":"99999999999", "errorMessage": "手机号格式不正确,不是11位"},
+		{"type":"MinValue","value":"00000000000", "errorMessage": "手机号格式不正确,不是11位"},
+		{"type":"Regex","value":"^\\d{11}$", "errorMessage": "手机号格式不正确,不是11位"},
+		{"type":"Required","errorMessage": "手机号不能为空"}, 
+		{"type":"Equal","value":"15012345678", "errorMessage": "手机号必须为15012345678"},
+		//校验长度,可以用于Array,Collection,Map,String 等
+		{"type":"Size","min":5,"max":11,"errorMessage": "手机号长度错误"} 
+	]
+}
+```
+
+

+ 22 - 22
Doc/Api/rpcVerify1.md

@@ -1,23 +1,23 @@
-# SsValidation(已弃用)
-{"path":"user.userType","ssError":{}, "ssValid":{"type":"Equal","value":"Logined"} }
-
-
-ssValid目前支持以下验证
-
-x.1
-{ "type":"Equal","value":"Logined"}
-
-x.2
-{ "type":"Regex","value":"^\\d{11}$"}
-
-x.3
-{ "type":"Required" }
-
-x.4
-{ "type":"Null"}   always true
-
-x.5
-{ "type":"NotEqual","value":"Logined"}
-
-x.6
+# SsValidation(已弃用)
+{"path":"user.userType","ssError":{}, "ssValid":{"type":"Equal","value":"Logined"} }
+
+
+ssValid目前支持以下验证
+
+x.1
+{ "type":"Equal","value":"Logined"}
+
+x.2
+{ "type":"Regex","value":"^\\d{11}$"}
+
+x.3
+{ "type":"Required" }
+
+x.4
+{ "type":"Null"}   always true
+
+x.5
+{ "type":"NotEqual","value":"Logined"}
+
+x.6
 { "type":"Scope","min":10.8,"max":12.5}  //包含最大值 最小值,可只指定最大值或最小值

+ 59 - 59
Doc/Api/rpcVerify2.md

@@ -1,60 +1,60 @@
-# rpcVerify2
- 
-{"type":"Switch", "body":[  
-
-{"condition":{"type":"not in","path":"caller.source"  ,  "value":["Internal","Outside"]  },    "value": {"type":"_", ssError}  } ,
-{"condition":{"type":"!=","path":"caller.source"  ,  "value":"Internal"  },    "value": {"type":"_", ssError}  } 
-
-]   }   
-
-
-SsExp 目前支持以下几种表达式
-
-
-    //path 可不指定
-
-    {"type":"SsExp",  "path":"a.b"  ,"value":SsExp  }
-
-    {"type":"Cur",  "path":"a.b"  }  //返回当前path索引的值
-    
-    {"type":"Value", "value":Value  } //返回Value
-
-    {"type":"_", ...  }  //直接返回当前表达式 
-
-    {"type":"Switch", "path":"a.b"  ,   "body":[  {"condition":SsExp,"value":SsExp } ,...   ] , "default":SsExp   }
-
-
-    以下为bool表达式,默认返回值为bool类型,也可手动指定满足条件时的返回值
-    均存在如下属性:
-    resultWhenNull   存在null值时的返回值,默认false
-    resultWhenTrue   结果为true时的返回值,默认为true
-    resultWhenFalse 结果为false时的返回值,默认为false
-
-   
-    {"type":"If", "path":"a.b"  ,"condition":SsExp }                 
-
-    {"type":"And",    "path":"a.b",    "value":[  SsExp1,SsExp2 ...        ]   }
-
-    {"type":"Or",    "path":"a.b",    "value":[  SsExp1,SsExp2 ...        ]   }
-
-    {"type":"Not",    "path":"a.b",    "value":SsExp    }
-
-    {"type":"NotNull",    "path":"a.b",    "value":SsExp    }
-
-    { "type":"Regex",    "path":"a.b",    "value":SsExp  }  //正则匹配
-
-    {"type":"==",    "path":"a.b",    "value":SsExp  }
-
-    {"type":"!=",    "path":"a.b",    "value":SsExp  }
-
-    {"type":">",    "path":"a.b",   "value":SsExp   }
-						     
-    {"type":">=",    "path":"a.b",    "value":SsExp    }
-						     
-    {"type":"<",    "path":"a.b",    "value":SsExp   }
-						     
-    {"type":"<=",    "path":"a.b",    "value":SsExp    }
-
-    {"type":"in",    "path":"a.b",    "value":SsExp  }   //value 值必须为数组,否则返回 false
-
+# rpcVerify2
+ 
+{"type":"Switch", "body":[  
+
+{"condition":{"type":"not in","path":"caller.source"  ,  "value":["Internal","Outside"]  },    "value": {"type":"_", ssError}  } ,
+{"condition":{"type":"!=","path":"caller.source"  ,  "value":"Internal"  },    "value": {"type":"_", ssError}  } 
+
+]   }   
+
+
+SsExp 目前支持以下几种表达式
+
+
+    //path 可不指定
+
+    {"type":"SsExp",  "path":"a.b"  ,"value":SsExp  }
+
+    {"type":"Cur",  "path":"a.b"  }  //返回当前path索引的值
+    
+    {"type":"Value", "value":Value  } //返回Value
+
+    {"type":"_", ...  }  //直接返回当前表达式 
+
+    {"type":"Switch", "path":"a.b"  ,   "body":[  {"condition":SsExp,"value":SsExp } ,...   ] , "default":SsExp   }
+
+
+    以下为bool表达式,默认返回值为bool类型,也可手动指定满足条件时的返回值
+    均存在如下属性:
+    resultWhenNull   存在null值时的返回值,默认false
+    resultWhenTrue   结果为true时的返回值,默认为true
+    resultWhenFalse 结果为false时的返回值,默认为false
+
+   
+    {"type":"If", "path":"a.b"  ,"condition":SsExp }                 
+
+    {"type":"And",    "path":"a.b",    "value":[  SsExp1,SsExp2 ...        ]   }
+
+    {"type":"Or",    "path":"a.b",    "value":[  SsExp1,SsExp2 ...        ]   }
+
+    {"type":"Not",    "path":"a.b",    "value":SsExp    }
+
+    {"type":"NotNull",    "path":"a.b",    "value":SsExp    }
+
+    { "type":"Regex",    "path":"a.b",    "value":SsExp  }  //正则匹配
+
+    {"type":"==",    "path":"a.b",    "value":SsExp  }
+
+    {"type":"!=",    "path":"a.b",    "value":SsExp  }
+
+    {"type":">",    "path":"a.b",   "value":SsExp   }
+						     
+    {"type":">=",    "path":"a.b",    "value":SsExp    }
+						     
+    {"type":"<",    "path":"a.b",    "value":SsExp   }
+						     
+    {"type":"<=",    "path":"a.b",    "value":SsExp    }
+
+    {"type":"in",    "path":"a.b",    "value":SsExp  }   //value 值必须为数组,否则返回 false
+
     {"type":"not in",    "path":"a.b",    "value":SsExp }   //value 值必须为数组,否则返回 true

+ 46 - 46
Doc/CommunicationLayer.md

@@ -1,47 +1,47 @@
-## MqManager
-
-### (x.1)Frame数据帧格式
-第1部分: 消息模式 EFrameType         1 byte
-第2部分: 请求类别 ERequestType     1 byte
-第3部分: 消息内容
-
-### (x.2)消息块类型
-消息块有3类(EFrameType)
-
-	1.request
-	//带回应消息中的请求
-
-	2.reply
-	//带回应消息中的回应
-
-	3.message
-	//无回应消息的消息内容
-
-
-
-### (x.3)模式种类
-
-#### (x.x.1) 带回应请求(ReqRep模式)
-
->使用ReqRepFrame格式数据
-//ReqRepFrame 消息帧(byte[])	 
-第1部分: 请求标识(reqKey)(long)			长度为8字节
-第2部分: 消息内容(oriMsg)
-
-
-内部又分2类
-##### (x.x.x.1) heartBeat
->连接心跳。RequestType为heartBeat
->请求内容和回应内容都为版本号
-
-##### (x.x.x.2) app
->例如api调用。RequestType为app 
-
-##### (x.x.x.3)ERequestType枚举说明 (byte)
-	0: app
-	1: heartBeat
-
-
-
-### (x.x.2) Message
+## MqManager
+
+### (x.1)Frame数据帧格式
+第1部分: 消息模式 EFrameType         1 byte
+第2部分: 请求类别 ERequestType     1 byte
+第3部分: 消息内容
+
+### (x.2)消息块类型
+消息块有3类(EFrameType)
+
+	1.request
+	//带回应消息中的请求
+
+	2.reply
+	//带回应消息中的回应
+
+	3.message
+	//无回应消息的消息内容
+
+
+
+### (x.3)模式种类
+
+#### (x.x.1) 带回应请求(ReqRep模式)
+
+>使用ReqRepFrame格式数据
+//ReqRepFrame 消息帧(byte[])	 
+第1部分: 请求标识(reqKey)(long)			长度为8字节
+第2部分: 消息内容(oriMsg)
+
+
+内部又分2类
+##### (x.x.x.1) heartBeat
+>连接心跳。RequestType为heartBeat
+>请求内容和回应内容都为版本号
+
+##### (x.x.x.2) app
+>例如api调用。RequestType为app 
+
+##### (x.x.x.3)ERequestType枚举说明 (byte)
+	0: app
+	1: heartBeat
+
+
+
+### (x.x.2) Message
 >无回应消息(单向消息)

+ 6 - 6
Doc/ReleaseLog/Sers2.0.1.log

@@ -1,7 +1,7 @@
-Sers2.0.1升级日志:
-
-1.请求处理变为“请求队列模式”,更高效,单机空载无消息队列可达15万。
-2.优化消息队列,可自由扩展。
-3.消息队列支持Iocp、Socket、Zmq、SharedMemory三种模式。
-4.服务站点的可动态加载服务。
+Sers2.0.1升级日志:
+
+1.请求处理变为“请求队列模式”,更高效,单机空载无消息队列可达15万。
+2.优化消息队列,可自由扩展。
+3.消息队列支持Iocp、Socket、Zmq、SharedMemory三种模式。
+4.服务站点的可动态加载服务。
 5.服务中心可动态加载服务。

+ 3 - 3
Doc/ReleaseLog/Sers2.1.1.log

@@ -1,4 +1,4 @@
-Sers2.1.1升级日志:
-
-
+Sers2.1.1升级日志:
+
+
 1.支持RESTful api

+ 110 - 110
Doc/Sers2(RequestQueue).md

@@ -1,110 +1,110 @@
-## (1)MessageFrame(Mq)
->只负责消息帧传递,不负责其他功能
-
-### (x.1)IMqConn
-
-#### (x.x.1)state
-	连接状态(0:waitForCertify; 2:certified; 4:waitForClose; 8:closed;)
-#### (x.x.2)connTag
-#### (x.x.3)SendFrameAsync
-#### (x.x.4)Close
-
-
-### (x.2)ServerMq:
-
-Start
-Stop
-ConnectedList
-Conn_OnConnected
-Conn_OnDisconnected
-Conn_OnGetFrame 
-
-
-### (x.3)ClientMq:
- 
-Connect
-Close
-mqConn
-Conn_OnDisconnected 
-OnGetFrame
-secretKey
-
-
-
-## (2)MqManager
-
-### (x.1)ServerMqManager
-
-Start
-Stop
-
-Conn_OnConnected
-Conn_OnDisconnected
-
-station_OnGetRequest
-station_OnGetMessage
-
-Station_SendRequestAsync
-Station_SendMessageAsync
-
-
-
-### (x.2)ClientMqManager
-
-Start
-Stop
-
-mqConns 
-Conn_OnDisconnected
-
-station_OnGetRequest
-station_OnGetMessage
-  
-Station_SendRequest
-Station_SendMessageAsync
-
-
-### (x.3)RequestAdaptor
- 请求解析,缓存,转发,心跳包检测 
-
-
-
-## (3)Service
-
-### (x.1)ServerCenter
-
-#### (x.x.1)actionsOnStart actionsOnStop
-#### (x.x.2)mqMng
-		线程数:Sers.Mq.Config.workThreadCount
-#### (x.x.3)localApiService
-		线程数:Sers.LocalApiService.workThreadCount
-#### (x.x.4)ApiClient
-#### (x.x.5)MessageClient
-#### (x.x.6)ApiCenterService
-		线程数:0。任务都在mqMng线程中完成
-#### (x.x.7)MessageCenterService
-
-
-
-### (x.2)ServerStation
-
-#### (x.x.1)actionsOnStart actionsOnStop
-#### (x.x.2)mqMng
-		线程数:Sers.Mq.Config.workThreadCount
-#### (x.x.3)localApiService
-		线程数:Sers.LocalApiService.workThreadCount
-#### (x.x.4)ApiClient
-#### (x.x.5)MessageClient
-
- 
-
-
-
-
-
-
-
-
-
-
-
+## (1)MessageFrame(Mq)
+>只负责消息帧传递,不负责其他功能
+
+### (x.1)IMqConn
+
+#### (x.x.1)state
+	连接状态(0:waitForCertify; 2:certified; 4:waitForClose; 8:closed;)
+#### (x.x.2)connTag
+#### (x.x.3)SendFrameAsync
+#### (x.x.4)Close
+
+
+### (x.2)ServerMq:
+
+Start
+Stop
+ConnectedList
+Conn_OnConnected
+Conn_OnDisconnected
+Conn_OnGetFrame 
+
+
+### (x.3)ClientMq:
+ 
+Connect
+Close
+mqConn
+Conn_OnDisconnected 
+OnGetFrame
+secretKey
+
+
+
+## (2)MqManager
+
+### (x.1)ServerMqManager
+
+Start
+Stop
+
+Conn_OnConnected
+Conn_OnDisconnected
+
+station_OnGetRequest
+station_OnGetMessage
+
+Station_SendRequestAsync
+Station_SendMessageAsync
+
+
+
+### (x.2)ClientMqManager
+
+Start
+Stop
+
+mqConns 
+Conn_OnDisconnected
+
+station_OnGetRequest
+station_OnGetMessage
+  
+Station_SendRequest
+Station_SendMessageAsync
+
+
+### (x.3)RequestAdaptor
+ 请求解析,缓存,转发,心跳包检测 
+
+
+
+## (3)Service
+
+### (x.1)ServerCenter
+
+#### (x.x.1)actionsOnStart actionsOnStop
+#### (x.x.2)mqMng
+		线程数:Sers.Mq.Config.workThreadCount
+#### (x.x.3)localApiService
+		线程数:Sers.LocalApiService.workThreadCount
+#### (x.x.4)ApiClient
+#### (x.x.5)MessageClient
+#### (x.x.6)ApiCenterService
+		线程数:0。任务都在mqMng线程中完成
+#### (x.x.7)MessageCenterService
+
+
+
+### (x.2)ServerStation
+
+#### (x.x.1)actionsOnStart actionsOnStop
+#### (x.x.2)mqMng
+		线程数:Sers.Mq.Config.workThreadCount
+#### (x.x.3)localApiService
+		线程数:Sers.LocalApiService.workThreadCount
+#### (x.x.4)ApiClient
+#### (x.x.5)MessageClient
+
+ 
+
+
+
+
+
+
+
+
+
+
+

+ 64 - 64
Doc/Sers微服务协议分层概要.txt

@@ -1,65 +1,65 @@
-Sers微服务协议分层概要
-
-客户端服务端模式
-服务中心为服务端
-服务站点为客户端
-
-
-1.通信层(CL,Communication Layer)
-
-
-(1)消息投递层(Message Delivery)
-客户端和服务端可以双向收发单帧二进制数据(带长度的二进制字节数组)
-
-目前有4种实现:
-(x.1)socket 线程等待 iocp
-(x.2)zmq
-(x.3)ipc
-(x.4)WebSocket
-
-
-(2) 消息组织层(Message Organize)
-对消息进行有组织的管理。
-提供两种模式:
-(x.1)ReqRep(事项)模式(有请求和回应)
-(x.2)Message(信件)模式
-
-即
-(x.1)“服务中心”可以给“服务站点”发送事项(发送请求并获取回应),
-(x.2)“服务中心”可以给“服务站点”发送信件,
-(x.3)“服务站点”可以给“服务中心”发送事项(发送请求并获取回应),
-(x.4)“服务站点”可以给“服务中心”发送信件,
-
-
-同时提供心跳线程,监控通讯,确保没有断开。
-
-总结:提供事项和信件的双向收发功能。
-
-(3) 通信管理层(Communication Manage)
-消息管理层对(多个)消息组织进行管理
-
-
-
-2 rpc 层
-(x.1)SersFile 
-(x.2)ApiMessage(ApiRequestMessage ApiReplyMessage)
-(x.3)RpcData 格式定义
-(x.4)远程过程调用功能
-
-
-3 Api Server
-(x.1)ApiDesc
-(x.2)SersModel
-
-
-4 服务总线层
-服务中心: 服务注册 服务发现 服务转发 负载均衡 (服务熔断 服务限流 链路追踪)
-服务站点: 服务加载 服务调用
-服务网关:服务转发 (服务限流 )
-ApiCenterService 
-LocalApiNode  LocalApiService
-范接口
-范方式(http method)
-事项中间件
-
+Sers微服务协议分层概要
+
+客户端服务端模式
+服务中心为服务端
+服务站点为客户端
+
+
+1.通信层(CL,Communication Layer)
+
+
+(1)消息投递层(Message Delivery)
+客户端和服务端可以双向收发单帧二进制数据(带长度的二进制字节数组)
+
+目前有4种实现:
+(x.1)socket 线程等待 iocp
+(x.2)zmq
+(x.3)ipc
+(x.4)WebSocket
+
+
+(2) 消息组织层(Message Organize)
+对消息进行有组织的管理。
+提供两种模式:
+(x.1)ReqRep(事项)模式(有请求和回应)
+(x.2)Message(信件)模式
+
+即
+(x.1)“服务中心”可以给“服务站点”发送事项(发送请求并获取回应),
+(x.2)“服务中心”可以给“服务站点”发送信件,
+(x.3)“服务站点”可以给“服务中心”发送事项(发送请求并获取回应),
+(x.4)“服务站点”可以给“服务中心”发送信件,
+
+
+同时提供心跳线程,监控通讯,确保没有断开。
+
+总结:提供事项和信件的双向收发功能。
+
+(3) 通信管理层(Communication Manage)
+消息管理层对(多个)消息组织进行管理
+
+
+
+2 rpc 层
+(x.1)SersFile 
+(x.2)ApiMessage(ApiRequestMessage ApiReplyMessage)
+(x.3)RpcData 格式定义
+(x.4)远程过程调用功能
+
+
+3 Api Server
+(x.1)ApiDesc
+(x.2)SersModel
+
+
+4 服务总线层
+服务中心: 服务注册 服务发现 服务转发 负载均衡 (服务熔断 服务限流 链路追踪)
+服务站点: 服务加载 服务调用
+服务网关:服务转发 (服务限流 )
+ApiCenterService 
+LocalApiNode  LocalApiService
+范接口
+范方式(http method)
+事项中间件
+
 5 Api加载器(sers  weibapi21)

+ 18 - 18
Doc/readme.md

@@ -1,19 +1,19 @@
-## 1. ApiStation
-> api站点。以"_"开始的Api站点为系统站点,不受服务限流等限制。
-
-
-## 2. ServiceStation
-> 对应一个部署的服务站点。一个服务站点可能包含多个Api站点的api节点
-
-
-## 3. ApiService
-> 一个指定路由(如"/_sys_/serviceStation/regist")对应的api服务
- 
-
-
-## 4. ApiNode
-> 一个api服务可能在多台服务站点上部署,在某一个服务站点上的api服务就是api节点(ApiNode)
-
-
-## 5. ApiCenter
+## 1. ApiStation
+> api站点。以"_"开始的Api站点为系统站点,不受服务限流等限制。
+
+
+## 2. ServiceStation
+> 对应一个部署的服务站点。一个服务站点可能包含多个Api站点的api节点
+
+
+## 3. ApiService
+> 一个指定路由(如"/_sys_/serviceStation/regist")对应的api服务
+ 
+
+
+## 4. ApiNode
+> 一个api服务可能在多台服务站点上部署,在某一个服务站点上的api服务就是api节点(ApiNode)
+
+
+## 5. ApiCenter
 > 用来管理 api站点 服务站点 api服务 api节点 等

+ 201 - 0
LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 37 - 0
README.md

@@ -0,0 +1,37 @@
+# Sers简介
+Sers为一套跨平台跨语言的开源微服务架构协议
+>源码地址:[https://github.com/serset/Sers](https://github.com/serset/Sers "https://github.com/serset/Sers")  
+>当前版本为2.1,RequestQueue模式。  
+
+Sers拥有如下特性:  
+● 跨语言、跨平台,目前已支持c#、java、c++、javascript  
+● 高效高并发(百万并发),单机QPS:2000000  
+● 轻量简洁,可javascript接入,代码不到1000行,压缩后只有8KB  
+● 易扩展,可以自行扩展接入  
+● 支持tcp、zmp、websocket、ipc等多种通讯方式  
+● 无代码侵入,.net core接入代码只有1行  
+
+
+
+# 站点划分
+ Sers为中心化的微服务架构协议,按照身份分为服务中心和服务站点。
+
+## (x.1)服务中心
+  服务中心(ServiceCenter)提供服务注册、服务发现、请求分发(负载均衡)、Api站点管理、服务站点管理、消息订阅等等服务。  
+  所有服务站点都需要向此服务中心进行注册。所有的请求都会经过服务中心进行转发。  
+  服务中心内置Gover服务治理功能。提供服务管理监控,站点管理监控,服务限流,服务统计等功能。服务治理部署在服务中心。  
+  服务治理的入口地址为 http://ip:6022/_gover_/index.html 。端口号在appsettings.json配置文件中配置。  
+
+
+## (x.2)服务站点
+  服务站点(ServiceStation)提供应用层服务。  
+  服务站点可以有多个,通过服务中心相互连接。在服务站点启动时,主动向服务中心发起服务注册请求,注册服务。  
+  服务站点注册成功后即可向其他站点(包含服务网关)提供服务。可调用其他站点提供的服务。  
+  提供的服务以url(route)作为服务标识。  
+  可以把服务站点直接附加到服务中心(免除通信层,单体模式)提供服务。200百万qps的性能数据就是在此模式下检测所得。  
+
+## (x.3)服务网关
+  服务网关(Gateway)通过http方式对外暴露内部服务。  
+  服务网关是一个特殊的服务站点。网关用http监听请求,把请求转发到服务中心。服务网关为服务的对外入口。  
+  服务中心内置了网关,可以在appsettings.json配置文件中配置进行启用。  
+  网关有两个版本,c++版(CGateway)和dotnet版(Gateway)。 c++版(CGateway)相对更高效。  

+ 36 - 36
cpp/CGateway1.2.0/Gateway/log.txt

@@ -1,37 +1,37 @@
-开发环境  Ubuntu eclipse c++
-
-ubuntu 编译命令:
-cd Gateway/Debug
-make all
-
-eclipse 发布:
-1.右击项目 ->Build Configurations -> Set Active -> Release
-2.右击项目 -> Clean Project
-3.右击项目 -> Build Project
-4.拷贝发布的文件  /Release/Gateway
-
---------------------------------------------
-todo:
-
-LongTaskHelp.Stop 销毁线程,尚未完成
-
-GUID
-
-
-
-
-
-
---------------------------------------------
-fixed:
-[190716]版本号已变更为1.2.0,请重新发布
-
-[190618 18:49]
-1.Content-Type:application/json; charset=UTF-8
-2.跨域访问
-
-
-
-
-
+开发环境  Ubuntu eclipse c++
+
+ubuntu 编译命令:
+cd Gateway/Debug
+make all
+
+eclipse 发布:
+1.右击项目 ->Build Configurations -> Set Active -> Release
+2.右击项目 -> Clean Project
+3.右击项目 -> Build Project
+4.拷贝发布的文件  /Release/Gateway
+
+--------------------------------------------
+todo:
+
+LongTaskHelp.Stop 销毁线程,尚未完成
+
+GUID
+
+
+
+
+
+
+--------------------------------------------
+fixed:
+[190716]版本号已变更为1.2.0,请重新发布
+
+[190618 18:49]
+1.Content-Type:application/json; charset=UTF-8
+2.跨域访问
+
+
+
+
+
  

+ 27 - 27
cpp/CGateway1.2.0/Gateway/readme.md

@@ -1,28 +1,28 @@
-Sers CGateway v1.2.0
-
-为Sers1版本, ThreadHold模式
-
---------------------------------------------
-说明:
-
-
-
-1. 开发环境:Ubuntu eclipse c++   
-    运行环境:Linux
-
-
-
-
-2. linux运行脚本:
-
-cd /root/netapp/CGateway
-
-chmod  -R 777  ./Gateway
-
- ./Gateway
-
-
-
-
-
+Sers CGateway v1.2.0
+
+为Sers1版本, ThreadHold模式
+
+--------------------------------------------
+说明:
+
+
+
+1. 开发环境:Ubuntu eclipse c++   
+    运行环境:Linux
+
+
+
+
+2. linux运行脚本:
+
+cd /root/netapp/CGateway
+
+chmod  -R 777  ./Gateway
+
+ ./Gateway
+
+
+
+
+
  

+ 12 - 12
cpp/CGateway1.2.0/ab压测.txt

@@ -1,12 +1,12 @@
-//°²×°ÃüÁ 
-yum -y install httpd-tools
---
- 
-
-dotnet Gateway
- ab -n 100000 -c  16 http://127.0.0.1:6022/StationDemo/demo/demo/1
-
-
-CGateway
- ab -n 100000 -c 16 http://127.0.0.1:6008/StationDemo/demo/demo/1
-
+//°²×°ÃüÁ 
+yum -y install httpd-tools
+--
+ 
+
+dotnet Gateway
+ ab -n 100000 -c  16 http://127.0.0.1:6022/StationDemo/demo/demo/1
+
+
+CGateway
+ ab -n 100000 -c 16 http://127.0.0.1:6008/StationDemo/demo/demo/1
+

+ 3 - 3
cpp/CGateway1.2.0/readme.md

@@ -1,4 +1,4 @@
-Sers CGateway v1.2.0
-
-当前为Sers1版本, ThreadHold模式
+Sers CGateway v1.2.0
+
+当前为Sers1版本, ThreadHold模式
  

+ 0 - 9
dotnet/Doc/Debug/01 ServiceCenter.bat

@@ -1,9 +0,0 @@
-start http://localhost:4580/_gover_/index.html?user=admin_123456
-
-cd /d ..\..
-
-cd /d netcore\ServiceCenter\App.ServiceCenter\bin\Debug\netcoreapp2.1
-dotnet App.ServiceCenter.dll
-
- 
- 

+ 0 - 7
dotnet/Doc/Debug/04 Demo.bat

@@ -1,7 +0,0 @@
-cd /d ..\..
-
-cd /d StationDemo\SersLoader\Did.SersLoader.Demo\bin\Debug\netcoreapp2.1
-dotnet Did.SersLoader.Demo.dll
-
- 
- 

+ 0 - 8
dotnet/Doc/Debug/05 Robot.bat

@@ -1,8 +0,0 @@
-cd /d ..\..
-
-cd /d netcore\Station\App.Robot.Station\bin\Debug\netcoreapp2.1
-dotnet App.Robot.Station.dll
- 
-
- 
- 

+ 41 - 0
dotnet/Doc/DevOps/github/30.nuget-pack.sh

@@ -0,0 +1,41 @@
+set -e
+
+# bash 30.nuget-build.sh
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+# "
+
+ 
+ 
+nugetPath=Doc/Publish/nuget
+
+ 
+
+#----------------------------------------------
+echo "(x.2)nuget-pack"
+docker run -i --rm \
+--env LANG=C.UTF-8 \
+-v $codePath:/root/code \
+serset/dotnet:6.0-sdk \
+bash -c "
+cd /root/code
+for file in \$(grep -a '<TargetFramework>netstandard2.0</TargetFramework>' . -rl --include *.csproj)
+do
+    if ! [[ \$file =~ (Apm|Empty|Temp|Zmq|SharedMemory|\\-) ]]; then
+        echo pack \$file
+        cd /root/code
+	cd \$(dirname \"\$file\")
+        dotnet build --configuration Release
+	dotnet pack --configuration Release --output '/root/code/$nugetPath'
+    fi
+done
+" 
+
+
+ 

+ 35 - 0
dotnet/Doc/DevOps/github/31.nuget-push.sh

@@ -0,0 +1,35 @@
+set -e
+
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+export NUGET_SERVER=https://api.nuget.org/v3/index.json
+export NUGET_KEY=xxxxxxxxxx
+
+# "
+
+
+nugetPath=Doc/Publish/nuget
+ 
+
+#----------------------------------------------
+echo "(x.2)nuget-push"
+docker run -i --rm \
+--env LANG=C.UTF-8 \
+-v $codePath:/root/code \
+serset/dotnet:6.0-sdk \
+bash -c "
+for file in /root/code/$nugetPath/*.nupkg
+do
+    echo nuget push \$file
+    #dotnet nuget push \$file -k ${NUGET_KEY} -s ${NUGET_SERVER}
+done
+" || true
+
+
+ 

+ 37 - 0
dotnet/Doc/DevOps/github/40.dotnet-publish.sh

@@ -0,0 +1,37 @@
+set -e
+
+#  cd $codePath/Doc/DevOps/github; bash 40.dotnet-publish.sh;
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+# "
+
+ 
+
+#---------------------------------------------- 
+echo "(x.2)publish netcoreapp2.1"
+
+export netVersion=netcoreapp2.1 
+bash $codePath/Doc/DevOps/github/41.dotnet-publish-by-netVersion.bash;
+
+
+
+
+#---------------------------------------------- 
+echo "(x.3)publish net6.0"
+
+#修改csproj文件中的版本号为6.0
+cd $codePath
+sed -i 's/netcoreapp2.1/net6.0/g'  `grep -a 'netcoreapp2.1' . -rl --include *.csproj`
+
+export netVersion=net6.0
+bash $codePath/Doc/DevOps/github/41.dotnet-publish-by-netVersion.bash;
+
+
+#修改csproj文件中的版本号为2.1
+cd $codePath
+sed -i 's/net6.0/netcoreapp2.1/g'  `grep -a 'net6.0' . -rl --include *.csproj`

+ 75 - 0
dotnet/Doc/DevOps/github/41.dotnet-publish-by-netVersion.bash

@@ -0,0 +1,75 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+export netVersion=netcoreapp2.1 
+# "
+
+ 
+
+#----------------------------------------------
+echo "(x.2)dotnet-publish"
+echo "dotnet version: ${netVersion}"
+
+docker run -i --rm \
+--env LANG=C.UTF-8 \
+-v $codePath:/root/code \
+serset/dotnet:6.0-sdk \
+bash -c "
+set -e
+
+echo '------ publish Gateway'
+cd /root/code/Gateway/App.Gateway
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Gateway
+
+echo '------ publish Gover'
+cd /root/code/ServiceCenter/App.Gover.Gateway
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Gover
+
+echo '------ publish ServiceCenter'
+cd /root/code/ServiceCenter/App.ServiceCenter
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/ServiceCenter
+
+echo '------ publish Demo'
+cd /root/code/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Demo
+
+echo '------ publish Robot'
+cd /root/code/ServiceStation/Demo/StressTest/App.Robot.Station
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Robot
+     
+
+
+echo '------ copy file'
+targetFolder=/root/code/Doc/Publish/SersPublish/$netVersion
+
+echo 'copy bat'
+#for file in "/root/code/Doc/PublishFile/SersPublish/*.bat" ; do cp -rf \$file \$targetFolder;done
+\\cp -rf /root/code/Doc/PublishFile/SersPublish/. \$targetFolder
+
+echo 'copy xml'
+for file in /root/code/ServiceCenter/App.ServiceCenter/bin/Release/$netVersion/*.xml ; do \\cp -rf \$file \$targetFolder/ServiceCenter;done
+for file in /root/code/ServiceStation/Demo/StressTest/App.Robot.Station/bin/Release/$netVersion/*.xml ; do \\cp -rf \$file \$targetFolder/Robot;done
+for file in /root/code/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/bin/Release/$netVersion/*.xml ; do \\cp -rf \$file \$targetFolder/Demo;done
+
+" 
+
+
+
+
+echo 'publish succeed!'
+
+
+
+
+
+

+ 51 - 0
dotnet/Doc/DevOps/github/50.sers压测CL-publish.sh

@@ -0,0 +1,51 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+# "
+
+ 
+
+
+#----------------------------------------------
+echo "(x.2)dotnet-publish"
+
+docker run -i --rm \
+--env LANG=C.UTF-8 \
+-v $codePath:/root/code \
+serset/dotnet:6.0-sdk \
+bash -c "
+set -e
+
+
+echo 'publish Client'
+cd /root/code/Library/Sers/Sers.CL/Test/CommunicationManage/CmClient
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/CL压测/CmClient
+
+echo 'publish Server'
+cd /root/code/Library/Sers/Sers.CL/Test/CommunicationManage/CmServer
+dotnet build --configuration Release
+dotnet publish --configuration Release --output /root/code/Doc/Publish/CL压测/CmServer
+
+
+
+echo 'copy PublishFile'
+\cp -rf /root/code/Doc/PublishFile/CL压测/. /root/code/Doc/Publish/CL压测
+
+
+
+" 
+
+
+
+
+
+
+
+

+ 107 - 0
dotnet/Doc/DevOps/github/51.sers压测-publish.sh

@@ -0,0 +1,107 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+# "
+
+ 
+
+#---------------------------------------------- 
+echo "(x.2)sers压测-publish单体压测(netcoreapp2.1)"
+
+netVersion=netcoreapp2.1
+basePath=$codePath/Doc/Publish/Sers压测/sers压测-单体压测$netVersion
+mkdir -p $basePath
+
+echo "copy  ServiceCenter"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter $basePath
+
+echo "copy demo"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/wwwroot $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.dll $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.pdb $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.xml $basePath/ServiceCenter 
+
+echo 'copy robot'
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/wwwroot $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.dll $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.pdb $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.xml $basePath/ServiceCenter 
+
+echo 'copy PublishFile'
+\cp -rf $codePath/Doc/PublishFile/Sers压测/单体压测/. $basePath
+
+ 
+
+#---------------------------------------------- 
+echo "(x.3)sers压测-publish单体压测(net6.0)"
+
+netVersion=net6.0
+basePath=$codePath/Doc/Publish/Sers压测/sers压测-单体压测$netVersion
+mkdir -p $basePath
+
+echo "copy  ServiceCenter"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter $basePath
+
+echo "copy demo"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/wwwroot $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.dll $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.pdb $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo/Did.SersLoader.Demo.xml $basePath/ServiceCenter 
+
+echo 'copy robot'
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/wwwroot $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.dll $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.pdb $basePath/ServiceCenter
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot/App.Robot.Station.xml $basePath/ServiceCenter 
+
+echo 'copy PublishFile'
+\cp -rf $codePath/Doc/PublishFile/Sers压测/单体压测/. $basePath
+
+
+
+
+
+#---------------------------------------------- 
+echo "(x.4)sers压测-publish分布式压测(netcoreapp2.1)"
+
+netVersion=netcoreapp2.1
+basePath=$codePath/Doc/Publish/Sers压测/sers压测-分布式压测$netVersion
+mkdir -p $basePath
+
+echo "copy station"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter $basePath
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo $basePath
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot $basePath
+
+echo "copy PublishFile"
+\cp -rf $codePath/Doc/PublishFile/Sers压测/分布式压测/. $basePath
+
+
+
+
+
+#---------------------------------------------- 
+echo "(x.5)sers压测-publish分布式压测(net6.0)"
+
+netVersion=net6.0
+basePath=$codePath/Doc/Publish/Sers压测/sers压测-分布式压测$netVersion
+mkdir -p $basePath
+
+echo "copy station"
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter $basePath
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Demo $basePath
+\cp -rf $codePath/Doc/Publish/SersPublish/$netVersion/Robot $basePath
+
+echo "copy PublishFile"
+\cp -rf $codePath/Doc/PublishFile/Sers压测/分布式压测/. $basePath
+
+
+
+
+ 

+ 102 - 0
dotnet/Doc/DevOps/github/70.docker-build.sh

@@ -0,0 +1,102 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+export version=`grep '<Version>' ${codePath} -r --include *.csproj | grep -oP '>(.*)<' | tr -d '<>'`
+
+export DOCKER_USERNAME=serset
+export DOCKER_PASSWORD=xxx
+
+# "
+
+ 
+netVersion=net6.0
+
+#---------------------------------------------------------------------
+echo "(x.2)dotnet-构建项目文件"
+
+echo "copy SersDocker"
+cp -rf "$codePath/Doc/PublishFile/SersDocker/." "$codePath/Doc/Publish/SersDocker"
+
+echo "copy sers"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/ServiceCenter/." "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers/app"
+
+
+echo "copy sers-gateway"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Gateway/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers-gateway"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Gateway/." "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers-gateway/app"
+
+echo "copy sers-gover"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Gover/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers-gover"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Gover/." "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers-gover/app"
+
+
+
+echo "copy sers-demo"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Demo/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers-demo"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Demo/." "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers-demo/app" 
+
+echo "copy sers-demo-robot"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Robot/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers-demo-robot"
+cp -rf "$codePath/Doc/Publish/SersPublish/$netVersion/Robot/." "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers-demo-robot/app"
+
+
+
+echo "copy sers-demo-sersall"
+cp -rf "$codePath/Doc/Publish/Sers压测/sers压测-单体压测$netVersion/ServiceCenter/appsettings.json" "$codePath/Doc/Publish/SersDocker/docker部署Sers/sers-demo-sersall"
+cp -rf "$codePath/Doc/Publish/Sers压测/sers压测-单体压测$netVersion/ServiceCenter" "$codePath/Doc/Publish/SersDocker/docker制作镜像Sers/sers-demo-sersall/app"
+
+
+
+
+
+#---------------------------------------------------------------------
+#(x.3.1)docker-初始化多架构构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.3.2)docker-构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub
+
+#docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
+
+#docker buildx build $codePath/Publish/06.Docker/制作镜像/$name -t $DOCKER_USERNAME/$name:$version -t $DOCKER_USERNAME/$name --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+ 
+
+
+
+
+ 
+
+
+
+
+ 

+ 93 - 0
dotnet/Doc/DevOps/github/90.release-build.sh

@@ -0,0 +1,93 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn/dotnet
+
+export version=`grep '<Version>' ${codePath} -r --include *.csproj | grep -oP '>(.*)<' | tr -d '<>'`
+
+export export GIT_SSH_SECRET=xxxxxx
+
+export name=Sers
+
+
+# "
+
+ 
+
+
+
+#----------------------------------------------
+echo "(x.2.1)发布文件-创建文件夹及内容"
+
+mkdir -p $codePath/Doc/Publish/release/${name}-${version}
+
+ 
+
+echo 1.创建 nuget
+\cp -rf $codePath/Doc/Publish/nuget/. $codePath/Doc/Publish/release/${name}-${version}/nuget
+
+echo 2.创建 SersPublish
+\cp -rf $codePath/Doc/Publish/SersPublish/. $codePath/Doc/Publish/release/${name}-${version}/SersPublish
+
+echo 3.创建 CL压测
+\cp -rf $codePath/Doc/Publish/CL压测/. $codePath/Doc/Publish/release/${name}-${version}/CL压测
+
+echo 4.创建 Sers压测
+\cp -rf $codePath/Doc/Publish/Sers压测/. $codePath/Doc/Publish/release/${name}-${version}/Sers压测
+
+echo 5.创建 docker制作镜像Sers
+\cp -rf $codePath/Doc/Publish/SersDocker/docker制作镜像Sers/. $codePath/Doc/Publish/release/${name}-${version}/docker制作镜像Sers
+
+echo 6.创建 docker部署Sers
+\cp -rf $codePath/Doc/Publish/SersDocker/docker部署Sers/. $codePath/Doc/Publish/release/${name}-${version}/docker部署Sers
+
+
+
+
+echo "(x.2.3)发布文件-压缩" 
+docker run --rm -i \
+-v $codePath:/root/file \
+serset/filezip dotnet FileZip.dll zip -p -i /root/file/Doc/Publish/release/${name}-${version} -o /root/file/Doc/Publish/release/${name}-${version}.zip
+
+
+
+
+
+#----------------------------------------------
+echo "(x.3)github-提交release文件到release仓库"
+# releaseFile=$codePath/Doc/Publish/release/${name}-${version}.zip
+
+#复制ssh key
+echo "${GIT_SSH_SECRET}" > $codePath/Doc/Publish/release/serset
+chmod 600 $codePath/Doc/Publish/release/serset
+
+#推送到github
+docker run -i --rm \
+-v $codePath/Doc/Publish/release/serset:/root/serset \
+-v $codePath/Doc/Publish/release/${name}-${version}.zip:/root/${name}-${version}.zip \
+serset/git-client bash -c "
+set -e
+ssh-agent bash -c \"
+ssh-add /root/serset
+ssh -T git@github.com -o StrictHostKeyChecking=no
+git config --global user.email 'serset@yeah.com'
+git config --global user.name 'lith'
+mkdir -p /root/code
+cd /root/code
+git clone git@github.com:serset/release.git /root/code
+mkdir -p /root/code/file/${name}
+cp /root/${name}-${version}.zip /root/code/file/${name}
+git add file/${name}/${name}-${version}.zip
+git commit -m 'auto commit ${version}'
+git push -u origin master \" "
+
+
+
+
+
+ 
+ 

+ 58 - 0
dotnet/Doc/DevOps/github/91.release-github.sh

@@ -0,0 +1,58 @@
+set -e
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export codePath=/root/temp/svn
+
+export version=`grep '<Version>' ${codePath} -r --include Sers.Core.csproj | grep -oP '>(.*)<' | tr -d '<>'`
+
+export name=Sers
+
+# "
+
+
+ 
+
+
+#---------------------------------------------------------------------
+#(x.2)初始化github release环境变量
+releaseFile=$codePath/Doc/Publish/release/${name}-${version}.zip
+
+filePath=${releaseFile}
+#name=Vit.Library
+#version=2.5
+
+
+fileType="${filePath##*.}"
+echo "release_name=${name}-${version}" >> $GITHUB_ENV
+echo "release_tag=${version}" >> $GITHUB_ENV
+
+echo "release_draft=false" >> $GITHUB_ENV
+echo "release_prerelease=false" >> $GITHUB_ENV
+
+echo "release_body=" >> $GITHUB_ENV
+
+echo "release_assetPath=${filePath}" >> $GITHUB_ENV
+echo "release_assetName=${name}-${version}.${fileType}" >> $GITHUB_ENV
+echo "release_contentType=application/${fileType}" >> $GITHUB_ENV
+
+
+
+# draft or preivew
+if [[ $version =~ "preview" ]]
+then
+  echo preivew
+  echo "release_prerelease=true" >> $GITHUB_ENV
+else
+  if  [[ "" = $(echo $version | tr -d "0-9\.") ]]
+  then
+    echo release
+  else
+    echo draft
+    echo "release_draft=true" >> $GITHUB_ENV
+  fi
+fi
+

+ 62 - 0
dotnet/Doc/DevOps/github/startup.sh

@@ -0,0 +1,62 @@
+set -e
+
+# cd /root/temp/svn/dotnet/Doc/DevOps/github;bash startup.sh;
+
+#----------------------------------------------
+#(x.1)当前路径 
+curWorkDir=$PWD
+
+cd $curWorkDir/../../..
+export codePath=$PWD
+cd $curWorkDir
+
+
+# export codePath=/root/temp/svn/dotnet
+export name=Sers
+
+#export DOCKER_USERNAME=serset
+#export DOCKER_PASSWORD=xxx
+
+#export NUGET_SERVER=https://api.nuget.org/v3/index.json
+#export NUGET_KEY=xxxxxxxxxx
+
+#export export GIT_SSH_SECRET=xxxxxx
+
+
+
+
+
+
+#----------------------------------------------
+echo "(x.2)get version" 
+export version=`grep '<Version>' ${codePath} -r --include Sers.Core.csproj | grep -oP '>(.*)<' | tr -d '<>'`
+# echo $version
+
+
+
+
+
+
+
+#----------------------------------------------
+echo "(x.3)自动发布 $name-$version"
+
+for file in *.sh
+do
+    if [[ $file != "startup.sh" ]]
+    then
+        echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+        echo bash $file
+        bash $file
+    fi
+done
+
+
+
+
+
+
+ 
+#----------------------------------------------
+#(x.9)
+#cd $curWorkDir

+ 31 - 0
dotnet/Doc/DevOps/k8s/00.svn-checkout.sh

@@ -0,0 +1,31 @@
+set -e
+
+# cd /home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet/Doc/DevOps/k8s; bash 00.svn-checkout.sh
+
+
+#(x.1)当前路径
+curWorkDir=$PWD
+curPath=$(dirname $0)
+
+cd $curPath/../..
+basePath=$PWD
+# basePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers
+
+
+#(x.2)创建文件夹
+mkdir -p $basePath/code
+chmod 777 $basePath/code
+
+mkdir -p $basePath/nuget
+chmod 777 $basePath/nuget
+
+
+
+#(x.3)从svn拉取code
+# svnServer=svn://sers.cloud
+# svnUser=lith
+# svnPwd=pwd
+docker run -it --rm -v $basePath/code:/root/svn serset/svn-client svn checkout $svnServer /root/svn --username $svnUser --password $svnPwd --no-auth-cache
+
+ 
+cd $curWorkDir

+ 33 - 0
dotnet/Doc/DevOps/k8s/01.svn-update.sh

@@ -0,0 +1,33 @@
+set -e
+
+# cd /home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet/Doc/DevOps/k8s; bash 01.svn-update.sh
+
+
+
+
+#(x.1)当前路径
+curWorkDir=$PWD
+curPath=$(dirname $0)
+
+cd $curPath/../../../../..
+codePath=$PWD
+# codePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code
+
+#(x.2)cleanup
+docker run -i --rm -v $codePath:/root/svn serset/svn-client svn cleanup /root/svn --remove-unversioned
+
+
+#(x.3)revert
+docker run -i --rm -v $codePath:/root/svn serset/svn-client svn revert /root/svn -R
+
+
+
+
+#(x.4)拉取最新代码
+# svnUser=lith
+# svnPwd=pwd
+docker run -i --rm -v $codePath:/root/svn serset/svn-client svn update /root/svn --username $svnUser --password $svnPwd --no-auth-cache
+
+
+
+cd $curWorkDir

+ 42 - 0
dotnet/Doc/DevOps/k8s/10.code-changeVersion.sh

@@ -0,0 +1,42 @@
+set -e
+
+# cd /home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet/Doc/DevOps/k8s; bash 10.changeVersion.sh
+
+
+#(x.1)当前路径
+curWorkDir=$PWD
+curPath=$(dirname $0)
+
+cd $curPath/../../../../..
+codePath=$PWD 
+# codePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code
+
+
+echo "(x.2)get oldVersion"
+#oldVersion=1.1.0.53
+oldVersion=`grep '<Version>' Sers/dotnet/Library/Vit/Vit.Core/Vit.Core/Vit.Core.csproj | grep -o '[0-9\.]\+'`
+
+vs=(${oldVersion//./ }) 
+
+
+
+echo "(x.3)get newVersion"
+v4=`docker run -i --rm -v $codePath:/root/svn serset/svn-client svn info \
+| grep 'Rev:' | awk -v RS='\r\n' '{print $4}'` 
+ 
+newVersion=${vs[0]}.${vs[1]}.${vs[2]}.$v4 
+
+ 
+
+
+echo "(x.4)modify csproj"
+echo "$oldVersion -> $newVersion"
+cd $codePath/Sers/dotnet
+sed -i "s/$oldVersion/$newVersion/g" `grep -a $oldVersion . -rl --include *.csproj`
+
+
+
+
+cd $curWorkDir
+
+

+ 33 - 0
dotnet/Doc/DevOps/k8s/20.nuget-publish-main.sh

@@ -0,0 +1,33 @@
+set -e
+
+# cd /home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet/Doc/DevOps/k8s; bash 20.nuget-publish-main.sh
+
+
+#(x.1)当前路径
+curWorkDir=$PWD
+curPath=$(dirname $0)
+
+cd $curPath/../../../../../..
+basePath=$PWD
+ 
+# basePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers
+
+
+echo "(x.2)构建dotnet项目并发布"
+
+docker run -i --rm \
+--env LANG=C.UTF-8 \
+-v $basePath/code:/root/code \
+-v $basePath/nuget/packages:/root/.nuget/packages \
+serset/dotnet:6.0-sdk \
+bash /root/code/Sers/dotnet/Doc/DevOps/21.nuget-publish.sh 
+
+
+
+
+
+
+
+cd $curWorkDir
+
+

+ 19 - 0
dotnet/Doc/DevOps/k8s/21.nuget-publish.sh

@@ -0,0 +1,19 @@
+set -e
+
+
+
+codePath=/root/code/Sers/dotnet
+# codePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet
+
+cd ${codePath}
+for file in $(grep -a '<TargetFramework>netstandard2.0</TargetFramework>' . -rl --include *.csproj)
+do
+    if ! [[ $file =~ (Apm|Empty|Temp|Zmq|SharedMemory|\-) ]]; then
+        echo pack $file
+	cd $codePath
+        cd $(dirname "$file")
+        dotnet build --configuration Release
+	dotnet pack --configuration Release --output '/root/code/Sers/dotnet/Doc/Publish/nuget'
+    fi
+done
+

+ 46 - 0
dotnet/Doc/DevOps/k8s/99.jenkins.sh

@@ -0,0 +1,46 @@
+set -e
+
+
+# cd /home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code/Sers/dotnet/Doc/DevOps/k8s; bash 99.jenkins.sh
+
+
+
+
+#路径
+codePath=/home/DataStore/HDD/Data/008.jenkins/data/PersistentVolume/workspace/Sers/code
+
+
+
+
+#(x.1)svn-update
+
+echo '(x.1.1)svn-cleanup'
+chroot /host bash -c "docker run -i --rm -v $codePath:/root/svn serset/svn-client svn cleanup /root/svn --remove-unversioned"
+
+echo '(x.1.2)svn-revert'
+chroot /host bash -c "docker run -i --rm -v $codePath:/root/svn serset/svn-client svn revert /root/svn -R"
+
+echo '(x.1.3)svn-update'
+# svnUser=lith
+# svnPwd=pwd
+chroot /host bash -c "docker run -i --rm -v $codePath:/root/svn serset/svn-client svn update /root/svn --username $svnUser --password $svnPwd --no-auth-cache"
+
+
+ 
+ 
+
+ 
+
+
+ 
+echo '(x.2)code-changeVersion'
+chroot /host bash -c "cd $codePath/Sers/dotnet/Doc/DevOps;bash 10.code-changeVersion.sh"
+
+
+ 
+ 
+echo '(x.3)nuget-publish'
+chroot /host bash -c "cd $codePath/Sers/dotnet/Doc/DevOps;bash 20.nuget-publish-main.sh"
+
+
+ 

+ 15 - 15
dotnet/Doc/HowToRun.md

@@ -1,15 +1,15 @@
-# How To Run Sers
-
-可部署到Linux(centos7或ubuntu) 或Windows。
-务必先运行服务中心(ServiceCenter)
->运行环境 [netcore2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1) 
-
-[windows点我下载netcore2.1 runtime](https://download.visualstudio.microsoft.com/download/pr/c551fea4-c065-4142-9556-4d78fb949284/efe7c2ef2d51331bd0fced6ea0eadf08/dotnet-runtime-2.1.8-win-x64.exe)
-
-# 运行步骤
-
-   (x.1)下载[程序文件](https://raw.githubusercontent.com/sersms/Sers_NetCore_HelloWorld_Publish/master/Sers/20190306/netapp(190306002).zip)
-   
-   (x.2) 解压zip文件,windows系统双击Startup-All.bat,Linux执行Startup-All.bash中的命令即可。
-   
-   (x.3) 打开服务治理导航页面 [http://localhost:6022/index.html](http://localhost:6022/index.html)
+# How To Run Sers
+
+鍙�儴缃插埌Linux(centos7鎴杣buntu) 鎴朩indows銆�
+鍔″繀鍏堣繍琛屾湇鍔′腑蹇冿紙ServiceCenter锛�
+>杩愯�鐜�� [netcore2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1) 
+
+[windows鐐规垜涓嬭浇netcore2.1 runtime](https://download.visualstudio.microsoft.com/download/pr/c551fea4-c065-4142-9556-4d78fb949284/efe7c2ef2d51331bd0fced6ea0eadf08/dotnet-runtime-2.1.8-win-x64.exe)
+
+# 杩愯�姝ラ�
+
+   (x.1)涓嬭浇[绋嬪簭鏂囦欢](https://raw.githubusercontent.com/serset/Sers_NetCore_HelloWorld_Publish/master/Sers/20190306/netapp(190306002).zip)
+   
+   (x.2) 瑙e帇zip鏂囦欢锛寃indows绯荤粺鍙屽嚮Startup-All.bat锛孡inux鎵ц�Startup-All.bash涓�殑鍛戒护鍗冲彲銆�
+   
+   (x.3) 鎵撳紑鏈嶅姟娌荤悊瀵艰埅椤甸潰 [http://localhost:6022/index.html](http://localhost:6022/index.html)

+ 0 - 29
dotnet/Doc/Publish/ZZZ_copySersStatic.bat

@@ -1,29 +0,0 @@
-
-
-@echo "copy PublishFile"
-xcopy  "..\PublishFile\SersPublish" "SersPublish" /e /i /r /y
-
-
-@echo "copy ServiceCenter wwwroot"
- xcopy  "..\..\netcore\ServiceCenter\App.Gover.Gateway\wwwroot" "SersPublish\ServiceCenter\wwwroot" /e /i /r /y
-
-@echo "copy Gover wwwroot"
-xcopy  "..\..\netcore\ServiceCenter\App.Gover.Gateway\wwwroot" "SersPublish\Gover\wwwroot" /e /i /r /y
-
-@echo "copy Robot wwwroot"
-xcopy  "..\..\netcore\Station\App.Robot.Station\wwwroot" "SersPublish\Robot\wwwroot" /e /i /r /y
-
-
-
-
-@echo "copy  xml of ServiceCenter"
-xcopy  "..\..\netcore\ServiceCenter\App.ServiceCenter\bin\Debug\netcoreapp2.1\*.xml" "SersPublish\ServiceCenter" /i /r /y
- 
-@echo "copy  xml of Robot"
-xcopy  "..\..\netcore\Station\App.Robot.Station\bin\Debug\netcoreapp2.1\*.xml" "SersPublish\Robot" /i /r /y
- 
-@echo "copy  xml of Demo"
-xcopy  "..\..\StationDemo\SersLoader\Did.SersLoader.Demo\bin\Debug\netcoreapp2.1\*.xml" "SersPublish\Demo" /i /r /y
-
-@echo succeed
- 

+ 106 - 0
dotnet/Doc/Publish/echo qps.md

@@ -0,0 +1,106 @@
+#发送获取qps请求
+curl -H "Cookie: user=admin_123456" http://localhost:4580/_gover_/serviceCenter/statistics
+
+
+#显示qps
+curl -s -H "Cookie: user=admin_123456" http://localhost:4580/_gover_/serviceCenter/statistics | grep -Eo '[0-9|\.]+'
+
+
+#每3秒显示一次qps
+for i in {1..10}   
+do  
+curl -s -H "Cookie: user=admin_123456" http://localhost:4580/_gover_/serviceCenter/statistics | grep -Eo '[0-9|\.]+'
+sleep 3
+done  
+
+#每3秒显示一次qps
+for i in {1..100}; do curl -s -H "Cookie: user=admin_123456" http://localhost:4580/_gover_/serviceCenter/statistics | grep -Eo '[0-9|\.]+'; sleep 3; done 
+
+
+
+#----------------------------------------------
+# sers单体压测(net6.0)
+
+dotnet /root/app/ServiceCenter/App.ServiceCenter.dll 
+
+http://127.0.0.1:4580/_gover_/index.html?user=admin_123456
+
+
+
+
+
+CentOs8(2x24核) .net6
+
+Sers.CL.workThreadCount			1
+Sers.CL.Client-Iocp.Mode		Simple
+Sers.RpcDataSerializeMode		BytePointor
+Sers.LocalApiService.workThreadCount	{workThread}
+Vit.ConsumerMode			ConsumerCache_BlockingCollection
+
+
+方式 线程数(处理/请求)	qps(cpu利用率)
+    workThread/requestThread
+
+
+ApiClientAsync 16/16	140-150万(15%)   
+
+ApiClientAsync 18/18	150-180万(18%) 
+
+ApiClientAsync 20/20	160-230万(18%)
+   
+ApiClientAsync 22/22	160-190万(19%)	
+
+ApiClientAsync 24/24	160-180万(21%)   
+
+
+
+
+#----------------------------------------------
+# sers分布式压测(net6.0)
+
+dotnet /root/app/ServiceCenter/App.ServiceCenter.dll 
+
+ 
+
+
+dotnet /root/app/Demo/Did.SersLoader.Demo.dll  > console.log 2>&1 &
+
+
+dotnet /root/app/Robot/App.Robot.Station.dll  > console.log 2>&1 &
+
+
+#杀死进程
+kill -s 9 `pgrep -f 'dotnet'`
+
+
+
+
+
+CentOs8(2x24核) .net6
+
+
+# ServiceCenter:
+
+Sers.CL.workThreadCount			4
+Sers.CL.Client-Iocp.Mode		Timer
+Sers.RpcDataSerializeMode		BytePointor
+Sers.LocalApiService.workThreadCount	4
+Vit.ConsumerMode			ConsumerCache_BlockingCollection
+
+
+
+# Demo and Robot
+
+Sers.CL.workThreadCount			2
+Sers.CL.Client-Iocp.Mode		Timer
+Sers.RpcDataSerializeMode		BytePointor
+Sers.LocalApiService.workThreadCount	20
+Vit.ConsumerMode			ConsumerCache_BlockingCollection
+
+
+
+
+方式 线程数(处理/请求)	qps(cpu利用率-服务端 客户端)
+    workThread/requestThread	
+
+ApiClientAsync 20/5000		18-20万(20% 14%)   

+ 18 - 0
dotnet/Doc/Publish/nuget-push to NugetServer.Sers.bat

@@ -0,0 +1,18 @@
+@echo off 
+
+cd /d nuget
+ 
+for /R %%s in (*.nupkg) do ( 
+echo push %%s 
+dotnet nuget push %%s  -k ee28314c-f7fe-2550-bd77-e09eda3d0119  -s http://nuget.sers.cloud:8
+) 
+
+
+cd /d ..
+
+echo 'nuget push to NugetServer.Sers succeed£¡'
+echo 'nuget push to NugetServer.Sers succeed£¡'
+echo 'nuget push to NugetServer.Sers succeed£¡'
+
+
+:: dotnet nuget delete ServiceAdaptor.NetCore.Sers 1.0.4.75 -k ee28314c-f7fe-2550-bd77-e09eda3d0119  -s http://nuget.sers.cloud --non-interactive

+ 0 - 139
dotnet/Doc/Publish/pack sers_lib.bat

@@ -1,139 +0,0 @@
-cd /d ../../
-
-echo 'pack Vit.Core'
-cd /d Vit\Vit.Core\Vit.Core
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget 
-cd /d ../../../
-
-
-echo 'pack Vit.Ioc'
-cd /d Vit\Vit.Ioc\Vit.Ioc
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../  
-
-
-echo 'pack Vit.Net.Http.FormFile'
-cd /d Vit\Vit.Net.Http.FormFile
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\Doc\Publish\nuget 
-cd /d ../../
-
-
-echo 'pack Vit.WebHost'
-cd /d Vit\Vit.WebHost
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\Doc\Publish\nuget 
-cd /d ../../
-
-
-echo 'pack Sers.Hardware'
-cd /d Sers\Sers.Hardware\Sers.Hardware
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../ 
-
-
-echo 'pack Sers.Core'
-cd /d Sers\Sers.Core\Sers.Core
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../  
-
-
-
-echo 'pack Sers.Ioc'
-cd /d Sers\Sers.Ioc\Sers.Ioc
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../ 
-
-
-
-echo 'pack Sers.CL.Ipc.NamedPipe'
-cd /d Sers\Sers.CL\Ipc\Sers.CL.Ipc.NamedPipe
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../
-
-echo 'pack Sers.CL.Socket.Iocp'
-cd /d Sers\Sers.CL\Socket\Sers.CL.Socket.Iocp
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../
-
-echo 'pack Sers.CL.Socket.ThreadWait'
-cd /d Sers\Sers.CL\Socket\Sers.CL.Socket.ThreadWait
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../
-
-
-echo 'pack Sers.CL.ClrZmq.ThreadWait'
-cd /d Sers\Sers.CL\Zmq\ThreadWait\Sers.CL.ClrZmq.ThreadWait
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../../
-
-
-echo 'pack Sers.CL.WebSocket'
-cd /d Sers\Sers.CL\WebSocket\Sers.CL.WebSocket
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../
-
-
-echo 'pack Sers.CL.Zmq.FullDuplex'
-cd /d Sers\Sers.CL\Zmq\FullDuplex\Sers.CL.Zmq.FullDuplex
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
-cd /d ../../../../../
-
-
-echo 'pack Sers.ServiceStation'
-cd /d Sers\Sers.ServiceStation\Sers.ServiceStation
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../ 
-
-
-echo 'pack Sers.Gateway'
-cd /d Sers\Sers.Gateway\Sers.Gateway
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../
-
-
-echo 'pack Sers.ServiceCenter'
-cd /d Sers\Sers.ServiceCenter\Sers.ServiceCenter
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../
-
-echo 'pack Sers.Gover'
-cd /d Sers\Sers.ServiceCenter\Sers.Gover
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../
-
-
-echo 'pack Sers.Serslot'
-cd /d Sers\ApiLoader\Sers.Serslot
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../  
-
-
-echo 'pack Sers.NetcoreLoader'
-cd /d Sers\ApiLoader\Sers.NetcoreLoader
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
-cd /d ../../../  
- 
-
-cd /d Doc\Publish
-
-echo 'pack sers_lib succeed£¡'
-echo 'pack sers_lib succeed£¡'
-echo 'pack sers_lib succeed£¡'

+ 0 - 24
dotnet/Doc/Publish/publish CL压测.bat

@@ -1,24 +0,0 @@
-cd /d ../../
-
-echo 'publish Client'
-cd /d Sers\Sers.CL\Test\CommunicationManage\Client
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\..\..\Doc\Publish\CL压测\CLClient
-cd /d ../../../../../
-   
-echo 'publish Client'
-cd /d Sers\Sers.CL\Test\CommunicationManage\Server
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\..\..\Doc\Publish\CL压测\CLServer
-cd /d ../../../../../
-
-cd /d Doc\Publish
-
-@echo "copy from PublishFile"
- xcopy  "..\PublishFile\CL压测" "CL压测" /e /i /r /y
-
-echo 'publish CL压测 succeed!'
-echo 'publish CL压测 succeed!'
-echo 'publish CL压测 succeed!'
-
-

+ 0 - 21
dotnet/Doc/Publish/publish Sers单体压测.bat

@@ -1,21 +0,0 @@
-
-
-@echo "copy  ServiceCenter"
-xcopy  "SersPublish\ServiceCenter" "Sers데竟箕꿎\ServiceCenter" /e /i /r /y
-
-@echo "copy demo"
-xcopy  "SersPublish\Demo\wwwroot" "Sers데竟箕꿎\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\Demo\Did.SersLoader.Demo.dll" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-xcopy  "SersPublish\Demo\Did.SersLoader.Demo.pdb" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-xcopy  "SersPublish\Demo\Did.SersLoader.Demo.xml" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-
-
-@echo "copy  xml of Robot"
-xcopy  "SersPublish\Robot\wwwroot" "Sers데竟箕꿎\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\Robot\App.Robot.Station.dll" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-xcopy  "SersPublish\Robot\App.Robot.Station.pdb" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-xcopy  "SersPublish\Robot\App.Robot.Station.xml" "Sers데竟箕꿎\ServiceCenter" /i /r /y
-
-
-@echo "copy PublishFile"
-xcopy  "..\PublishFile\Sers데竟箕꿎" "Sers데竟箕꿎" /e /i /r /y

+ 0 - 45
dotnet/Doc/Publish/publish sers.bat

@@ -1,45 +0,0 @@
-cd /d ../../
-
-echo 'publish Gateway'
-cd /d netcore\Gateway\App.Gateway
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\Doc\Publish\SersPublish\Gateway 
-cd /d ../../../
- 
-echo 'publish Gover'
-cd /d netcore\ServiceCenter\App.Gover.Gateway
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\Doc\Publish\SersPublish\Gover 
-cd /d ../../../
- 
-echo 'publish ServiceCenter'
-cd /d netcore\ServiceCenter\App.ServiceCenter
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\Doc\Publish\SersPublish\ServiceCenter
-cd /d ../../../ 
-
-echo 'publish Robot'
-cd /d netcore\Station\App.Robot.Station
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\Doc\Publish\SersPublish\Robot
-cd /d ../../../
-
-
-echo 'publish Demo'
-cd /d StationDemo\SersLoader\Did.SersLoader.Demo
-dotnet build --configuration Release
-dotnet publish --configuration Release --output ..\..\..\Doc\Publish\SersPublish\Demo
-cd /d ../../../
-
- 
-cd /d Doc\Publish
-
-
-call "ZZZ_copySersStatic.bat"
-
-
-echo 'publish sers succeed£¡'
-echo 'publish sers succeed£¡'
-echo 'publish sers succeed£¡'
-
-

+ 1 - 1
dotnet/Doc/PublishFile/CL压测/StartClient.bat

@@ -1,2 +1,2 @@
-dotnet CLClient/CLClient.dll
+dotnet CmClient/CmClient.dll
 pause

+ 4 - 4
dotnet/Doc/PublishFile/CL压测/StartServer.bat

@@ -1,5 +1,5 @@
-dotnet CLServer/CLServer.dll
-pause
-
-
+dotnet CmServer/CmServer.dll
+pause
+
+
  

+ 32 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/docker导入导出镜像.txt

@@ -0,0 +1,32 @@
+#导出镜像
+export tag=${tag}
+
+docker save -o /root/image/dotnet.2.1.tar serset/dotnet:2.1
+docker save -o /root/image/sers-cgateway-1.2.0.tar serset/sers-cgateway:1.2.0
+
+
+docker save -o /root/image/sers.${tag}.tar serset/sers:${tag}
+docker save -o /root/image/sers-gateway.${tag}.tar serset/sers-gateway:${tag}
+docker save -o /root/image/sers-gover.${tag}.tar serset/sers-gover:${tag}
+
+docker save -o /root/image/sers-demo-robot.${tag}.tar serset/sers-demo-robot:${tag}
+docker save -o /root/image/sers-demo-sersall.${tag}.tar serset/sers-demo-sersall:${tag}
+docker save -o /root/image/sers-demo.${tag}.tar serset/sers-demo:${tag}
+
+
+
+#导入镜像
+
+docker load -i /root/image/dotnet.2.1.tar
+docker load -i /root/image/sers-cgateway.1.2.0.tar
+
+docker load -i /root/image/sers.${tag}.tar
+docker load -i /root/image/sers-gateway.${tag}.tar
+docker load -i /root/image/sers-gover.${tag}.tar
+
+docker load -i /root/image/sers-demo-robot.${tag}.tar
+docker load -i /root/image/sers-demo-sersall.${tag}.tar 
+docker load -i /root/image/sers-demo.${tag}.tar 
+
+
+ 

+ 3 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/Dockerfile

@@ -0,0 +1,3 @@
+FROM ubuntu:20.04
+COPY root /root
+CMD ["sh","/root/app/startup.sh"]

BIN
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/Gateway


+ 65 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/appsettings.json

@@ -0,0 +1,65 @@
+{
+  "Sers": {
+
+  	"//Mq":" 消息队列配置",
+    "Mq": {
+      "Socket": {
+        "//host":" ServiceCenter 服务端 host地址",
+        "host": "127.0.0.1",
+        "//port":" ServiceCenter 服务端 监听端口号 ",
+        "port": 10345, 
+            
+
+        "//(x.1)workThread":" 后台处理消息的线程个数(单位个,默认16) ",
+        "workThreadCount": 16,
+
+        "//(x.2)ping":" ",
+        
+        "//pingTimeout":" 心跳测试超时时间(单位ms,默认2000)",        
+        "pingTimeout": 30000,
+        
+        "//pingRetryCount":" 心跳测试失败重试次数(单位次,默认3)",         
+        "pingRetryCount": 10,
+        
+        "//pingInterval":" 心跳测试时间间隔(单位ms,默认1000)",       
+        "pingInterval": 10000,
+
+       
+        "//(x.3)request":" ",  
+        "//requestTimeout":" 请求超时时间(单位ms,默认300000)",      
+        "requestTimeout": 60000,
+        
+ 
+        "//(x.4)secretKey":" 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 ",
+        "secretKey": "SersSocketMq"
+      }
+    },
+ 
+ 
+    "Gateway": {
+	"//Console_PrintLog":"  print the log to console. default:false ",
+	"Console_PrintLog":"false",
+
+	"Rpc":{ 	"CallerSource":"OutSide"},
+	"WebHost":{ 	
+		"http_port":"6008", "workThreadCount":16,
+		
+		"//ResponseDefaultContentType":" Response Default  Content-Type ",
+		"ResponseDefaultContentType": "application/json; charset=UTF-8",	
+
+		"//ResponseExtHeaders":" Response Ext Headers.(enable CORS)",
+		"ResponseExtHeaders": "\nAccess-Control-Allow-Headers: Authorization,authorization,Content-Type\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Origin: *"	
+	},
+
+	"StationRegist_RegistArg":
+	{	"serviceStationInfo":		{"serviceStationKey":"CGateway001","stationVersion":"1.2.0","serviceStationName":"CGateway"}
+		,"deviceInfo":	{"deviceKey":"CGateway001","OSPlatform":"Linux","OSArchitecture":"X64","OSDescription":"Ubuntu","MachineName":"Linux"}
+		,"apiNodes":[]	
+	}	
+
+	
+    }
+  }
+
+
+}

+ 26 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/CGateway/readme.md

@@ -0,0 +1,26 @@
+Sers CGateway v1.2.0
+
+--------------------------------------------
+说明:
+
+
+
+1. 开发环境:Ubuntu eclipse c++   
+    运行环境:Linux
+
+
+
+
+2. linux运行脚本:
+
+cd /root/netapp/CGateway
+
+chmod  -R 777  ./Gateway
+
+ ./Gateway
+
+
+
+
+
+ 

+ 5 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-cgateway-1.2.0/root/app/startup.sh

@@ -0,0 +1,5 @@
+cd   /root/app/CGateway
+chmod  -R 777  ./Gateway
+
+#echo "run CGateway"
+./Gateway

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-robot/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0-runtime
+COPY root /root

+ 3 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-robot/root/app/startup.sh

@@ -0,0 +1,3 @@
+cd  /root/app/Robot
+
+dotnet App.Robot.Station.dll

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-sersall/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0
+COPY root /root

+ 3 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo-sersall/root/app/startup.sh

@@ -0,0 +1,3 @@
+cd   /root/app/ServiceCenter
+
+dotnet App.ServiceCenter.dll

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0-runtime
+COPY root /root

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-demo/root/app/startup.sh

@@ -0,0 +1,2 @@
+cd   /root/app/Demo
+dotnet Did.SersLoader.Demo.dll

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gateway/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0
+COPY root /root

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gateway/root/app/startup.sh

@@ -0,0 +1,2 @@
+cd   /root/app/Gateway
+dotnet App.Gateway.dll

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gover/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0
+COPY root /root

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers-gover/root/app/startup.sh

@@ -0,0 +1,2 @@
+cd /root/app/Gover
+dotnet App.Gover.Gateway.dll

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers/Dockerfile

@@ -0,0 +1,2 @@
+FROM serset/dotnet:6.0
+COPY root /root

+ 2 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/sers/root/app/startup.sh

@@ -0,0 +1,2 @@
+cd   /root/app/ServiceCenter
+dotnet App.ServiceCenter.dll

+ 87 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/制作镜像Sers.txt

@@ -0,0 +1,87 @@
+#构建多架构镜像
+
+#docker login -u serset -p xxxxxxxxx
+
+#---------------------------------------------------------------------
+#(x.1)初始化构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.2)构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub
+
+#把文件夹拷贝到image下
+cd /root/image
+
+
+#构建镜像并推送到 Docker Hub 
+export tag=2.1.3.627
+
+cd sers
+docker buildx build . -t serset/sers:${tag} -t serset/sers --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd .. 
+
+
+cd sers-gover 
+docker buildx build . -t serset/sers-gover:${tag} -t serset/sers-gover --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+
+cd sers-gateway
+docker buildx build . -t serset/sers-gateway:${tag} -t serset/sers-gateway --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+
+
+cd sers-demo-robot 
+docker buildx build . -t serset/sers-demo-robot:${tag} -t serset/sers-demo-robot --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+cd sers-demo
+docker buildx build . -t serset/sers-demo:${tag} -t serset/sers-demo --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+cd sers-demo-sersall 
+docker buildx build . -t serset/sers-demo-sersall:${tag} -t serset/sers-demo-sersall --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+ 
+
+
+#强制删除镜像名称中包含sers的镜像
+# docker rmi --force $(docker images | grep sers- | awk '{print $3}')
+
+
+
+
+
+
+
+
+
+
+
+
+ 

+ 48 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker制作镜像Sers/制作镜像sers-cgateway-1.2.0.txt

@@ -0,0 +1,48 @@
+#构建多架构镜像
+
+#docker login -u serset -p xxxxxxxxx
+
+#---------------------------------------------------------------------
+#(x.1)初始化构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.2)构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub 
+
+#把本文件所在目录下的cgateway文件夹拷贝到 image 
+cd /root/image 
+
+#构建镜像并推送到 Docker Hub
+cd sers-cgateway-1.2.0
+docker buildx build . -t serset/sers-cgateway:1.2.0 -t serset/sers-cgateway --platform=linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --push
+cd .. 
+
+ 
+#强制删除镜像名称中包含sers的镜像
+# docker rmi --force $(docker images | grep sers- | awk '{print $3}')
+
+
+

+ 65 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-cgateway/appsettings.json

@@ -0,0 +1,65 @@
+{
+  "Sers": {
+
+  	"//Mq":" 消息队列配置",
+    "Mq": {
+      "Socket": {
+        "//host":" ServiceCenter 服务端 host地址",
+        "host": "127.0.0.1",
+        "//port":" ServiceCenter 服务端 监听端口号 ",
+        "port": 4580, 
+            
+
+        "//(x.1)workThread":" 后台处理消息的线程个数(单位个,默认16) ",
+        "workThreadCount": 16,
+
+        "//(x.2)ping":" ",
+        
+        "//pingTimeout":" 心跳测试超时时间(单位ms,默认2000)",        
+        "pingTimeout": 30000,
+        
+        "//pingRetryCount":" 心跳测试失败重试次数(单位次,默认3)",         
+        "pingRetryCount": 10,
+        
+        "//pingInterval":" 心跳测试时间间隔(单位ms,默认1000)",       
+        "pingInterval": 10000,
+
+       
+        "//(x.3)request":" ",  
+        "//requestTimeout":" 请求超时时间(单位ms,默认300000)",      
+        "requestTimeout": 60000,
+        
+ 
+        "//(x.4)secretKey":" 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 ",
+        "secretKey": "SersCL"
+      }
+    },
+ 
+ 
+    "Gateway": {
+	"//Console_PrintLog":"  print the log to console. default:false ",
+	"Console_PrintLog":"false",
+
+	"Rpc":{ 	"CallerSource":"OutSide"},
+	"WebHost":{ 	
+		"http_port":"6008", "workThreadCount":16,
+		
+		"//ResponseDefaultContentType":" Response Default  Content-Type ",
+		"ResponseDefaultContentType": "application/json; charset=UTF-8",	
+
+		"//ResponseExtHeaders":" Response Ext Headers.(enable CORS)",
+		"ResponseExtHeaders": "\nAccess-Control-Allow-Headers: Authorization,authorization,Content-Type\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Origin: *"	
+	},
+
+	"StationRegist_RegistArg":
+	{	"serviceStationInfo":		{"serviceStationKey":"CGateway001","stationVersion":"1.2.0","serviceStationName":"CGateway"}
+		,"deviceInfo":	{"deviceKey":"CGateway001","OSPlatform":"Linux","OSArchitecture":"X64","OSDescription":"Ubuntu","MachineName":"Linux"}
+		,"apiNodes":[]	
+	}	
+
+	
+    }
+  }
+
+
+}

+ 58 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-cgateway/docker部署cgateway.txt

@@ -0,0 +1,58 @@
+docker部署sers-cgateway
+
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-cgateway
+docker run --name=sers-cgateway --restart=always -d \
+-p 6008:6008 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/CGateway/appsettings.json \
+-v $PWD/Logs:/root/app/CGateway/Logs \
+serset/sers-cgateway:1.2.0
+cd ..
+
+
+#端口    http://ip:6008
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-cgateway
+
+#在容器内执行命令行
+docker  exec -it sers-cgateway bash
+
+#停止容器
+docker stop sers-cgateway
+
+#打开容器
+docker start sers-cgateway
+
+#重启容器
+docker restart sers-cgateway
+
+
+#删除容器
+docker rm sers-cgateway -f
+
+

+ 63 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo-robot/docker部署sers-demo-robot.txt

@@ -0,0 +1,63 @@
+docker部署sers-demo-robot
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo-robot
+docker run --name=sers-demo-robot --restart=always -d \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/Robot/appsettings.json \
+-v $PWD/Logs:/root/app/Robot/Logs \
+-v $PWD/Data:/root/app/Robot/Data \
+serset/sers-demo-robot
+cd ..
+
+
+#精简
+docker run --name=sers-demo-robot --restart=always --net=host -d serset/sers-demo-robot
+
+ 
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo-robot
+
+#在容器内执行命令行
+docker  exec -it sers-demo-robot bash
+
+#停止容器
+docker stop sers-demo-robot
+
+#打开容器
+docker start sers-demo-robot
+
+#重启容器
+docker restart sers-demo-robot
+
+
+#删除容器
+docker rm sers-demo-robot -f
+
+

+ 58 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo-sersall/docker部署sers-demo-sersall.txt

@@ -0,0 +1,58 @@
+docker部署sers-demo-sersall
+ 
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo-sersall
+docker run --name=sers-demo-sersall --restart=always -d --net=host\
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/ServiceCenter/appsettings.json \
+-v $PWD/Logs:/root/app/ServiceCenter/Logs \
+-v $PWD/Data:/root/app/ServiceCenter/Data \
+serset/sers-demo-sersall
+cd ..
+
+#精简
+docker run --name=sers-demo-sersall --restart=always -d --net=host serset/sers-demo-sersall
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+#---------------------------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo-sersall 
+
+#在容器内执行命令行
+docker  exec -it sers-demo-sersall  bash
+
+#停止容器
+docker stop sers-demo-sersall 
+
+#打开容器
+docker start sers-demo-sersall 
+
+#重启容器
+docker restart sers-demo-sersall 
+
+
+#删除容器
+docker rm sers-demo-sersall -f 
+
+

+ 60 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-demo/docker部署sers-demo.txt

@@ -0,0 +1,60 @@
+docker部署sers-demo
+
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo
+docker run --name=sers-demo --restart=always -d \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/Demo/appsettings.json \
+-v $PWD/Logs:/root/app/Demo/Logs \
+serset/sers-demo
+cd ..
+
+#精简
+docker run --name=sers-demo --restart=always -d serset/sers-demo
+
+
+ 
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo
+
+#在容器内执行命令行
+docker  exec -it sers-demo bash
+
+#停止容器
+docker stop sers-demo
+
+#打开容器
+docker start sers-demo
+
+#重启容器
+docker restart sers-demo
+
+
+#删除容器
+docker rm sers-demo -f
+
+

+ 61 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-gateway/docker部署sers-gateway.txt

@@ -0,0 +1,61 @@
+docker部署sers-gateway
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-gateway
+docker run --name=sers-gateway --restart=always -d \
+-p 4582:4582 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/Gateway/appsettings.json \
+-v $PWD/Logs:/root/app/Gateway/Logs \
+-v $PWD/Data:/root/app/Gateway/Data \
+serset/sers-gateway
+ 
+
+#精简
+docker run --name=sers-gateway --restart=always -d -p 4582:4582 serset/sers-gateway
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+通信端口 tcp://ip:4582
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-gateway
+
+#在容器内执行命令行
+docker  exec -it sers-gateway bash
+
+#停止容器
+docker stop sers-gateway
+
+#打开容器
+docker start sers-gateway
+
+#重启容器
+docker restart sers-gateway
+
+
+#删除容器
+docker rm sers-gateway -f
+
+

+ 61 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers-gover/docker部署sers-gover.txt

@@ -0,0 +1,61 @@
+docker部署sers-gover
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-gover
+docker run --name=sers-gover --restart=always -d \
+-p 4581:4581 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/Gover/appsettings.json \
+-v $PWD/Logs:/root/app/Gover/Logs \
+serset/sers-gover
+cd ..
+ 
+#精简
+docker run --name=sers-gover --restart=always -d -p 4581:4581 serset/sers-gover
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+通信端口 tcp://ip:4581
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-gover
+
+#在容器内执行命令行
+docker  exec -it sers-gover bash
+
+#停止容器
+docker stop sers-gover
+
+#打开容器
+docker start sers-gover
+
+#重启容器
+docker restart sers-gover
+
+
+#删除容器
+docker rm sers-gover  -f
+
+

+ 66 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/docker部署Sers/sers/docker部署sers.txt

@@ -0,0 +1,66 @@
+docker部署sers-servicecenter
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers
+docker run --name=sers --restart=always -d \
+-p 4580:4580 -p 4501:4501 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/ServiceCenter/appsettings.json \
+-v $PWD/Logs:/root/app/ServiceCenter/Logs \
+-v $PWD/Data:/root/app/ServiceCenter/Data \
+serset/sers
+cd ..
+
+
+#精简
+docker run --name=sers --restart=always -d -p 4580:4580 -p 4501:4501 serset/sers
+
+gover     http://ip:4580
+通信端口 tcp://ip:4501
+
+
+
+#(x.3)应用已经运行
+   可在文件夹ServiceCenter/Logs 中查看日志
+
+ 
+#---------------------------------------
+#常用命令
+
+#查看容器logs
+docker logs sers
+
+#在容器内执行命令行
+docker  exec -it sers bash
+
+#停止容器
+docker stop sers
+
+#打开容器
+docker start sers
+
+#重启容器
+docker restart sers
+
+
+#删除容器
+docker rm sers -f
+
+

+ 38 - 0
dotnet/Doc/PublishFile/SersDocker(2021-05-19)/pack SersDocker.bat

@@ -0,0 +1,38 @@
+
+set netVersion=net6.0
+
+@echo "copy  SersDocker"
+xcopy  "..\PublishFile\SersDocker" "SersDocker" /e /i /r /y
+
+@echo "copy sers"
+xcopy  "SersPublish\%netVersion%\ServiceCenter\appsettings.json" "SersDocker\docker꼬憾Sers\sers" 
+xcopy  "SersPublish\%netVersion%\ServiceCenter" "SersDocker\docker齡鱗쓸獗Sers\sers\root\app\ServiceCenter" /e /i /r /y
+
+
+@echo "copy sers-demo"
+xcopy  "SersPublish\%netVersion%\Demo\appsettings.json" "SersDocker\docker꼬憾Sers\sers-demo" 
+xcopy  "SersPublish\%netVersion%\Demo" "SersDocker\docker齡鱗쓸獗Sers\sers-demo\root\app\Demo" /e /i /r /y
+
+@echo "copy sers-demo-robot"
+xcopy  "SersPublish\%netVersion%\Robot\appsettings.json" "SersDocker\docker꼬憾Sers\sers-demo-robot" 
+xcopy  "SersPublish\%netVersion%\Robot" "SersDocker\docker齡鱗쓸獗Sers\sers-demo-robot\root\app\Robot" /e /i /r /y
+
+@echo "copy sers-demo-sersall"
+xcopy  "Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%\ServiceCenter\appsettings.json" "SersDocker\docker꼬憾Sers\sers-demo-sersall" 
+xcopy  "Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%\ServiceCenter" "SersDocker\docker齡鱗쓸獗Sers\sers-demo-sersall\root\app\ServiceCenter" /e /i /r /y
+
+
+
+@echo "copy sers-gateway"
+xcopy  "SersPublish\%netVersion%\Gateway\appsettings.json" "SersDocker\docker꼬憾Sers\sers-gateway" 
+xcopy  "SersPublish\%netVersion%\Gateway" "SersDocker\docker齡鱗쓸獗Sers\sers-gateway\root\app\Gateway" /e /i /r /y
+
+@echo "copy sers-gover"
+xcopy  "SersPublish\%netVersion%\Gover\appsettings.json" "SersDocker\docker꼬憾Sers\sers-gover" 
+xcopy  "SersPublish\%netVersion%\Gover" "SersDocker\docker齡鱗쓸獗Sers\sers-gover\root\app\Gover" /e /i /r /y
+
+
+
+
+
+ 

+ 32 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/docker导入导出镜像.txt

@@ -0,0 +1,32 @@
+#导出镜像
+export tag=${tag}
+
+docker save -o /root/image/dotnet.2.1.tar serset/dotnet:2.1
+docker save -o /root/image/sers-cgateway-1.2.0.tar serset/sers-cgateway:1.2.0
+
+
+docker save -o /root/image/sers.${tag}.tar serset/sers:${tag}
+docker save -o /root/image/sers-gateway.${tag}.tar serset/sers-gateway:${tag}
+docker save -o /root/image/sers-gover.${tag}.tar serset/sers-gover:${tag}
+
+docker save -o /root/image/sers-demo-robot.${tag}.tar serset/sers-demo-robot:${tag}
+docker save -o /root/image/sers-demo-sersall.${tag}.tar serset/sers-demo-sersall:${tag}
+docker save -o /root/image/sers-demo.${tag}.tar serset/sers-demo:${tag}
+
+
+
+#导入镜像
+
+docker load -i /root/image/dotnet.2.1.tar
+docker load -i /root/image/sers-cgateway.1.2.0.tar
+
+docker load -i /root/image/sers.${tag}.tar
+docker load -i /root/image/sers-gateway.${tag}.tar
+docker load -i /root/image/sers-gover.${tag}.tar
+
+docker load -i /root/image/sers-demo-robot.${tag}.tar
+docker load -i /root/image/sers-demo-sersall.${tag}.tar 
+docker load -i /root/image/sers-demo.${tag}.tar 
+
+
+ 

+ 5 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/Dockerfile

@@ -0,0 +1,5 @@
+FROM ubuntu:20.04
+COPY app /root/app
+RUN chmod -R 777 /root/app/Gateway
+WORKDIR /root/app
+CMD ./Gateway

BIN
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/Gateway


+ 65 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/appsettings.json

@@ -0,0 +1,65 @@
+{
+  "Sers": {
+
+  	"//Mq":" 消息队列配置",
+    "Mq": {
+      "Socket": {
+        "//host":" ServiceCenter 服务端 host地址",
+        "host": "127.0.0.1",
+        "//port":" ServiceCenter 服务端 监听端口号 ",
+        "port": 10345, 
+            
+
+        "//(x.1)workThread":" 后台处理消息的线程个数(单位个,默认16) ",
+        "workThreadCount": 16,
+
+        "//(x.2)ping":" ",
+        
+        "//pingTimeout":" 心跳测试超时时间(单位ms,默认2000)",        
+        "pingTimeout": 30000,
+        
+        "//pingRetryCount":" 心跳测试失败重试次数(单位次,默认3)",         
+        "pingRetryCount": 10,
+        
+        "//pingInterval":" 心跳测试时间间隔(单位ms,默认1000)",       
+        "pingInterval": 10000,
+
+       
+        "//(x.3)request":" ",  
+        "//requestTimeout":" 请求超时时间(单位ms,默认300000)",      
+        "requestTimeout": 60000,
+        
+ 
+        "//(x.4)secretKey":" 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 ",
+        "secretKey": "SersSocketMq"
+      }
+    },
+ 
+ 
+    "Gateway": {
+	"//Console_PrintLog":"  print the log to console. default:false ",
+	"Console_PrintLog":"false",
+
+	"Rpc":{ 	"CallerSource":"OutSide"},
+	"WebHost":{ 	
+		"http_port":"6008", "workThreadCount":16,
+		
+		"//ResponseDefaultContentType":" Response Default  Content-Type ",
+		"ResponseDefaultContentType": "application/json; charset=UTF-8",	
+
+		"//ResponseExtHeaders":" Response Ext Headers.(enable CORS)",
+		"ResponseExtHeaders": "\nAccess-Control-Allow-Headers: Authorization,authorization,Content-Type\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Origin: *"	
+	},
+
+	"StationRegist_RegistArg":
+	{	"serviceStationInfo":		{"serviceStationKey":"CGateway001","stationVersion":"1.2.0","serviceStationName":"CGateway"}
+		,"deviceInfo":	{"deviceKey":"CGateway001","OSPlatform":"Linux","OSArchitecture":"X64","OSDescription":"Ubuntu","MachineName":"Linux"}
+		,"apiNodes":[]	
+	}	
+
+	
+    }
+  }
+
+
+}

+ 26 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-cgateway-1.2.0/app/readme.md

@@ -0,0 +1,26 @@
+Sers CGateway v1.2.0
+
+--------------------------------------------
+说明:
+
+
+
+1. 开发环境:Ubuntu eclipse c++   
+    运行环境:Linux
+
+
+
+
+2. linux运行脚本:
+
+cd /root/netapp/CGateway
+
+chmod  -R 777  ./Gateway
+
+ ./Gateway
+
+
+
+
+
+ 

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo-robot/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0-runtime
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet App.Robot.Station.dll

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo-sersall/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet App.ServiceCenter.dll

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-demo/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0-runtime
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet Did.SersLoader.Demo.dll

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-gateway/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet App.Gateway.dll

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers-gover/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet App.Gover.Gateway.dll

+ 4 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/sers/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:6.0
+COPY app /root/app
+WORKDIR /root/app
+CMD dotnet App.ServiceCenter.dll

+ 87 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/制作镜像Sers.txt

@@ -0,0 +1,87 @@
+#构建多架构镜像
+
+#docker login -u serset -p xxxxxxxxx
+
+#---------------------------------------------------------------------
+#(x.1)初始化构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.2)构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub
+
+#把文件夹拷贝到image下
+cd /root/image
+
+
+#构建镜像并推送到 Docker Hub 
+export tag=2.1.6-temp
+
+cd sers
+docker buildx build . -t serset/sers:${tag} -t serset/sers --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd .. 
+
+
+cd sers-gover 
+docker buildx build . -t serset/sers-gover:${tag} -t serset/sers-gover --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+
+cd sers-gateway
+docker buildx build . -t serset/sers-gateway:${tag} -t serset/sers-gateway --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+
+
+cd sers-demo-robot 
+docker buildx build . -t serset/sers-demo-robot:${tag} -t serset/sers-demo-robot --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+cd sers-demo
+docker buildx build . -t serset/sers-demo:${tag} -t serset/sers-demo --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+cd sers-demo-sersall 
+docker buildx build . -t serset/sers-demo-sersall:${tag} -t serset/sers-demo-sersall --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+cd ..
+
+ 
+
+
+#强制删除镜像名称中包含sers的镜像
+# docker rmi --force $(docker images | grep sers | awk '{print $3}')
+
+
+
+
+
+
+
+
+
+
+
+
+ 

+ 48 - 0
dotnet/Doc/PublishFile/SersDocker/docker制作镜像Sers/制作镜像sers-cgateway-1.2.0.txt

@@ -0,0 +1,48 @@
+#构建多架构镜像
+
+#docker login -u serset -p xxxxxxxxx
+
+#---------------------------------------------------------------------
+#(x.1)初始化构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.2)构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub 
+
+#把本文件所在目录下的cgateway文件夹拷贝到 image 
+cd /root/image 
+
+#构建镜像并推送到 Docker Hub
+cd sers-cgateway-1.2.0
+docker buildx build . -t serset/sers-cgateway:1.2.0 -t serset/sers-cgateway --platform=linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --push
+cd .. 
+
+ 
+#强制删除镜像名称中包含sers的镜像
+# docker rmi --force $(docker images | grep sers | awk '{print $3}')
+
+
+

+ 65 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-cgateway/appsettings.json

@@ -0,0 +1,65 @@
+{
+  "Sers": {
+
+  	"//Mq":" 消息队列配置",
+    "Mq": {
+      "Socket": {
+        "//host":" ServiceCenter 服务端 host地址",
+        "host": "127.0.0.1",
+        "//port":" ServiceCenter 服务端 监听端口号 ",
+        "port": 4580, 
+            
+
+        "//(x.1)workThread":" 后台处理消息的线程个数(单位个,默认16) ",
+        "workThreadCount": 16,
+
+        "//(x.2)ping":" ",
+        
+        "//pingTimeout":" 心跳测试超时时间(单位ms,默认2000)",        
+        "pingTimeout": 30000,
+        
+        "//pingRetryCount":" 心跳测试失败重试次数(单位次,默认3)",         
+        "pingRetryCount": 10,
+        
+        "//pingInterval":" 心跳测试时间间隔(单位ms,默认1000)",       
+        "pingInterval": 10000,
+
+       
+        "//(x.3)request":" ",  
+        "//requestTimeout":" 请求超时时间(单位ms,默认300000)",      
+        "requestTimeout": 60000,
+        
+ 
+        "//(x.4)secretKey":" 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 ",
+        "secretKey": "SersCL"
+      }
+    },
+ 
+ 
+    "Gateway": {
+	"//Console_PrintLog":"  print the log to console. default:false ",
+	"Console_PrintLog":"false",
+
+	"Rpc":{ 	"CallerSource":"OutSide"},
+	"WebHost":{ 	
+		"http_port":"6008", "workThreadCount":16,
+		
+		"//ResponseDefaultContentType":" Response Default  Content-Type ",
+		"ResponseDefaultContentType": "application/json; charset=UTF-8",	
+
+		"//ResponseExtHeaders":" Response Ext Headers.(enable CORS)",
+		"ResponseExtHeaders": "\nAccess-Control-Allow-Headers: Authorization,authorization,Content-Type\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Origin: *"	
+	},
+
+	"StationRegist_RegistArg":
+	{	"serviceStationInfo":		{"serviceStationKey":"CGateway001","stationVersion":"1.2.0","serviceStationName":"CGateway"}
+		,"deviceInfo":	{"deviceKey":"CGateway001","OSPlatform":"Linux","OSArchitecture":"X64","OSDescription":"Ubuntu","MachineName":"Linux"}
+		,"apiNodes":[]	
+	}	
+
+	
+    }
+  }
+
+
+}

+ 58 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-cgateway/docker部署cgateway.txt

@@ -0,0 +1,58 @@
+docker部署sers-cgateway
+
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-cgateway
+docker run --name=sers-cgateway --restart=always -d \
+-p 6008:6008 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+serset/sers-cgateway:1.2.0
+cd ..
+
+
+#端口    http://ip:6008
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-cgateway
+
+#在容器内执行命令行
+docker  exec -it sers-cgateway bash
+
+#停止容器
+docker stop sers-cgateway
+
+#打开容器
+docker start sers-cgateway
+
+#重启容器
+docker restart sers-cgateway
+
+
+#删除容器
+docker rm sers-cgateway -f
+
+

+ 63 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo-robot/docker部署sers-demo-robot.txt

@@ -0,0 +1,63 @@
+docker部署sers-demo-robot
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo-robot
+docker run --name=sers-demo-robot --restart=always -d \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+-v $PWD/Data:/root/app/Data \
+serset/sers-demo-robot
+cd ..
+
+
+#精简
+docker run --name=sers-demo-robot --restart=always --net=host -d serset/sers-demo-robot
+
+ 
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo-robot
+
+#在容器内执行命令行
+docker  exec -it sers-demo-robot bash
+
+#停止容器
+docker stop sers-demo-robot
+
+#打开容器
+docker start sers-demo-robot
+
+#重启容器
+docker restart sers-demo-robot
+
+
+#删除容器
+docker rm sers-demo-robot -f
+
+

+ 58 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo-sersall/docker部署sers-demo-sersall.txt

@@ -0,0 +1,58 @@
+docker部署sers-demo-sersall
+ 
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo-sersall
+docker run --name=sers-demo-sersall --restart=always -d --net=host\
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+-v $PWD/Data:/root/app/Data \
+serset/sers-demo-sersall
+cd ..
+
+#精简
+docker run --name=sers-demo-sersall --restart=always -d --net=host serset/sers-demo-sersall
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+#---------------------------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo-sersall 
+
+#在容器内执行命令行
+docker  exec -it sers-demo-sersall  bash
+
+#停止容器
+docker stop sers-demo-sersall 
+
+#打开容器
+docker start sers-demo-sersall 
+
+#重启容器
+docker restart sers-demo-sersall 
+
+
+#删除容器
+docker rm sers-demo-sersall -f 
+
+

+ 60 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-demo/docker部署sers-demo.txt

@@ -0,0 +1,60 @@
+docker部署sers-demo
+
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-demo
+docker run --name=sers-demo --restart=always -d \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+serset/sers-demo
+cd ..
+
+#精简
+docker run --name=sers-demo --restart=always -d serset/sers-demo
+
+
+ 
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-demo
+
+#在容器内执行命令行
+docker  exec -it sers-demo bash
+
+#停止容器
+docker stop sers-demo
+
+#打开容器
+docker start sers-demo
+
+#重启容器
+docker restart sers-demo
+
+
+#删除容器
+docker rm sers-demo -f
+
+

+ 61 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-gateway/docker部署sers-gateway.txt

@@ -0,0 +1,61 @@
+docker部署sers-gateway
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-gateway
+docker run --name=sers-gateway --restart=always -d \
+-p 4582:4582 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+-v $PWD/Data:/root/app/Data \
+serset/sers-gateway
+ 
+
+#精简
+docker run --name=sers-gateway --restart=always -d -p 4582:4582 serset/sers-gateway
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+通信端口 tcp://ip:4582
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-gateway
+
+#在容器内执行命令行
+docker  exec -it sers-gateway bash
+
+#停止容器
+docker stop sers-gateway
+
+#打开容器
+docker start sers-gateway
+
+#重启容器
+docker restart sers-gateway
+
+
+#删除容器
+docker rm sers-gateway -f
+
+

+ 61 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers-gover/docker部署sers-gover.txt

@@ -0,0 +1,61 @@
+docker部署sers-gover
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers-gover
+docker run --name=sers-gover --restart=always -d \
+-p 4581:4581 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+serset/sers-gover
+cd ..
+ 
+#精简
+docker run --name=sers-gover --restart=always -d -p 4581:4581 serset/sers-gover
+
+
+#(x.3)应用已经运行
+   可在文件夹Logs 中查看日志
+
+
+通信端口 tcp://ip:4581
+
+
+-------------------
+#常用命令
+
+#查看容器logs
+docker logs sers-gover
+
+#在容器内执行命令行
+docker  exec -it sers-gover bash
+
+#停止容器
+docker stop sers-gover
+
+#打开容器
+docker start sers-gover
+
+#重启容器
+docker restart sers-gover
+
+
+#删除容器
+docker rm sers-gover  -f
+
+

+ 66 - 0
dotnet/Doc/PublishFile/SersDocker/docker部署Sers/sers/docker部署sers.txt

@@ -0,0 +1,66 @@
+docker部署sers-servicecenter
+
+ 
+
+---------------------------------
+#(x.1)文件
+  (x.1)把本文件所在目录中所有文件拷贝到宿主机
+  (x.2)修改配置文件 appsettings.json
+ 
+
+
+#(x.2)创建容器并运行
+(--name 容器名称,可自定义)
+(--restart=always 自动重启)
+(-v /etc/localtime:/etc/localtime)挂载宿主机localtime文件解决容器时间与主机时区不一致的问题
+(-v $PWD/data:/data 将主机中当前目录下的data挂载到容器的/data)
+(--net=host 网络直接使用宿主机网络)(-p 6022:6022 端口映射)
+
+cd /root/docker
+
+cd sers
+docker run --name=sers --restart=always -d \
+-p 4580:4580 -p 4501:4501 \
+-v /etc/localtime:/etc/localtime \
+-v $PWD/appsettings.json:/root/app/appsettings.json \
+-v $PWD/Logs:/root/app/Logs \
+-v $PWD/Data:/root/app/Data \
+serset/sers
+cd ..
+
+
+#精简
+docker run --name=sers --restart=always -d -p 4580:4580 -p 4501:4501 serset/sers
+
+gover     http://ip:4580
+通信端口 tcp://ip:4501
+
+
+
+#(x.3)应用已经运行
+   可在文件夹ServiceCenter/Logs 中查看日志
+
+ 
+#---------------------------------------
+#常用命令
+
+#查看容器logs
+docker logs sers
+
+#在容器内执行命令行
+docker  exec -it sers bash
+
+#停止容器
+docker stop sers
+
+#打开容器
+docker start sers
+
+#重启容器
+docker restart sers
+
+
+#删除容器
+docker rm sers -f
+
+

+ 7 - 7
dotnet/Doc/PublishFile/SersPublish/01 ServiceCenter.bat

@@ -1,8 +1,8 @@
-
-:begin
-dotnet ServiceCenter/App.ServiceCenter.dll
-
- TIMEOUT /T 1
-@echo restart
-goto begin
+
+:begin
+dotnet ServiceCenter/App.ServiceCenter.dll
+
+ TIMEOUT /T 1
+@echo restart
+goto begin
  

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff