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

docs: add guide for local development & add label spec #719

Merged
merged 2 commits into from
Jul 13, 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
3 changes: 3 additions & 0 deletions docs/zh/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
- [Secret Store](zh/component_specs/secret/common.md)
- [自定义组件](zh/component_specs/custom/common.md)
- [如何部署、升级 Layotto](zh/operation/)
- [如何本地开发、本地调试](zh/operation/local.md)
- 设计文档
- [Actuator设计文档](zh/design/actuator/actuator-design-doc.md)
- [gRPC框架设计文档](zh/design/actuator/grpc-design-doc.md)
Expand All @@ -105,6 +106,8 @@
- [如何基于proto文件生成代码、接口文档](zh/api_reference/how_to_generate_api_doc.md)
- [Layotto 四大 Github Workflows 说明](zh/development/github-workflows.md)
- [Layotto 命令行工具指南](zh/development/commands.md)
- 如何给 issue 打 label
- [新手任务 (good first issue) 的 label 规范](zh/development/label-spec.md)
- [发布手册](zh/development/release-guide.md)
- [待解决的问题](zh/development/problems-to-solve.md)
- 社区
Expand Down
34 changes: 34 additions & 0 deletions docs/zh/development/label-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 新手任务 (good first issue) 的 label 规范
点击链接可以查看所有“待认领”的“新手任务": https://github.com/mosn/layotto/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee

给新手任务 (good first issue) 打 label 的规范:
1. 在 issue 上打 label, 凡是带有 "good first issue" label的 issue,都视为“适合新手认领的任务”;
![image](https://user-images.githubusercontent.com/26001097/173573038-07586e85-4f51-4a34-a594-53296726557b.png)

2. 如果没有 assignee ,代表“待认领”;如果有 assignee 代表”已有人认领“:
![image](https://user-images.githubusercontent.com/26001097/173572716-855917f7-daf6-49dc-b101-447d4e0c053c.png)

3. 关于任务分类:
issue 需要打 label "kind/xxx", 其中xxx代表任务的分类。

比如 "kind/ci" 代表分类是 "ci" :
![image](https://user-images.githubusercontent.com/26001097/173573518-5e990bbd-712e-4675-980f-90cbdafff090.png)
比如 "kind/demo" 代表分类是 "demo" :
![image](https://user-images.githubusercontent.com/26001097/173573829-73791d39-0099-4e87-aa90-67474a32773e.png)

4. 关于任务难度
issue 需要打一些代表难度的 label,包括 "easy","medium","hard", 如下图:
![image](https://user-images.githubusercontent.com/26001097/173574281-528374c6-258a-4499-82ab-2122bbe68be6.png)

5. 发运营活动时,“任务名”写中文还是英文?

如果 issue 的标题里有中文,任务名就用中文名;没有中文名的话就发英文名
比如:
![image](https://user-images.githubusercontent.com/26001097/173575931-d8a0bec4-5468-4db3-917a-75879f6533ff.png)

## 做活动、发任务时候的建议
1. 可以每类任务挑选1--2个任务发,比如 demo 类的挑两个, ci 类的挑 1个(感觉 ci 类的 issue,认领的人会少一些?)
2. 可以挑选更新的任务发,因为旧 issue 如果没人领,说明可能吸引力不足

## 相关链接
[proposal](https://github.com/mosn/layotto/issues/653)
17 changes: 17 additions & 0 deletions docs/zh/operation/local.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 如何本地开发、本地调试
## app 开发者如何本地开发、调试 app
一般有以下几种方案:

- 本地用 docker 启动一个 Layotto sidecar, 或者 docker-compose启动 Layotto+其他存储系统(比如 Redis)
- 公司提供远端 Layotto sidecar

比如在远端测试环境,自己拉起一个 Pod,在里面跑 Layotto sidecar。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否可以补充一下本地如何连接远端pod:

  1. 如果您能以ip直接访问远端测试环境pod:
    1. 可以把 Layotto ip 修改为上述 Pod ip,本地ip直连pod
  2. 如果不能以ip直接访问远端测试环境pod:
    1. 可以将该pod的service类型,设置为NodePort或者LoadBalancer,本地直连pod
    2. 可以将该pod注册到gateway,本地直连gateway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好呀
这个已经 merge了,你方便提个 pr 改下么~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

开发者在本地调试时,把 Layotto ip 修改为上述 Pod ip,即可实现"本地 app 进程连接到远端 Layotto sidecar"。

更进一步,可以由公司里负责研发环境的团队把上述操作自动化,提供"一键申请远端 sidecar" 功能。

- 如果公司有类似于 github codespace的云端研发环境,那可以在研发环境自带 sidecar


## Layotto 开发者如何本地、开发调试 Layotto
本地编译运行 Layotto 即可