From 6629b784c7b7040ab15493e4949648d4ecc7946b Mon Sep 17 00:00:00 2001 From: songtao98 Date: Thu, 23 Feb 2023 16:29:00 +0800 Subject: [PATCH] add readme English and Chinese version (#3) Signed-off-by: songtao98 --- CODE_OF_CONDUCT.md | 3 + CONTRIBUTING.md | 169 +++++++++++++++++++++++++++++++++++ README-zh_CN.md | 34 +++++++ README.md | 43 ++++++++- docs/images/koordetector.svg | 4 + 5 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 README-zh_CN.md create mode 100644 docs/images/koordetector.svg diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..06f525e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +# Code of Conduct + +Koordinator follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b24bd75 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,169 @@ +# Contributing to Koordinator + +Welcome to Koordinator! Koordinator consists several repositories under the organization. We encourage you to help out +by reporting issues, improving documentation, fixing bugs, or adding new features. + +Please also take a look at our code of conduct, which details how contributors are expected to conduct themselves as +part of the Koordinator community. + +We made Koordinator open-source to empower developers to fix and extend the product to better meet their needs. Nothing +thrills us more than people so passionate about the product that they're willing to spend their own time to learn the +codebase and give back to the community. We created this doc, so we can support contributors in a way that doesn't +sacrifice precious bandwidth that we use to serve our users and otherwise meet our community goals. + +## Reporting issues + +To be honest, we regard every user of Koordinator as a very kind contributor. After experiencing Koordinator, you may +have some feedback for the project. Then feel free to open an issue. + +There are lots of cases when you could open an issue: + +- bug report +- feature request +- performance issues +- feature proposal +- feature design +- help wanted +- doc incomplete +- test improvement +- any questions on project +- and so on + +Also we must remind that when filing a new issue, please remember to remove the sensitive data from your post. Sensitive +data could be password, secret key, network locations, private business data and so on. + +## Code and doc contribution + +Every action to make Koordinator better is encouraged. On GitHub, every improvement for Koordinator could be via a PR ( +short for pull request). + +- If you find a typo, try to fix it! +- If you find a bug, try to fix it! +- If you find some redundant codes, try to remove them! +- If you find some test cases missing, try to add them! +- If you could enhance a feature, please DO NOT hesitate! +- If you find code implicit, try to add comments to make it clear! +- If you find code ugly, try to refactor that! +- If you can help to improve documents, it could not be better! +- If you find document incorrect, just do it and fix that! +- ... + +### Workspace Preparation + +To put forward a PR, we assume you have registered a GitHub ID. Then you could finish the preparation in the following +steps: + +1. **Fork** Fork the repository you wish to work on. You just need to click the button Fork in right-left of project + repository main page. Then you will end up with your repository in your GitHub username. +2. **Clone** your own repository to develop locally. Use `git clone https://github.com//.git` to + clone repository to your local machine. Then you can create new branches to finish the change you wish to make. +3. **Set remote** upstream to be `https://github.com/koordinator-sh/.git` using the following two commands: + +```bash +git remote add upstream https://github.com/koordinator-sh/.git +git remote set-url --push upstream no-pushing +``` + +Adding this, we can easily synchronize local branches with upstream branches. + +4. **Create a branch** to add a new feature or fix issues + +Update local working directory: + +```bash +cd +git fetch upstream +git checkout main +git rebase upstream/main +``` + +Create a new branch: + +```bash +git checkout -b +``` + +Make any change on the new-branch then build and test your codes. + +### PR Description + +PR is the only way to make change to Koordinator project files. To help reviewers better get your purpose, PR +description could not be too detailed. We encourage contributors to follow +the [PR template](./.github/pull_request_template.md) to finish the pull request. + +### Developing Environment + +As a contributor, if you want to make any contribution to Koordinator project, we should reach an agreement on the +version of tools used in the development environment. Here are some dependents with specific version: + +- Golang : v1.17+ +- Kubernetes: v1.20+ + +### Developing guide + +There's a `Makefile` in the root folder which describes the options to build and install. Here are some common ones: + +```bash +# Generate code (e.g., apis, clientset, informers) and manifests (e.g., CRD, RBAC YAML files) +make generate manifests + +# Build the koord-manager and koordlet binary +make build + +# Run the unit tests +make test +``` + +### Proposals + +If you are going to contribute a feature with new API or needs significant effort, please submit a proposal +in [./docs/proposals/](./docs/proposals) first. + +## Engage to help anything + +We choose GitHub as the primary place for Koordinator to collaborate. So the latest updates of Koordinator are always +here. Although contributions via PR is an explicit way to help, we still call for any other ways. + +- reply to other's issues if you could; +- help solve other user's problems; +- help review other's PR design; +- help review other's codes in PR; +- discuss about Koordinator to make things clearer; +- advocate Koordinator technology beyond GitHub; +- write blogs on Koordinator and so on. + +In a word, **ANY HELP IS CONTRIBUTION**. + +## Joining the community + +Follow these instructions if you want to: + +- Become a member of the Koordinator GitHub org (see below) +- Become part of the Koordinator build cop or release teams +- Be recognized as an individual or organization contributing to Koordinator + +### Joining the Koordinator GitHub Org + +Before asking to join the community, we ask that you first make a small number of contributions to demonstrate your +intent to continue contributing to Koordinator. + +- **Note**: Anyone can contribute to Koordinator, adding yourself as a member in the organization is not a mandatory + step. + +There are a number of ways to contribute to Koordinator: + +- Submit PRs +- File issues reporting bugs or providing feedback +- Answer questions on Slack or GitHub issues + +- **Note**: This only counts GitHub related ways of contributing + +When you are ready to join + +- [Open an issue](https://github.com/koordinator-sh/koordinator/issues/new?assignees=&labels=area%2Fgithub-membership&template=membership.yml&title=REQUEST%3A+New+membership+for+) + against the **koordinator-sh/koordinator** repo +- Make sure that the list of contributions included is representative of your work on the project. +- Mention 2 existing reviewers who are sponsoring your membership. +- After the request is approved, an admin will send you an invitation. + - This is a manual process that's generally run a couple of times a week. + - If a week passes without receiving an invitation reach out on DingTalk or Slack. diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000..78da041 --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,34 @@ +

+

Koordetector

+

+ +[English](./README.md) | 简体中文 + +## 介绍 + +Koordetector是Koodinator干扰检测功能的辅助性项目。它的目标是以插件化的形式扩展Koordinator收集性能指标的能力,并承担部分性能指标分析的职责,它能够向Koordinator反馈某些pod是否受到干扰的结论,同时也起到一种类似SIG的作用:探索高级指标的收集技术与实现方案,如eBPF技术。 + +Koordetector通过将性能指标分为两种类型来完善干扰检测功能。一种是适合在单机上随时采集随时分析的指标,比如PSI,是一个有通用的异常阈值的百分比类型的数值。另一种是需要根据工作负载本身进行分析的指标,比如CPI,不同的应用有不同的取值范围。Koordetector通过名为`Interference Manager`的组件处理第二种类型的指标,该组件在控制平面中运行,按工作负载收集和汇总指标,并使用各种策略对它们进行综合分析。这两种类型的指标的分析结论都会反馈给Koordinator以供进一步使用。 + +Koordetector 通过提供以下功能来实现上述目标: + +- 精心设计的插件式框架,用于管理来自 Koordinator、Koordetector 和第三方的指标收集工具。 +- 完整高效的数据聚合链路,借助直方图算法、滑动窗口、TSDB、Prometheus 或自定义指标服务器等,保证优秀的干扰检测准确度和可接受的开销。 +- 智能化的干扰检测算法和策略,包括简单经验阈值法、机器学习方法、深度学习方法等。 +- 一组指标采集工具和与之匹配的解决方案文档及演示demo,例如,通过eBPF实现的 CPU 调度延迟收集器以及其在不同内核版本上的兼容性解决方案。 + +![koordetector](docs/images/koordetector.svg) + +## 行为守则 + +Koordetector是Koordinator的一部分,并遵照与之相同的[行为守则](CODE_OF_CONDUCT.md)。我们鼓励每个人在参与之前先读一下它。 + +为了营造一个开放和热情的环境,我们作为贡献者和维护者承诺:无论年龄、体型、残疾、种族、经验水平、教育程度、社会经济地位、国籍、个人外貌、种族、宗教或性认同和性取向如何,参与我们的项目和社区的每个人都不会受到骚扰。 + +## 贡献 + +我们非常欢迎每一位社区同学共同参与 Koordetector的建设,你可以从 [CONTRIBUTING.md](CONTRIBUTING.md) 手册开始。 + +## License + +Koordetector is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text. \ No newline at end of file diff --git a/README.md b/README.md index be6f18b..bcd1467 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ -# koordetector \ No newline at end of file +

+

Koordetector

+

+ +English | [简体中文](./README-zh_CN.md) + +## Introduction + +Koordetector is a supportive project for Interference Detection feature of Koodinator. It aims to expand Koordinator's ability to collect performance metrics in the form of plug-ins, take part of responsibilities for performance metrics analysis, feeding back conclusions about whether some pods are interfered, and also play a sort of SIG-like role for exploring advanced metrics collection methods such as eBPF. + +Koordetector enhances the interference detection feature by dividing performance metrics into two types. One is metrics suitable for stand-alone collection and analysis on single node such as PSI, which is a percentage with a common abnormal threshold. The other is metrics that needs to be analyzed according to the workload itself such as CPI, which different applications have different value ranges. Koordetector handles the second type of metrics by a component named `Interference Manager`, which runs in the control plane, gathers and aggregates metrics by workloads, and analyzes them altogether using various strategies. Notice that the analysis conclusion of both types of metrics are feedback to Koordinator for further usage. + +Koordetector implements the above features by providing the following: + +- Well-designed plug-in framework to manage metrics collecton tools from Koordinator, Koordetector and third-party. +- Complete and efficient data aggregation link to achieve both high analysis precision and acceptable overhead, with the help of histogram algorithms, sliding window, TSDB, Prometheus or custom metrics server, etc. +- Intelligent interference detection algorithms and strategies, including simple empirical threshold method, ML, DL and so on. +- A set of metrics collection tools and matching solution demos with documents, e.g., CPU schedule latency collector by eBPF with compatibility solution on different kernel versions. + +![koordetector](docs/images/koordetector.svg) + +## Code of conduct + +The Koordetector is part of Koordinator community and is guided by our [Code of Conduct](CODE_OF_CONDUCT.md), which we encourage everybody to read +before participating. + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making +participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, +disability, ethnicity, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Contributing + +You are warmly welcome to hack on Koordetector. We have prepared a detailed guide [CONTRIBUTING.md](CONTRIBUTING.md). + +## License + +Koordetector is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text. + + + + diff --git a/docs/images/koordetector.svg b/docs/images/koordetector.svg new file mode 100644 index 0000000..ee20334 --- /dev/null +++ b/docs/images/koordetector.svg @@ -0,0 +1,4 @@ + + + +
1st type metric's spec
1st type metric's spec
InterferenceManager
InterferenceManager
CollectorManager
CollectorManager
Prometheus
Prometheus
MetricServer
MetricServer
Analyzer
Analyzer
2nd type metrics
2nd type metrics
TSDB
TSDB
eBPF collector
eBPF collector
other collector
other collector
third-party collector
third-party co...
Control Plane
Control Plane
Node
Node
conclusion feedback to Koordinator
conclusion feedback to Koordinator
Koordetector
Architecture
Koordetector...
Koordinator
Koordinator
Text is not SVG - cannot display
\ No newline at end of file