From 0bf7b04f8b7ae36155dd531b72e1d3f0580dd787 Mon Sep 17 00:00:00 2001 From: seeflood Date: Wed, 13 Jul 2022 15:55:32 +0800 Subject: [PATCH 01/11] docs: add chinese docs for istio integration Signed-off-by: seeflood --- docs/zh/README.md | 12 ++++++------ docs/zh/_sidebar.md | 6 ++++-- docs/zh/operation/README.md | 19 +++++++++++++++---- docs/zh/start/README.md | 2 +- docs/zh/start/istio/1_10_6.md | 7 +++++++ docs/zh/start/istio/start.md | 6 +++--- docs/zh/start/lab.md | 23 +++++++++++++++++++++++ 7 files changed, 59 insertions(+), 16 deletions(-) create mode 100644 docs/zh/start/istio/1_10_6.md create mode 100644 docs/zh/start/lab.md diff --git a/docs/zh/README.md b/docs/zh/README.md index f6342337f3..d477d3fa2c 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -72,6 +72,12 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 | File | ✅ | [demo](https://mosn.io/layotto/#/zh/start/file/start) | [list](https://mosn.io/layotto/#/zh/component_specs/file/common) | 提供访问文件的能力 | | Binding | ✅ | TODO | TODO | 提供透传数据的能力 | +### Service Mesh + +| feature | status | quick start | desc | +| ------- | :----: | :----------------------------------------------------: | ----------------------------- | +| Istio | ✅ | [demo](https://mosn.io/layotto/#/zh/start/istio/1_10_6) | 跟 Istio 集成,作为 Istio 的数据面 | + ### 可扩展性 | feature | status | quick start | desc | @@ -116,12 +122,6 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 | Rust | 待开发 | 待开发 | 把用 Rust 开发的代码编译成 \*.wasm 文件跑在 Layotto 上,并且使用 k8s 进行调度。 | | AssemblyScript | 待开发 | 待开发 | 把用 AssemblyScript 开发的代码编译成 \*.wasm 文件跑在 Layotto 上,并且使用 k8s 进行调度。 | -### Service Mesh - -| feature | status | quick start | desc | -| ------- | :----: | :----------------------------------------------------: | ----------------------------- | -| istio | ✅ | [demo](https://mosn.io/layotto/#/zh/start/istio/start) | 跟 istio 集成,作为它的数据面 | - ## Landscapes

diff --git a/docs/zh/_sidebar.md b/docs/zh/_sidebar.md index bc38305d57..f3d9f04b0d 100644 --- a/docs/zh/_sidebar.md +++ b/docs/zh/_sidebar.md @@ -16,8 +16,9 @@ - 使用File API - [基于Minio](zh/start/file/minio.md) - [API插件:注册您自己的API](zh/start/api_plugin/helloworld.md) - - 集成 Istio - - [作为 Istio 的数据面](zh/start/istio/start.md) + - 作为 Istio 的数据面 + - [集成 Istio 1.10.6 演示](zh/start/istio/1_10_6.md) + - [集成 Istio 1.5.x 演示](zh/start/istio/start.md) - 在四层网络进行流量干预 - [Dump TCP 流量](zh/start/network_filter/tcpcopy.md) - 在七层网络进行流量干预 @@ -31,6 +32,7 @@ - [Metrics 接入 Prometheus](zh/start/trace/prometheus.md) - [将业务逻辑通过 WASM 下沉进sidecar](zh/start/wasm/start.md) - [基于 WASM 跟 Runtime 实现的 Faas 模型](zh/start/faas/start.md) +- [线上实验室](zh/start/lab.md) - [用户手册](zh/building_blocks/) - 功能介绍 - [File API](zh/building_blocks/file/file.md) diff --git a/docs/zh/operation/README.md b/docs/zh/operation/README.md index d674baac3e..bb2f6ba9ff 100644 --- a/docs/zh/operation/README.md +++ b/docs/zh/operation/README.md @@ -24,12 +24,23 @@ docker run -v "$(pwd)/configs/config.json:/runtime/configs/config.json" -d -p 3 ### 在 Kubernetes 集群中部署 #### 方案1. 通过 Istio 部署 -如果您是 Istio 用户,可以通过 Istio 部署 Sidecar。 +如果您是 Istio 用户,可以通过 Istio 部署 Layotto Sidecar。 -可以参考 [MOSN 的教程](https://mosn.io/docs/user-guide/start/istio/). 把教程中的 MOSN 镜像换成 Layotto 镜像即可。 +为了集成 Istio,您需要将 Layotto Sidecar 构建成 proxyv2 镜像。有以下几种构建方法: + +- 可以参考 [MOSN 的教程](https://mosn.io/docs/user-guide/start/istio/). 把教程中的 MOSN 镜像换成 Layotto 镜像即可。 + +- 为了让构建过程更方便些,Layotto 开发了 make 脚本。按需修改好 main 包(在 `cmd/layotto` 目录下)后,敲以下命令即可打包成 proxyv2镜像: +```shell +make image.proxyv2.build VERSION=latest +``` + +这个脚本的原理是:把 MOSN proxyv2 镜像中的二进制文件替换成 Layotto 的二进制文件。 + +- 社区构建好了[layotto/proxyv2](https://hub.docker.com/r/layotto/proxyv2) 镜像,用于[线上实验室](https://killercoda.com/mosn-tutorial/course/layotto) 演示 Istio+Layotto。这个镜像把 Layotto 所有组件都打包进去了,导致特别大。我们建议您还是按照自己的需求修改 main、自己构建镜像,这样构建出来的镜像会小很多。 #### 方案2. 其他方式 -您可以准备自己的镜像、k8s 配置文件,通过 Kubernetes 部署 Layotto. +您可以准备自己的镜像、K8s 配置文件,通过 Kubernetes 部署 Layotto. 我们正在开发官方版 Layotto 镜像以及通过 Helm 部署到 Kubernetes 的方案,欢迎加入共建,详见 https://github.com/mosn/layotto/issues/392 @@ -53,7 +64,7 @@ Layotto 和 MOSN 跑在同一个进程里,可以理解成: ## 3. 如何升级 Layotto 有两种升级方案: -- 使用 k8s 原生方案升级 sidecar 容器 +- 使用 K8s 原生方案升级 sidecar 容器 - [平滑升级,自动迁移长连接](https://mosn.io/docs/concept/smooth-upgrade/) diff --git a/docs/zh/start/README.md b/docs/zh/start/README.md index c9d8ad573c..4d8dd3681d 100644 --- a/docs/zh/start/README.md +++ b/docs/zh/start/README.md @@ -8,4 +8,4 @@ 如果您准备好了,可以点击左侧导航栏里的各种 Demo,开始我们的旅行! -注:如果您没装 Docker,可以体验 [使用Apollo配置中心](zh/start/configuration/start-apollo.md) 这个 Demo, 这个不需要 Docker \ No newline at end of file +注:如果您没装 Docker,可以体验 [使用Apollo配置中心](zh/start/configuration/start-apollo.md) 这个 Demo, 这个不需要 Docker; 或者体验 [线上实验室](zh/start/lab.md) \ No newline at end of file diff --git a/docs/zh/start/istio/1_10_6.md b/docs/zh/start/istio/1_10_6.md new file mode 100644 index 0000000000..ba1ba27991 --- /dev/null +++ b/docs/zh/start/istio/1_10_6.md @@ -0,0 +1,7 @@ +# 集成 Istio 1.10.6 演示 + +Layotto 最新版集成了 Istio 1.10.6, 可以通过 Istio(控制面) 对 Layotto(数据面)进行流量治理。 + +您可以在[线上实验室](zh/start/lab.md)体验集成 Istio 1.10.6 + +更多说明见[《通过 Istio 部署 Layotto》](zh/operation/?id=方案1-通过-istio-部署) \ No newline at end of file diff --git a/docs/zh/start/istio/start.md b/docs/zh/start/istio/start.md index 722792bc6b..a10f4ff29d 100644 --- a/docs/zh/start/istio/start.md +++ b/docs/zh/start/istio/start.md @@ -1,4 +1,4 @@ -# Layotto集成Istio演示 +# Layotto集成 Istio 1.5.x 演示 ## 一、背景介绍 @@ -19,7 +19,7 @@ MOSN作为Istio官方认可的数据面实现,这里就对Layotto如何跟Isti 3. [Istio-1.5.x](https://github.com/istio/istio/releases/tag/1.5.2) - 当前mosn只支持`istio 1.5.x`(对`istio 1.10.x`的支持已经在CR了),因此需要下载对应版本的`istio`,解压后进行如下配置方便后续操作。 + 需要下载`1.5.x`版本的`istio`,解压后进行如下配置方便后续操作。 ``` export PATH=$PATH:${你的istio目录}/bin @@ -113,7 +113,7 @@ MOSN作为Istio官方认可的数据面实现,这里就对Layotto如何跟Isti ## 五、注意事项 -1. 由于示例中使用的是`istio 1.5.2`,属于一个比较老的版本,因此该演示不会合并到主干,而是以一个独立的分支`istio-1.5.x`存在,等后面`mosn`集成了`istio 1.10.x`后再合并。 +1. 由于示例中使用的是`istio 1.5.2`,属于一个比较老的版本,因此该演示不会合并到主干,而是以一个独立的分支`istio-1.5.x`存在。目前 main 分支代码已经集成了 `istio 1.10.x`。 2. 示例中使用的client、server源码可以参考[这里](https://github.com/mosn/layotto/tree/istio-1.5.x/demo/istio) 。 3. 为了上手简单,上述使用到的`layotto-injected.yaml`文件是已经通过istio完成注入的,整个注入过程如下: 1. 执行如下命令指定`istio`使用`Layotto`作为数据面 diff --git a/docs/zh/start/lab.md b/docs/zh/start/lab.md new file mode 100644 index 0000000000..fc6a46cb9c --- /dev/null +++ b/docs/zh/start/lab.md @@ -0,0 +1,23 @@ +# 线上实验室 + +除了能本地运行的 Quickstart 外,Layotto 还提供了线上实验室环境,提供交互式的学习体验,为您省去搭建本地环境的烦恼。 + +欢迎访问 [KillerCoda 上的教程](https://killercoda.com/mosn-tutorial/course/layotto) 。 + +## 教程列表 + +当前线上实验室支持的教程如下。 + +- [Layotto 作为 Istio 的数据面,运行 Bookinfo 演示工程](https://killercoda.com/mosn-tutorial/course/layotto/layotto-with-istio) + +## 贡献教程 + +Layotto 和 MOSN 的线上实验室教程位于 [mosn/mosn-tutorial](https://github.com/mosn/mosn-tutorial) 仓库中, 欢迎提交 PR、贡献教程。 + +相关文档: + +- [KillerCoda 文档](https://killercoda.com/creators) + +- [Katacoda to Killercoda Migration Guide](https://itnext.io/katacoda-to-killercoda-migration-guide-d21961fc0c9b?sk=6e93c2194234f703454e3eb1438712c9&source=friends_link&gi=2ea9ee69b8ba) + +注: 之前教程托管在 Katacoda,因 Katacoda 关闭,社区决定将教程迁移到 KillerCoda。 \ No newline at end of file From f86c103fd18634c1e7d1d99343374ada8899fe9f Mon Sep 17 00:00:00 2001 From: seeflood Date: Wed, 13 Jul 2022 16:13:20 +0800 Subject: [PATCH 02/11] docs: add chinese docs for istio integration Signed-off-by: seeflood --- docs/zh/README.md | 13 +++++-------- docs/zh/_sidebar.md | 2 +- docs/zh/start/istio/{1_10_6.md => README.md} | 0 3 files changed, 6 insertions(+), 9 deletions(-) rename docs/zh/start/istio/{1_10_6.md => README.md} (100%) diff --git a/docs/zh/README.md b/docs/zh/README.md index d477d3fa2c..7b0646e181 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -21,10 +21,9 @@ Layotto 以开源的 [MOSN](https://github.com/mosn/mosn) 为底座,在提供 Layotto 希望可以把 [Multi-Runtime](https://www.infoq.com/articles/multi-runtime-microservice-architecture/) 跟 Service Mesh 两者的能力结合起来,无论你是使用 MOSN 还是 Envoy 或者其他产品作为 Service Mesh 的数据面,都可以在不增加新的 sidecar 的前提下,使用 Layotto 为这些数据面追加 Runtime 的能力。 -例如,通过为 MOSN 添加 Runtime 能力,一个 Layotto 进程可以[既作为 istio 的数据面](zh/start/istio/start.md) 又提供各种 Runtime API(例如 Configuration API,Pub/Sub API 等) +例如,通过为 MOSN 添加 Runtime 能力,一个 Layotto 进程可以[既作为 istio 的数据面](zh/start/istio/) 又提供各种 Runtime API(例如 Configuration API,Pub/Sub API 等) -此外,随着探索实践,我们发现 sidecar 能做的事情远不止于此。 通过引入[WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) ,我们正在尝试将 Layotto 做成 FaaS (Function as a service) -和 [reloadable sdk](https://github.com/mosn/layotto/issues/166) 的运行时容器 。 +此外,随着探索实践,我们发现 sidecar 能做的事情远不止于此。 通过引入[WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) ,我们正在尝试将 Layotto 做成 FaaS (Function as a service) 的运行时容器 。 如果您对诞生背景感兴趣,可以看下[这篇演讲](https://mosn.io/layotto/#/zh/blog/mosn-subproject-layotto-opening-a-new-chapter-in-service-grid-application-runtime/index) 。 @@ -33,7 +32,7 @@ Mesh 两者的能力结合起来,无论你是使用 MOSN 还是 Envoy 或者 - 服务通信 - 服务治理,例如流量的劫持和观测,服务限流等 -- [作为 istio 的数据面](zh/start/istio/start.md) +- [作为 istio 的数据面](zh/start/istio/) - 配置管理 - 状态管理 - 事件发布订阅 @@ -55,9 +54,7 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 ### Get started with Layotto -您可以尝试 demo [通过 Layotto 调用 apollo 配置中心](zh/start/configuration/start-apollo.md) 来体验 Layotto - -其他功能的 demo 见下. +您可以尝试以下 Quickstart demo,体验 Layotto 的功能;或者体验[线上实验室](zh/start/lab.md) ### API @@ -76,7 +73,7 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 | feature | status | quick start | desc | | ------- | :----: | :----------------------------------------------------: | ----------------------------- | -| Istio | ✅ | [demo](https://mosn.io/layotto/#/zh/start/istio/1_10_6) | 跟 Istio 集成,作为 Istio 的数据面 | +| Istio | ✅ | [demo](https://mosn.io/layotto/#/zh/start/istio/) | 跟 Istio 集成,作为 Istio 的数据面 | ### 可扩展性 diff --git a/docs/zh/_sidebar.md b/docs/zh/_sidebar.md index 8e62282f9e..e61e5a6c6c 100644 --- a/docs/zh/_sidebar.md +++ b/docs/zh/_sidebar.md @@ -17,7 +17,7 @@ - [基于Minio](zh/start/file/minio.md) - [API插件:注册您自己的API](zh/start/api_plugin/helloworld.md) - 作为 Istio 的数据面 - - [集成 Istio 1.10.6 演示](zh/start/istio/1_10_6.md) + - [集成 Istio 1.10.6 演示](zh/start/istio/) - [集成 Istio 1.5.x 演示](zh/start/istio/start.md) - 在四层网络进行流量干预 - [Dump TCP 流量](zh/start/network_filter/tcpcopy.md) diff --git a/docs/zh/start/istio/1_10_6.md b/docs/zh/start/istio/README.md similarity index 100% rename from docs/zh/start/istio/1_10_6.md rename to docs/zh/start/istio/README.md From 21139a9a1618ad5af5c76f414acba2cc7122f800 Mon Sep 17 00:00:00 2001 From: seeflood Date: Wed, 13 Jul 2022 16:17:41 +0800 Subject: [PATCH 03/11] docs: fix md linter issues Signed-off-by: seeflood --- docs/zh/operation/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/operation/README.md b/docs/zh/operation/README.md index bb2f6ba9ff..16e3750fc1 100644 --- a/docs/zh/operation/README.md +++ b/docs/zh/operation/README.md @@ -31,6 +31,7 @@ docker run -v "$(pwd)/configs/config.json:/runtime/configs/config.json" -d -p 3 - 可以参考 [MOSN 的教程](https://mosn.io/docs/user-guide/start/istio/). 把教程中的 MOSN 镜像换成 Layotto 镜像即可。 - 为了让构建过程更方便些,Layotto 开发了 make 脚本。按需修改好 main 包(在 `cmd/layotto` 目录下)后,敲以下命令即可打包成 proxyv2镜像: + ```shell make image.proxyv2.build VERSION=latest ``` From c8db79886b1274ceaa46e05a364bdf8b448b1d78 Mon Sep 17 00:00:00 2001 From: seeflood Date: Wed, 13 Jul 2022 16:22:23 +0800 Subject: [PATCH 04/11] docs: delete components list Signed-off-by: seeflood --- docs/zh/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/zh/README.md b/docs/zh/README.md index 7b0646e181..1bda3974ad 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -58,16 +58,16 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 ### API -| API | status | quick start | components | desc | -| -------------- | :----: | :-------------------------------------------------------------------: | :-----------------------------------------------------------------------: | -------------------------------- | -| State | ✅ | [demo](https://mosn.io/layotto/#/zh/start/state/start) | [list](https://mosn.io/layotto/#/zh/component_specs/state/common) | 提供读写 KV 模型存储的数据的能力 | -| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/zh/start/pubsub/start) | [list](https://mosn.io/layotto/#/zh/component_specs/pubsub/redis) | 提供消息的发布/订阅能力 | -| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/zh/start/rpc/helloworld) | [list](https://mosn.io/layotto/#/zh/start/rpc/helloworld) | 通过 MOSN 进行服务调用 | -| Config | ✅ | [demo](https://mosn.io/layotto/#/zh/start/configuration/start-apollo) | [list](https://mosn.io/layotto/#/zh/component_specs/configuration/apollo) | 提供配置增删改查及订阅的能力 | -| Lock | ✅ | [demo](https://mosn.io/layotto/#/zh/start/lock/start) | [list](https://mosn.io/layotto/#/zh/component_specs/lock/common) | 提供 lock/unlock 分布式锁的实现 | -| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/zh/start/sequencer/start) | [list](https://mosn.io/layotto/#/zh/component_specs/sequencer/common) | 提供获取分布式自增 ID 的能力 | -| File | ✅ | [demo](https://mosn.io/layotto/#/zh/start/file/start) | [list](https://mosn.io/layotto/#/zh/component_specs/file/common) | 提供访问文件的能力 | -| Binding | ✅ | TODO | TODO | 提供透传数据的能力 | +| API | status | quick start | desc | +| -------------- | :----: | :-------------------------------------------------------------------: | -------------------------------- | +| State | ✅ | [demo](https://mosn.io/layotto/#/zh/start/state/start) | 提供读写 KV 模型存储的数据的能力 | +| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/zh/start/pubsub/start) | 提供消息的发布/订阅能力 | +| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/zh/start/rpc/helloworld) | 通过 MOSN 进行服务调用 | +| Config | ✅ | [demo](https://mosn.io/layotto/#/zh/start/configuration/start-apollo) | 提供配置增删改查及订阅的能力 | +| Lock | ✅ | [demo](https://mosn.io/layotto/#/zh/start/lock/start) | 提供 lock/unlock 分布式锁的实现 | +| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/zh/start/sequencer/start) | 提供获取分布式自增 ID 的能力 | +| File | ✅ | [demo](https://mosn.io/layotto/#/zh/start/file/start) | 提供访问文件的能力 | +| Binding | ✅ | TODO | 提供透传数据的能力 | ### Service Mesh From f4f665fd3b8ff28f5c1068ff8fa8fa84cc8d214c Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 10:27:50 +0800 Subject: [PATCH 05/11] docs: english readme Signed-off-by: seeflood --- README.md | 47 +++++++++++++++++++++++------------------------ docs/en/README.md | 43 +++++++++++++++++++++---------------------- 2 files changed, 44 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 7fd299be42..15cff9b71d 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,21 @@ Layotto(/leɪˈɒtəʊ/) is an application runtime developed using Golang, which provides various distributed capabilities for applications, such as state management, configuration management, and event pub/sub capabilities to simplify application development. -Layotto is built on the open source data plane [MOSN](https://github.com/mosn/mosn). In addition to providing distributed building blocks, Layotto can also serve as the data plane of Service Mesh and has the ability to control traffic. +Layotto is built on the open source data plane [MOSN](https://github.com/mosn/mosn) .In addition to providing distributed building blocks, Layotto can also serve as the data plane of Service Mesh and has the ability to control traffic. ## Motivation Layotto aims to combine [Multi-Runtime](https://www.infoq.com/articles/multi-runtime-microservice-architecture/) with Service Mesh into one sidecar. No matter which product you are using as the Service Mesh data plane (e.g. MOSN,Envoy or any other product), you can always attach Layotto to it and add Multi-Runtime capabilities without adding new sidecars. -For example, by adding Runtime capabilities to MOSN, a Layotto process can both [serve as the data plane of istio](https://mosn.io/layotto/#/en/start/istio/start.md) and provide various Runtime APIs (such as Configuration API, Pub/Sub API, etc.) +For example, by adding Runtime capabilities to MOSN, a Layotto process can both [serve as the data plane of istio](https://mosn.io/layotto/#/en/start/istio/) and provide various Runtime APIs (such as Configuration API, Pub/Sub API, etc.) -In addition, we were surprised to find that a sidecar can do much more than that. We are trying to make Layotto even the runtime container of FaaS (Function as a service) and [reloadable sdk](https://github.com/mosn/layotto/issues/166) with the magic power of [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly). +In addition, we were surprised to find that a sidecar can do much more than that. We are trying to make Layotto even the runtime container of FaaS (Function as a service) with the magic power of [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) . ## Features - Service Communication - Service Governance.Such as traffic hijacking and observation, service rate limiting, etc -- [As the data plane of istio](https://mosn.io/layotto/#/en/start/istio/start) +- [As the data plane of istio](https://mosn.io/layotto/#/en/start/istio/) - Configuration management - State management - Event publish and subscribe @@ -41,7 +41,7 @@ In addition, we were surprised to find that a sidecar can do much more than that As shown in the architecture diagram below, Layotto uses the open source MOSN as the base to provide network layer management capabilities while providing distributed capabilities. The business logic can directly interact with Layotto through a lightweight SDK without paying attention to the specific back-end infrastructure. -Layotto provides sdks in various languages. The sdk interacts with Layotto through grpc. Application developers only need to specify their own infrastructure type through the configuration file [configure file](./configs/runtime_config.json) provided by Layotto. No coding changes are required, which greatly improves the portability of the program. +Layotto provides SDKs in various languages. The sdk interacts with Layotto through grpc. Application developers only need to specify their own infrastructure type through the configuration file [configure file](./configs/runtime_config.json) provided by Layotto. No coding changes are required, which greatly improves the portability of the program. ![Architecture](https://raw.githubusercontent.com/mosn/layotto/main/docs/img/runtime-architecture.png) @@ -49,22 +49,27 @@ Layotto provides sdks in various languages. The sdk interacts with Layotto throu ### Get started with Layotto -You can try the [configuration demo with apollo](https://mosn.io/layotto/#/en/start/configuration/start-apollo.md) to get started with Layotto. - -For other features,see the demos below: +You can try the quickstart demos below to get started with Layotto. In addition, you can experience the online laboratory ### API -| API | status | quick start | components | desc | -| -------------- | :----: | :-------------------------------------------------------------------: | :-----------------------------------------------------------------------: | -------------------------------------------------------------- | -| State | ✅ | [demo](https://mosn.io/layotto/#/en/start/state/start) | [list](https://mosn.io/layotto/#/en/component_specs/state/common) | Write/Query the data of the Key/Value model | -| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/en/start/pubsub/start) | [list](https://mosn.io/layotto/#/en/component_specs/pubsub/redis) | Publish/Subscribe message through various Message Queue | -| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/en/start/rpc/helloworld) | [list](https://mosn.io/layotto/#/en/start/rpc/helloworld) | Call Service through MOSN (another istio data plane) | -| Config | ✅ | [demo](https://mosn.io/layotto/#/en/start/configuration/start-apollo) | [list](https://mosn.io/layotto/#/en/component_specs/configuration/apollo) | Write/Query/Subscribe the config through various Config Center | -| Lock | ✅ | [demo](https://mosn.io/layotto/#/en/start/lock/start) | [list](https://mosn.io/layotto/#/en/component_specs/lock/common) | Distribute lock implementation | -| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/en/start/sequencer/start) | [list](https://mosn.io/layotto/#/en/component_specs/sequencer/common) | Distribube auto increment ID generator | -| File | ✅ | TODO | [list](https://mosn.io/layotto/#/en/component_specs/file/oss) | File API implementation | -| Binding | ✅ | TODO | TODO | Transparent data transmission API | +| API | status | quick start | desc | +| -------------- | :----: | :-------------------------------------------------------------------: | -------------------------------------------------------------- | +| State | ✅ | [demo](https://mosn.io/layotto/#/en/start/state/start) | Write/Query the data of the Key/Value model | +| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/en/start/pubsub/start) | Publish/Subscribe message through various Message Queue | +| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/en/start/rpc/helloworld) | Call Service through MOSN (another istio data plane) | +| Config | ✅ | [demo](https://mosn.io/layotto/#/en/start/configuration/start-apollo) | Write/Query/Subscribe the config through various Config Center | +| Lock | ✅ | [demo](https://mosn.io/layotto/#/en/start/lock/start) | Distributed lock API | +| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/en/start/sequencer/start) | Generate distributed unique and incremental ID | +| File | ✅ | TODO | File API implementation | +| Binding | ✅ | TODO | Transparent data transmission API | + + +### Service Mesh + +| feature | status | quick start | desc | +| ------- | :----: | :----------------------------------------------------: | -------------------------- | +| istio | ✅ | [demo](https://mosn.io/layotto/#/en/start/istio/) | As the data plane of istio | ### Extendability @@ -102,12 +107,6 @@ For other features,see the demos below: | Rust | TODO | TODO | Compile Code written by Rust to \*.wasm and run in Layotto And Scheduled by k8s. | | AssemblyScript | TODO | TODO | Compile Code written by AssemblyScript to \*.wasm and run in Layotto And Scheduled by k8s. | -### Service Mesh - -| feature | status | quick start | desc | -| ------- | :----: | :----------------------------------------------------: | -------------------------- | -| istio | ✅ | [demo](https://mosn.io/layotto/#/en/start/istio/start) | As the data plane of istio | - ## Presentations - [Layotto - A new chapter of Service Mesh and Application Runtime](https://www.youtube.com/watch?v=5v8gTrFUDk8) diff --git a/docs/en/README.md b/docs/en/README.md index ced11d8635..20d716f3e0 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -20,15 +20,15 @@ Layotto is built on the open source data plane [MOSN](https://github.com/mosn/mo Layotto aims to combine [Multi-Runtime](https://www.infoq.com/articles/multi-runtime-microservice-architecture/) with Service Mesh into one sidecar. No matter which product you are using as the Service Mesh data plane (e.g. MOSN,Envoy or any other product), you can always attach Layotto to it and add Multi-Runtime capabilities without adding new sidecars. -For example, by adding Runtime capabilities to MOSN, a Layotto process can both [serve as the data plane of istio](https://mosn.io/layotto/#/en/start/istio/start.md) and provide various Runtime APIs (such as Configuration API, Pub/Sub API, etc.) +For example, by adding Runtime capabilities to MOSN, a Layotto process can both [serve as the data plane of istio](en/start/istio/) and provide various Runtime APIs (such as Configuration API, Pub/Sub API, etc.) -In addition, we were surprised to find that a sidecar can do much more than that. We are trying to make Layotto even the runtime container of FaaS (Function as a service) and [reloadable sdk](https://github.com/mosn/layotto/issues/166) with the magic power of [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) . +In addition, we were surprised to find that a sidecar can do much more than that. We are trying to make Layotto even the runtime container of FaaS (Function as a service) with the magic power of [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) . ## Features - Service Communication - Service Governance.Such as traffic hijacking and observation, service rate limiting, etc -- [As the data plane of istio](en/start/istio/start) +- [As the data plane of istio](en/start/istio/) - Configuration management - State management - Event publish and subscribe @@ -47,22 +47,27 @@ Layotto provides sdk in various languages. The sdk interacts with Layotto throug ### Get started with Layotto -You can try the [configuration demo with apollo](en/start/configuration/start-apollo.md) to get started with Layotto. - -For other features,see the demos below: +You can try the quickstart demos below to get started with Layotto. In addition, you can experience the online laboratory ### API -| API | status | quick start | components | desc | -| -------------- | :----: | :-------------------------------------------------------------------: | :-----------------------------------------------------------------------: | -------------------------------------------------------------- | -| State | ✅ | [demo](https://mosn.io/layotto/#/en/start/state/start) | [list](https://mosn.io/layotto/#/en/component_specs/state/common) | Write/Query the data of the Key/Value model | -| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/en/start/pubsub/start) | [list](https://mosn.io/layotto/#/en/component_specs/pubsub/redis) | Publish/Subscribe message through various Message Queue | -| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/en/start/rpc/helloworld) | [list](https://mosn.io/layotto/#/en/start/rpc/helloworld) | Call Service through MOSN (another istio data plane) | -| Config | ✅ | [demo](https://mosn.io/layotto/#/en/start/configuration/start-apollo) | [list](https://mosn.io/layotto/#/en/component_specs/configuration/apollo) | Write/Query/Subscribe the config through various Config Center | -| Lock | ✅ | [demo](https://mosn.io/layotto/#/en/start/lock/start) | [list](https://mosn.io/layotto/#/en/component_specs/lock/common) | Distribute lock implementation | -| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/en/start/sequencer/start) | [list](https://mosn.io/layotto/#/en/component_specs/sequencer/common) | Distribube auto increment ID generator | -| File | ✅ | TODO | [list](https://mosn.io/layotto/#/en/component_specs/file/oss) | File API implementation | -| Binding | ✅ | TODO | TODO | Transparent data transmission API | +| API | status | quick start | desc | +| -------------- | :----: | :-------------------------------------------------------------------: | -------------------------------------------------------------- | +| State | ✅ | [demo](https://mosn.io/layotto/#/en/start/state/start) | Write/Query the data of the Key/Value model | +| Pub/Sub | ✅ | [demo](https://mosn.io/layotto/#/en/start/pubsub/start) | Publish/Subscribe message through various Message Queue | +| Service Invoke | ✅ | [demo](https://mosn.io/layotto/#/en/start/rpc/helloworld) | Call Service through MOSN (another istio data plane) | +| Config | ✅ | [demo](https://mosn.io/layotto/#/en/start/configuration/start-apollo) | Write/Query/Subscribe the config through various Config Center | +| Lock | ✅ | [demo](https://mosn.io/layotto/#/en/start/lock/start) | Distributed lock API | +| Sequencer | ✅ | [demo](https://mosn.io/layotto/#/en/start/sequencer/start) | Generate distributed unique and incremental ID | +| File | ✅ | TODO | File API implementation | +| Binding | ✅ | TODO | Transparent data transmission API | + + +### Service Mesh + +| feature | status | quick start | desc | +| ------- | :----: | :----------------------------------------------------: | -------------------------- | +| istio | ✅ | [demo](en/start/istio/) | As the data plane of istio | ### Extendability @@ -100,12 +105,6 @@ For other features,see the demos below: | Rust | TODO | TODO | Compile Code written by Rust to \*.wasm and run in Layotto And Scheduled by k8s. | | AssemblyScript | TODO | TODO | Compile Code written by AssemblyScript to \*.wasm and run in Layotto And Scheduled by k8s. | -### Service Mesh - -| feature | status | quick start | desc | -| ------- | :----: | :----------------------------------------------------: | -------------------------- | -| istio | ✅ | [demo](https://mosn.io/layotto/#/en/start/istio/start) | As the data plane of istio | - ## Presentations - [Layotto - A new chapter of Service Mesh and Application Runtime](https://www.youtube.com/watch?v=5v8gTrFUDk8) From 0394a75d19c6f8da9a86fd361af5ca6690c51d4a Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 10:33:24 +0800 Subject: [PATCH 06/11] docs: english sidebar Signed-off-by: seeflood --- docs/_sidebar.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index bc30b7e7f8..949219f356 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -14,8 +14,9 @@ - [Hello World](en/start/rpc/helloworld.md) - [Dubbo JSON RPC](en/start/rpc/dubbo_json_rpc.md) - [API plugin: register your own API](en/start/api_plugin/helloworld.md) - - Integrate with istio - - [As a data plane in istio](en/start/istio/start.md) + - As the data plane of istio + - [Integrate with istio 1.10.6](en/start/istio/) + - [Integrate with istio 1.5.x](en/start/istio/start.md) - Traffic intervention on the 4th layer network - [Dump TCP Traffic](en/start/network_filter/tcpcopy.md) - Flow Control on the 7th layer network @@ -27,6 +28,7 @@ - [Health check and metadata query](en/start/actuator/start.md) - [Run business logic in Layotto using WASM](en/start/wasm/start.md) - [FaaS model based on WASM and Runtime](en/start/faas/start.md) +- [Online lab](en/start/lab.md) - Developer guide - Building blocks - [File API](en/building_blocks/file/file.md) From 76ef8107764c3e9a39f4c484ca2b259284447821 Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 10:44:51 +0800 Subject: [PATCH 07/11] docs: english operation guide Signed-off-by: seeflood --- docs/en/operation/README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/en/operation/README.md b/docs/en/operation/README.md index 7b11493d16..5f055da102 100644 --- a/docs/en/operation/README.md +++ b/docs/en/operation/README.md @@ -33,11 +33,23 @@ Of course, you can also run Layotto and other systems (such as Redis) at the sam If you are using Istio now, you can deploy the Sidecar via Istio. -You can refer to [MOSN guide](https://mosn.io/docs/user-guide/start/istio/). Just replace the MOSN image in the tutorial with a Layotto image. +In order to integrate with Istio, you need to build the Layotto sidecar as a proxyv2 image. There are several ways to build: + +- You can refer to [MOSN guide](https://mosn.io/docs/user-guide/start/istio/). Just replace the MOSN image in the tutorial with a Layotto image. + +- To make the build process easier, Layotto developed the make script. After modifying the main package as needed (in the `cmd/layotto` directory), run the following command to package it into a proxyv2 image: + +```shell +make image.proxyv2.build VERSION=latest +``` + +The principle of this script is to replace the binary file in the MOSN proxyv2 image with the binary file of Layotto. + +- The community has built the [layotto/proxyv2](https://hub.docker.com/r/layotto/proxyv2) image for the [Online Lab](https://killercoda.com/mosn-tutorial/course /layotto) to demonstrate Istio+Layotto. This image packs all Layotto components into it, resulting in a very large size. We recommend that you modify the main package according to your own needs and build the image yourself, so that the built image will be much smaller. #### Option 2. Other ways -You can prepare your own image and k8s configuration file, then deploy Layotto via Kubernetes. +You can prepare your own image and K8s configuration file, then deploy Layotto via Kubernetes. We are working on the official Layotto image and the solution for deploying to Kubernetes using Helm, so feel free to join us to build it. More details in @@ -63,7 +75,7 @@ The previously released Layotto v0.3.0 corresponds to MOSN version v0.24.1 There are two options to upgrade. -- Upgrade sidecar container using k8s native solution +- Upgrade sidecar container using K8s native solution - [Hot upgrade: upgrade the sidecar without affecting the business](https://mosn.io/en/docs/concept/smooth-upgrade/) From 15f3577322cb23ad2cff81470ce5a5c53d6e70b3 Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 10:49:41 +0800 Subject: [PATCH 08/11] docs: english istio 1.5 demo Signed-off-by: seeflood --- docs/en/start/istio/start.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/en/start/istio/start.md b/docs/en/start/istio/start.md index 2d95acb1ef..90d597dde4 100644 --- a/docs/en/start/istio/start.md +++ b/docs/en/start/istio/start.md @@ -1,4 +1,4 @@ -# Layotto integrate with Istio +# Demo of Istio 1.5.x integration ## 1. Background @@ -19,7 +19,7 @@ before starting the demo,you must install some components as follows: 3. [Istio-1.5.x](https://github.com/istio/istio/releases/tag/1.5.2) - Currently, mosn only supports `istio 1.5.X` (the support for `istio 1.10.X` is already in CR), so you need to download the corresponding version of `istio`. After decompressing, configure it as follows to facilitate subsequent operations. + You need to download the `1.5.x` version of `istio`. After decompressing, configure it as follows to facilitate subsequent operations. ``` export PATH=$PATH:${your istio directory}/bin @@ -113,7 +113,8 @@ before starting the demo,you must install some components as follows: ## 5. Note -1. Since `istio 1.5.2` is used in this demo, which belongs to an older version, the demo will not be merged into the `main` branch. Instead, it exists as an independent branch `istio-1.5.X`. After 'mosn' integrates with `istio 1.10.X`, it will be merged. +1. Since the example uses `istio 1.5.2`, which is an older version, the demo will not be merged into the main branch, but exists as a separate branch `istio-1.5.x`. Currently the main branch code has been integrated with `istio 1.10.x`. + 2. For the source code of client and server used in the example, please refer to [here](https://github.com/mosn/layotto/tree/istio-1.5.x/demo/istio). 3. In order to get started simple, the `layotto-injected.yaml` file used above has been injected through istio already. This injection process is as follows: 1. Run the following command to specify `istio` to use `Layotto` as the data plane From 19c9b3bc79b51da69c5ed8e18abf8df91d12f8d2 Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 10:57:11 +0800 Subject: [PATCH 09/11] docs: english istio readme Signed-off-by: seeflood --- docs/en/operation/README.md | 4 ++-- docs/en/start/istio/README.md | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 docs/en/start/istio/README.md diff --git a/docs/en/operation/README.md b/docs/en/operation/README.md index 5f055da102..70bf84a217 100644 --- a/docs/en/operation/README.md +++ b/docs/en/operation/README.md @@ -29,9 +29,9 @@ Of course, you can also run Layotto and other systems (such as Redis) at the sam ### Deploy on Kubernetes -#### Option 1. Deploy via Istio +#### Option 1. Deploy using Istio -If you are using Istio now, you can deploy the Sidecar via Istio. +If you are using Istio, you can deploy the Layotto sidecar using Istio. In order to integrate with Istio, you need to build the Layotto sidecar as a proxyv2 image. There are several ways to build: diff --git a/docs/en/start/istio/README.md b/docs/en/start/istio/README.md new file mode 100644 index 0000000000..68be20b05b --- /dev/null +++ b/docs/en/start/istio/README.md @@ -0,0 +1,7 @@ +# Demo of Istio 1.10.6 integration + +The latest version of Layotto integrates Istio 1.10.6. You can manage the traffic of Layotto (data plane) using Istio (control plane). + +You can experience integrating Istio 1.10.6 in [Online Lab](en/start/lab.md) + +For more details, see ["Deploying Layotto using Istio"](en/operation/?id=option-1-deploy-using-istio) \ No newline at end of file From c281ee7e4463cde3fa22f6d369310ee1acfe3628 Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 11:05:51 +0800 Subject: [PATCH 10/11] docs: english doc for online lab Signed-off-by: seeflood --- docs/en/start/lab.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/en/start/lab.md diff --git a/docs/en/start/lab.md b/docs/en/start/lab.md new file mode 100644 index 0000000000..23fad4ce89 --- /dev/null +++ b/docs/en/start/lab.md @@ -0,0 +1,23 @@ +# Online Lab + +In addition to the Quickstart that can be run locally, Layotto also has an online laboratory, providing an interactive learning experience, saving you the trouble of building a local environment. + +Welcome to [the tutorial on KillerCoda](https://killercoda.com/mosn-tutorial/course/layotto). + +## Tutorial list + +The tutorials currently supported by the online lab are as follows. + +- [Run the Bookinfo demo project, with Layotto as the data plane of Istio](https://killercoda.com/mosn-tutorial/course/layotto/layotto-with-istio) + +## Contributing tutorial + +The online lab tutorials of Layotto and MOSN are located in the [mosn/mosn-tutorial](https://github.com/mosn/mosn-tutorial) repository, and you are welcome to submit PR and contribute to the tutorial. + +Related documents: + +- [KillerCoda Documentation](https://killercoda.com/creators) + +- [Katacoda to Killercoda Migration Guide](https://itnext.io/katacoda-to-killercoda-migration-guide-d21961fc0c9b?sk=6e93c2194234f703454e3eb1438712c9&source=friends_link&gi=2ea9ee69b8ba) + +Note: The previous tutorials were hosted on Katacoda, because Katacoda was closed, the community decided to migrate the tutorials to KillerCoda. \ No newline at end of file From 8289a677e7bdfa0f0a95ea04da038d9368a349ba Mon Sep 17 00:00:00 2001 From: seeflood Date: Thu, 14 Jul 2022 11:12:19 +0800 Subject: [PATCH 11/11] docs: add links for online lab in the README.md Signed-off-by: seeflood --- README.md | 4 ++-- docs/en/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 15cff9b71d..8dcbc2d314 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ In addition, we were surprised to find that a sidecar can do much more than that - State management - Event publish and subscribe - Health check, query runtime metadata -- [FaaS model based on WASM and Runtime](docs/en/start/faas/start.md) +- [FaaS model based on WASM and Runtime](https://mosn.io/layotto/#/en/start/faas/start.md) ## Project Architecture @@ -49,7 +49,7 @@ Layotto provides SDKs in various languages. The sdk interacts with Layotto throu ### Get started with Layotto -You can try the quickstart demos below to get started with Layotto. In addition, you can experience the online laboratory +You can try the quickstart demos below to get started with Layotto. In addition, you can experience the [online laboratory](https://mosn.io/layotto/#/en/start/lab) ### API diff --git a/docs/en/README.md b/docs/en/README.md index 20d716f3e0..73efbc2805 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -47,7 +47,7 @@ Layotto provides sdk in various languages. The sdk interacts with Layotto throug ### Get started with Layotto -You can try the quickstart demos below to get started with Layotto. In addition, you can experience the online laboratory +You can try the quickstart demos below to get started with Layotto. In addition, you can experience the [online laboratory](en/start/lab) ### API