Skip to content

Commit

Permalink
Merge pull request #50 from TangLeDaily/modify_module
Browse files Browse the repository at this point in the history
markdown修改及模块优化
  • Loading branch information
luanwenfei-venus authored Dec 29, 2023
2 parents 8507c30 + 6baabb9 commit 0b7f2da
Show file tree
Hide file tree
Showing 66 changed files with 67 additions and 2,933 deletions.
74 changes: 64 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,64 @@
# Sermant-examples

| 示例名称 | 插件文档 | 示例项目 |
| :---: | :---: | :---: |
|去源码插件开发模板|[去源码插件开发说明](https://github.com/huaweicloud/Sermant/blob/develop/docs/dev-guide/Sermant去源码插件开发说明.md)|[sermant-template](./sermant-template)|
|注册插件使用示例|[注册插件使用说明](https://github.com/huaweicloud/Sermant/blob/develop/docs/user-guide/registry/document.md)|[registry-demo](./registry-demo)|
|路由插件使用示例|[灰度插件说明](https://github.com/huaweicloud/Sermant/blob/develop/docs/user-guide/router/document.md)|[router-demo](./router-demo)|
|治理插件使用示例|[治理插件说明](https://github.com/huaweicloud/Sermant/tree/develop/docs/user-guide/flowcontrol/flowcontrol.md)|[flowcontrol-demo](./flowcontrol-demo)|
|优雅上下线使用示例|[优雅上下线使用说明](https://github.com/huaweicloud/Sermant/tree/develop/docs/user-guide/graceful/document.md)|[grace-demo](./grace-demo)|
|SpringBoot注册插件使用示例|[SpringBoot注册插件说明](https://github.com/huaweicloud/Sermant/tree/develop/docs/user-guide/springboot-registry/document.md)|[springboot-registry-demo](./registry-demo/springboot-registry-demo)|
# 工程介绍

| 示例名称 | 插件文档 | 示例项目 |
|:------------------:|:------------------------------------------------------------------------------------:|:------------------------------------------------:|
| 去源码插件开发模板 | [去源码插件开发说明](https://sermant.io/zh/document/developer-guide/) | [sermant-template](./sermant-template) |
| 动态配置插件使用示例 | [动态配置插件使用说明](https://sermant.io/zh/document/plugin/dynamic-config.html) | [flowcontrol-demo](./flowcontrol-demo) |
| 流控插件使用示例 | [流控插件使用说明](https://sermant.io/zh/document/plugin/flowcontrol.html) | [flowcontrol-demo](./flowcontrol-demo) |
| 无损上下线插件使用示例 | [无损上下线插件使用说明](https://sermant.io/zh/document/plugin/graceful.html) | [grace-demo](./grace-demo) |
| 负载均衡插件使用示例 | [负载均衡插件使用说明](https://sermant.io/zh/document/plugin/loadbalancer.html) | [loadbalancer-demo](./loadbalancer-demo) |
| 监控插件使用示例 | [监控插件使用说明](https://sermant.io/zh/document/plugin/monitor.html) | [monitor-demo](./monitor-demo) |
| 标签路由插件使用示例 | [标签路由插件使用说明](https://sermant.io/zh/document/plugin/router.html) | [router-demo](./router-demo) |
| 流量标签透传插件使用示例 | [流量标签透传插件使用说明](https://sermant.io/zh/document/plugin/tag-transmission.html) | [tag-transmission-demo](./tag-transmission-demo) |
| 注册迁移插件使用示例 | [注册迁移插件使用说明](https://sermant.io/zh/document/plugin/register-migration.html) | [registry-demo](./registry-demo) |
| SpringBoot注册插件使用示例 | [SpringBoot注册插件使用说明](https://sermant.io/zh/document/plugin/springboot-registry.html) | [registry-demo](./registry-demo) |
| 服务可见性插件使用示例 | [服务可见性插件使用说明](https://sermant.io/zh/document/plugin/visibility.html) | [visibility-demo](./visibility-demo) |
| 离群实例摘除插件使用示例 | [离群实例摘除插件使用说明](https://sermant.io/zh/document/plugin/removal.html) | [removal-demo](./removal-demo) |

# RELEASE打包流程

### 步骤一:增加新demo至打包脚本

> **若无新增demo,忽略此步**
在scripts/copy_jar.sh脚本中添加新demo相关命令

```shell
# 创建文件夹
mkdir -p package/xxxxx-demo
# 复制jar包
find . -type f -name "xxxxx-A.jar" -exec cp -v {} package/xxxxx-demo/ \;
find . -type f -name "xxxxx-B.jar" -exec cp -v {} package/xxxxx-demo/ \;
# 打包
tar -czvf package/result/sermant-examples-xxxxx-demo-$*.tar.gz -C package/xxxxx-demo/ .
```

### 步骤二:增加新demo至流水线文件

> **若无新增demo,忽略此步**
在.github/workflows/create_release.yml流水线文件中添加新demo相关命令

```shell
# 上传release包 ========================
- name: Upload Release xxxxx-demo # 上传xxxxx-demo release包
id: upload-release-asset-xxxxx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/package/result/sermant-examples-xxxxx-demo-${{ env.version }}.tar.gz
asset_name: sermant-examples-xxxxx-demo-${{ env.version }}.tar.gz
asset_content_type: application/tar
```

最后提交并合入上述修改

### 步骤三:创建新tag并推送

```shell
git tag vx.x.x
```

> 此步骤需拥有仓库直推权限
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>pom</packaging>

<groupId>com.huaweicloud.sermant</groupId>
<artifactId>demo-register</artifactId>
<artifactId>loadbalancer-demo</artifactId>
<version>1.0.0</version>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-register</artifactId>
<artifactId>loadbalancer-demo</artifactId>
<groupId>com.huaweicloud.sermant</groupId>
<version>1.0.0</version>
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-register</artifactId>
<artifactId>loadbalancer-demo</artifactId>
<groupId>com.huaweicloud.sermant</groupId>
<version>1.0.0</version>
</parent>
Expand Down
3 changes: 0 additions & 3 deletions sermant-template/config/bootstrap.properties

This file was deleted.

37 changes: 0 additions & 37 deletions sermant-template/config/config.properties

This file was deleted.

63 changes: 0 additions & 63 deletions sermant-template/config/logback.xml

This file was deleted.

2 changes: 0 additions & 2 deletions sermant-template/config/plugins.yaml

This file was deleted.

68 changes: 0 additions & 68 deletions sermant-template/demo-application/pom.xml

This file was deleted.

Loading

0 comments on commit 0b7f2da

Please sign in to comment.