update README.md, docs

This commit is contained in:
Haitao Pan 2023-12-29 13:56:23 +08:00
parent 851541128b
commit f645659925
3 changed files with 143 additions and 64 deletions

View File

@ -1,74 +1,22 @@
# Modern Container Application Reference Architectures
# Modern Container Application Reference Architecture
## Modern App Architectures
Welcome to the repository for the Modern Container Application Reference Architecture. This repository contains a comprehensive guide and reference architecture for building scalable, portable, resilient, and agile containerized applications.
We define modern app architectures as those driven by four characteristics: scalability, portability, resiliency, and agility. While many different aspects of a modern architecture exist, these are fundamental.
## Documentation
- Scalability Quickly and seamlessly scale up or down to accommodate spikes or reductions in demand, anywhere in the world.
- Portability Easy to deploy on multiple types of devices and infrastructures, on public clouds, and on premises.
- Resiliency Can fail over to newly spunup clusters or virtual environments in different availability regions, clouds, or data centers.
- Agility Ability to update through automated CI/CD pipelines with higher code velocity and more frequent code pushes.
For more detailed information, please refer to the documentation available in two languages:
![PlantUML Diagram](https://www.plantuml.com/plantuml/png/XPL1JnD15CVlxrECN3nnwis3WPIcD9A6A7UpRL_BfhkpP6QsQ8o9qKXY0ke1HNlGH2NqOglnO3WGlWopYz_26RAbmylkq5Ft_N_px__jpBokI1K8bSOHtEbXF-J87ZRgMwljvaQ3TQD0Ie15eHcgzRHJRpcbpJHAun0eunJM0z59X5FOI8RkWZN4dNwKxBgc8ebHRMCgdU9gX4B50Gy6wBhLex0xt4vIYMu84VGDwLJQWv0_SN-r_SZrtcmr0uMxmLE0kqp_6ETlP_hRApqTNvo-WNuIzL2mfJKSOPJinCWLQ_1HA19klo-nPy3CnsrfzFX1sa71KQ4i4OSr2S-lVRTGgf0F_9uM8gP49Qxc9VRIhWeJxZUs734cQc4Cy-rdoyltYtrczzZ5sNb-E2b4AnLdmaZ_NX_aPrCeder4tWnLXZMtH5kc4iLf8rIoEDmCOCNYW9guUdggFq-oFnEzjmz57Wz1ujr6-ir8-5j8lrbfbrSNm80jFX0efTiVrKXd7gR2W7JZOIeCIZkmSyCWsT6nFZzoybE5fYydoXVJv5L4-MAmZxO-7q16qkzcboTxUlyZp0TT9R0OUvM8EmIl86UDkMylnldNOrYCHEAJVVYL7Kprpq_wvGJ0Z42hEyFF89SdtxClxs5HAxcs5lixomz_bs73MhLETyR7UOteBdcv6qOho7lstmx-0m00)
- [中文文档 (Chinese Documentation)](docs/README_CN.md)
- [English Documentation](docs/README_EN.md)
## Getting Started
## Modern Container Application Reference Architectures
Follow the links above to the documentation in your preferred language to get started with using this reference architecture.
This repository provides a reference architecture for modern container applications. It focuses on the following key principles:
## Contributing
* Platform Agnosticism: The architecture is designed to be platform-agnostic, allowing you to deploy your application on different container orchestration platforms such as Kubernetes (k8s) or lightweight alternatives like k3s.
* Prioritization of OSS: Open-source software (OSS) is prioritized, ensuring that the architecture is built on robust and widely adopted tools and technologies.
* Everything Defined by Code: Infrastructure as Code (IaC) is used to define and provision all the necessary resources for your application. This ensures consistency, reproducibility, and scalability.
* CI/CD Automation: Continuous Integration and Continuous Deployment (CI/CD) pipelines are implemented using GitHub CI, enabling automated build, test, and deployment processes.
* Security-minded Development: Security is a top priority in the architecture, with best practices implemented at every stage, including containerized builds, secure container registries like Harbor, and secure communication between services.
* Distributed Storage: The architecture incorporates distributed storage solutions to ensure high availability and scalability for your application's data.
We welcome contributions to this project. If you have suggestions, improvements, or find any issues, feel free to submit a pull request.
## Tools Chain
## License
The following tools are used in this reference architecture:
- Pipeline: GitHub CI
- IaC Tool: Pulumi
- Code Repository: GitHub
- Container Registry: Harbor
- Monitoring:
- Logs: Loki
- Tracing: Deepflow
- Metrics: Prometheus
- Notification: Alertmanager
- Datastore: Clickhouse
- Visualization: Grafana
- Cluster Management:
- Kubernetes (k8s)
- Lightweight Kubernetes (k3s)
- Ingress: Nginx
- DNS
# Getting Started
To get started with this reference architecture, follow these steps:
1. Clone this repository to your local machine.
2. Set up the required tools mentioned above, ensuring they are properly configured.
3. Modify the code and configuration files as per your application's requirements.
4. Use Pulumi to provision the necessary infrastructure resources defined in the IaC files.
5. Configure the CI/CD pipeline in GitHub CI to trigger builds and deployments automatically.
6. Monitor your application using the provided monitoring stack.
7. Deploy your application to the target cluster using k8s or k3s.
8. Set up Nginx Ingress and DNS for routing traffic to your application.
For more detailed instructions and examples, please refer to the documentation provided in this repository.
# Contributing
We welcome contributions from the community to enhance this reference architecture. If you have any suggestions, improvements, or bug fixes, please feel free to submit a pull request.
# License
This reference architecture is released under the GPL V3 License.
https://github.com/fluxcd/flux2-monitoring-example
# Doc
- 多集群运维(一):自动化交付,构建,部署,发布,监控: https://cloud.tencent.com/developer/article/2373761
This project is released under the GPL V3 license. For more details, see the LICENSE file.

71
docs/README_CN.md Normal file
View File

@ -0,0 +1,71 @@
# 现代容器应用参考架构
我们将现代应用架构定义为具有四个特性的架构:可扩展性、可移植性、弹性和敏捷性。尽管现代架构存在许多不同的方面,但这些是基础。
- 可扩展性 - 能够快速无缝地向上或向下扩展,以应对全球范围内需求的增减。
- 可移植性 - 易于在多种类型的设备和基础设施上部署,无论是在公共云还是本地环境中。
- 弹性 - 能够在不同可用区域、云或数据中心的新启动的集群或虚拟环境中进行故障转移。
- 敏捷性 - 通过自动化的CI/CD管道实现更新具有更高的代码速度和更频繁的代码推送。
# 现代容器应用参考架构
![PlantUML Diagram](https://www.plantuml.com/plantuml/png/XPL1JnD15CVlxrECN3nnwis3WPIcD9A6A7UpRL_BfhkpP6QsQ8o9qKXY0ke1HNlGH2NqOglnO3WGlWopYz_26RAbmylkq5Ft_N_px__jpBokI1K8bSOHtEbXF-J87ZRgMwljvaQ3TQD0Ie15eHcgzRHJRpcbpJHAun0eunJM0z59X5FOI8RkWZN4dNwKxBgc8ebHRMCgdU9gX4B50Gy6wBhLex0xt4vIYMu84VGDwLJQWv0_SN-r_SZrtcmr0uMxmLE0kqp_6ETlP_hRApqTNvo-WNuIzL2mfJKSOPJinCWLQ_1HA19klo-nPy3CnsrfzFX1sa71KQ4i4OSr2S-lVRTGgf0F_9uM8gP49Qxc9VRIhWeJxZUs734cQc4Cy-rdoyltYtrczzZ5sNb-E2b4AnLdmaZ_NX_aPrCeder4tWnLXZMtH5kc4iLf8rIoEDmCOCNYW9guUdggFq-oFnEzjmz57Wz1ujr6-ir8-5j8lrbfbrSNm80jFX0efTiVrKXd7gR2W7JZOIeCIZkmSyCWsT6nFZzoybE5fYydoXVJv5L4-MAmZxO-7q16qkzcboTxUlyZp0TT9R0OUvM8EmIl86UDkMylnldNOrYCHEAJVVYL7Kprpq_wvGJ0Z42hEyFF89SdtxClxs5HAxcs5lixomz_bs73MhLETyR7UOteBdcv6qOho7lstmx-0m00)
本仓库提供了现代容器应用的参考架构。它侧重于以下关键原则:
- 平台无关性架构旨在做到平台无关性让您可以在不同的容器编排平台上部署应用例如Kubernetesk8s或轻量级替代品如k3s。
开源软件优先优先考虑开源软件OSS确保架构基于强大且广泛采用的工具和技术构建。
- 一切以代码定义使用基础设施即代码IaC定义和配置应用所需的所有资源确保一致性、可复制性和可扩展性。
- CI/CD自动化使用GitHub CI实现持续集成和持续部署CI/CD管道实现自动化构建、测试和部署过程。
- 安全意识开发在架构的每个阶段实施安全最佳实践包括容器化构建、安全容器仓库如Harbor以及服务间的安全通信。
- 分布式存储:架构包含分布式存储解决方案,以确保应用数据的高可用性和可扩展性。
# 工具链
以下工具在此参考架构中使用:
- 管道GitHub CI
- IaC工具Pulumi/terraform
- 代码仓库GitHub
- 容器仓库Harbor
- 监控:
- 日志Loki
- 跟踪Deepflow
- 指标Prometheus
- 通知Alertmanager
- 数据存储Clickhouse
- 可视化Grafana
- 集群管理Kubernetesk8s 轻量级Kubernetesk3s
- 入口Nginx
- DNS: DNS服务SaaS
# 入门
要开始使用此参考架构,请按照以下步骤操作:
# 文档
1. 多集群运维(一)自动化交付、构建、部署、发布、监控。https://cloud.tencent.com/developer/article/2373761
2. 多集群运维(二)应用渐进发布。https://cloud.tencent.com/developer/article/2375570
# 问题
- APISIX和External DNS集成APISIX和External DNS合作存在问题导致无法自动更新DNS解析记录。
- FluxCD、Flagger和APISIX入口的指标收集使用FluxCD、Flagger和APISIX入口时指标收集的兼容性和效率尚待验证。
- 金丝雀发布监控:金丝雀发布的监控状态仍待验证。
# 待办事项
- 多集群运维(三):微服务应用的渐进发布。
- 多集群运维(四):应用系统的多维监控。
- 多集群运维(五):应用系统的脆弱性测试。
- 多集群运维(六)应用系统运维与AIOps。
# 贡献
我们欢迎社区对此参考架构的贡献。如果您有任何建议、改进或错误修复,请随时提交拉取请求。
# 许可
此参考架构根据GPL V3许可发布。

60
docs/README_EN.md Normal file
View File

@ -0,0 +1,60 @@
# Modern Container Application Reference Architecture
## Introduction
Modern application architecture is characterized by four key features: scalability, portability, resilience, and agility. These fundamentals underpin many different aspects of modern architecture.
### Characteristics
- **Scalability:** Capable of scaling up or down quickly and seamlessly to adapt to changing global demands.
- **Portability:** Easily deployable across a variety of devices and infrastructure, whether in public clouds or local environments.
- **Resilience:** Able to perform failover in new clusters or virtual environments across various availability zones, clouds, or data centers.
- **Agility:** Facilitates updates through automated CI/CD pipelines, enhancing code velocity and frequency of code pushes.
## Reference Architecture
This repository offers a reference architecture for modern container applications, emphasizing the following principles:
![PlantUML Diagram](https://www.plantuml.com/plantuml/png/XPL1JnD15CVlxrECN3nnwis3WPIcD9A6A7UpRL_BfhkpP6QsQ8o9qKXY0ke1HNlGH2NqOglnO3WGlWopYz_26RAbmylkq5Ft_N_px__jpBokI1K8bSOHtEbXF-J87ZRgMwljvaQ3TQD0Ie15eHcgzRHJRpcbpJHAun0eunJM0z59X5FOI8RkWZN4dNwKxBgc8ebHRMCgdU9gX4B50Gy6wBhLex0xt4vIYMu84VGDwLJQWv0_SN-r_SZrtcmr0uMxmLE0kqp_6ETlP_hRApqTNvo-WNuIzL2mfJKSOPJinCWLQ_1HA19klo-nPy3CnsrfzFX1sa71KQ4i4OSr2S-lVRTGgf0F_9uM8gP49Qxc9VRIhWeJxZUs734cQc4Cy-rdoyltYtrczzZ5sNb-E2b4AnLdmaZ_NX_aPrCeder4tWnLXZMtH5kc4iLf8rIoEDmCOCNYW9guUdggFq-oFnEzjmz57Wz1ujr6-ir8-5j8lrbfbrSNm80jFX0efTiVrKXd7gR2W7JZOIeCIZkmSyCWsT6nFZzoybE5fYydoXVJv5L4-MAmZxO-7q16qkzcboTxUlyZp0TT9R0OUvM8EmIl86UDkMylnldNOrYCHEAJVVYL7Kprpq_wvGJ0Z42hEyFF89SdtxClxs5HAxcs5lixomz_bs73MhLETyR7UOteBdcv6qOho7lstmx-0m00)
- **Platform Agnosticism:** Designed to be independent of platforms, allowing deployment on various container orchestration platforms like Kubernetes (k8s) or k3s.
- **Open Source Software Priority:** Prioritizes open-source software (OSS) for robust, widely-adopted tools and technology.
- **Everything As Code:** Utilizes Infrastructure as Code (IaC) for defining and configuring all necessary application resources.
- **CI/CD Automation:** Implements continuous integration and deployment pipelines using GitHub CI.
- **Security-Conscious Development:** Adopts security best practices at every stage, including containerized builds and secure container repositories like Harbor.
- **Distributed Storage:** Includes distributed storage solutions for high availability and scalability of application data.
## Toolchain
- **Pipeline:** GitHub CI
- **IaC Tools:** Pulumi/Terraform
- **Code Repository:** GitHub
- **Container Repository:** Harbor
- **Monitoring:**
- Logs: Loki
- Tracing: Deepflow
- Metrics: Prometheus
- Notifications: Alertmanager
- **Data Storage:** Clickhouse
- **Visualization:** Grafana
- **Cluster Management:** Kubernetes (k8s), Lightweight Kubernetes (k3s)
- **Ingress:** Nginx
- **DNS:** DNS Service SaaS
## Getting Started
Follow these steps to start using this reference architecture.
## Documentation
1. [Multi-cluster Operations (I)](https://cloud.tencent.com/developer/article/2373761): Automated delivery, building, deployment, release, and monitoring.
2. [Multi-cluster Operations (II)](https://cloud.tencent.com/developer/article/2375570): Progressive application release.
## Issues
- **APISIX and External DNS Integration**
- **Metrics Collection with FluxCD, Flagger, and APISIX Ingress**
- **Monitoring of Canary Releases**
## To Do
- Multi-cluster Operations (III) to (VI) covering progressive release, multidimensional monitoring, vulnerability testing, and AIOps.
## Contributions
Contributions to this reference architecture are welcome. Feel free to submit pull requests for suggestions, improvements, or bug fixes.
## License
Released under the GPL V3 license.