Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 update enhance deploy doc #563

Merged
merged 6 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/util/codeyaml/addfilterpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def modify_filters(task_params, path_filters):
if filter_type == 1: # 扫描测试代码和业务代码
LogPrinter.info("Codelint only scans main and test code.")
elif filter_type is None or filter_type == 2: # 只扫描业务代码
LogPrinter.info("Codelint only cans main code.")
LogPrinter.info("Codelint only scans main code.")
path_filters["exclusion"].extend(test_source)
path_filters["yaml_filters"]["lint_exclusion"].extend(test_source)
elif filter_type == 3: # 只扫描测试代码
Expand Down
6 changes: 3 additions & 3 deletions doc/en/quickStarted/enhanceDeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TCA 增强分析模块,需要用户额外部署 License 鉴权微服务,并
- 一台 CLS 微服务专属机器,CLS 微服务需要跟该机器绑定

### 步骤
1. 在 CLS 目录下执行以下命令,获取 Server ID 和 Client License
1. 在 [CLS](https://github.com/Tencent/CodeAnalysis/tree/main/server/cls) 目录下执行以下命令,获取 Server ID 和 Client License
```shell
$ ./cls server
2022-04-13 18:35:29.356510559 +0800 CST [INFO] Version: 20220328.1
Expand All @@ -33,7 +33,7 @@ xxx
- Server ID: 机器码,用于跟TCA团队申请License授权
- Client License: 提供给TCA Client, 方便TCA Client进行工具鉴权(重要,建议备份留底)

2. 在 TCA Client 的 config.ini 中配置 CLS 微服务,比如
2. 在 TCA Client 的 [config.ini](https://github.com/Tencent/CodeAnalysis/blob/main/client/config.ini) 中配置 CLS 微服务,比如
```ini
[LICENSE_CONFIG]
; [可选]使用独立工具时,需要填写,默认不需要
Expand Down Expand Up @@ -67,7 +67,7 @@ TCA独立工具License申请邮件
| 首次登记的机器码 | xxx |
| 体验申请用途 | xxx |

4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](config.yaml)文件中填写License
4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](https://github.com/Tencent/CodeAnalysis/blob/main/server/cls/config.yaml)文件中填写License
注意!请遵从yaml格式,比如:
- 键值对中,冒号 `:` 后面一定要跟一个空白字符,示例 `key: value`.

Expand Down
6 changes: 3 additions & 3 deletions doc/zh/quickStarted/enhanceDeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TCA 增强分析模块,需要用户额外部署 License 鉴权微服务,并
- 一台 CLS 微服务专属机器,CLS 微服务需要跟该机器绑定

### 步骤
1. 在 CLS 目录下执行以下命令,获取 Server ID 和 Client License
1. 在 [CLS](https://github.com/Tencent/CodeAnalysis/tree/main/server/cls) 目录下执行以下命令,获取 Server ID 和 Client License
```shell
$ ./cls server
2022-04-13 18:35:29.356510559 +0800 CST [INFO] Version: 20220328.1
Expand All @@ -33,7 +33,7 @@ xxx
- Server ID: 机器码,用于跟TCA团队申请License授权
- Client License: 提供给TCA Client, 方便TCA Client进行工具鉴权(重要,建议备份留底)

2. 在 TCA Client 的 config.ini 中配置 CLS 微服务,比如
2. 在 TCA Client 的 [config.ini](https://github.com/Tencent/CodeAnalysis/blob/main/client/config.ini) 中配置 CLS 微服务,比如
```ini
[LICENSE_CONFIG]
; [可选]使用独立工具时,需要填写,默认不需要
Expand Down Expand Up @@ -67,7 +67,7 @@ TCA独立工具License申请邮件
| 首次登记的机器码 | xxx |
| 体验申请用途 | xxx |

4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](config.yaml)文件中填写License
4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](https://github.com/Tencent/CodeAnalysis/blob/main/server/cls/config.yaml)文件中填写License
注意!请遵从yaml格式,比如:
- 键值对中,冒号 `:` 后面一定要跟一个空白字符,示例 `key: value`.

Expand Down
71 changes: 1 addition & 70 deletions server/cls/README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,2 @@
# CLS使用文档
CLS(Common License Server), 是TCA独立工具的License鉴权微服务。

## 准备
1. 一台CLS微服务专属机器,CLS微服务需要跟该机器绑定

## 部署
1. 在CLS目录下执行以下命令,获取Server ID和client License
```shell
$ ./cls server
2022-04-13 18:35:29.356510559 +0800 CST [INFO] Version: 20220328.1
2022-04-13 18:35:29.44083463 +0800 CST [INFO] The client license is:
xxx
2022-04-13 18:35:29.454552966 +0800 CST [INFO] License Server ID: xxx
```
- Server ID: 机器码,用于跟TCA团队申请License授权
- client License: 提供给TCA Client, 方便TCA Client进行工具鉴权(重要,建议备份留底)

2. 在TCA Client的[config.ini](../../client/config.ini)中配置CLS微服务,比如
```ini
[LICENSE_CONFIG]
; [可选]使用独立工具时,需要填写,默认不需要
; License服务器url, base_path, license
URL=http://<IP或者域名>:<port>
BASE_PATH=
LICENSE=<client License>
```

3. 跟TCA团队邮件申请License

- 发送邮箱:
```
v_cocohwang@tencent.com
anjingliu@tencent.com
yalechen@tencent.com
tommyzhang@tencent.com
```

- 格式如下:

TCA独立工具License申请邮件

| | |
| :----: | :----: |
| 申请人名称 | xxx |
| 申请人所在组织名称 | xxx |
| 申请人所在组织类型 | 可选选项:公司/学校/个人 |
| 申请人邮箱 | xxx |
| 申请人手机号码 | xxx |
| 首次登记的机器码 | xxx |
| 体验申请用途 | xxx |

4. 收到TCA团队回复邮件之后,在CLS目录下的[config.yaml](config.yaml)文件中填写License <br>
注意!请遵从yaml格式,比如:
- 键值对中,冒号 `:` 后面一定要跟一个空白字符,示例 `key: value`.

5. 执行以下命令启动
```shell
./cls server -d
```

6. 启动TCA分析任务

## 高级
### 自动重启
```shell
# 查找CLS进程ID
ps aux|grep cls
# 重启微服务
kill -USR2 <pid>
```
CLS(Common License Server), 是TCA独立工具的License鉴权微服务,请参考[使用文档](https://tencent.github.io/CodeAnalysis/zh/quickStarted/enhanceDeploy.html#cls%E9%83%A8%E7%BD%B2)
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
用于统一存放工具(可外链仓库)

## **注意**
以下部分独立工具需要申请授权,具体操作可以参考[CLS使用文档](../server/cls/README.md).
以下部分独立工具需要申请授权,具体操作可以参考[CLS使用文档](https://tencent.github.io/CodeAnalysis/zh/quickStarted/enhanceDeploy.html).

## [TCA-Armory(测试版)](https://github.com/TCATools/TCA-Armory)
一款多功能的多语言静态代码分析工具,需申请License。
Expand Down