You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/02/09 12:00:18 UTC

[incubator-linkis-website] branch dev updated: add doc 'involve skywalking into linkis' (#148)

This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-linkis-website.git


The following commit(s) were added to refs/heads/dev by this push:
     new 094e3e8  add doc 'involve skywalking into linkis' (#148)
094e3e8 is described below

commit 094e3e86fd03416a224250bbca3250f0908d1cb7
Author: legendtkl <ta...@gmail.com>
AuthorDate: Wed Feb 9 20:00:15 2022 +0800

    add doc 'involve skywalking into linkis' (#148)
---
 docs/deployment/Images/SkyWalking_APM_Download.png | Bin 0 -> 398250 bytes
 .../Images/SkyWalking_Agent_Download.png           | Bin 0 -> 338374 bytes
 docs/deployment/Images/SkyWalking_Architecture.png | Bin 0 -> 91836 bytes
 docs/deployment/Images/SkyWalking_Topology.png     | Bin 0 -> 350298 bytes
 docs/deployment/Images/SkyWalking_UI_Dashboard.png | Bin 0 -> 538453 bytes
 .../deployment/Images/SkyWalking_UI_Dashboard2.png | Bin 0 -> 498672 bytes
 docs/deployment/involve_skywalking_into_linkis.md  | 150 +++++++++++++++++++++
 .../deployment/images/SkyWalking_APM_Download.png  | Bin 0 -> 398250 bytes
 .../images/SkyWalking_Agent_Download.png           | Bin 0 -> 338374 bytes
 .../deployment/images/SkyWalking_Architecture.png  | Bin 0 -> 91836 bytes
 .../deployment/images/SkyWalking_Topology.png      | Bin 0 -> 350298 bytes
 .../deployment/images/SkyWalking_UI_Dashboard.png  | Bin 0 -> 538453 bytes
 .../deployment/images/SkyWalking_UI_Dashboard2.png | Bin 0 -> 498672 bytes
 .../deployment/involve_skywalking_info_linkis.md   | 150 +++++++++++++++++++++
 14 files changed, 300 insertions(+)

diff --git a/docs/deployment/Images/SkyWalking_APM_Download.png b/docs/deployment/Images/SkyWalking_APM_Download.png
new file mode 100644
index 0000000..9299fb1
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_APM_Download.png differ
diff --git a/docs/deployment/Images/SkyWalking_Agent_Download.png b/docs/deployment/Images/SkyWalking_Agent_Download.png
new file mode 100644
index 0000000..85f471c
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_Agent_Download.png differ
diff --git a/docs/deployment/Images/SkyWalking_Architecture.png b/docs/deployment/Images/SkyWalking_Architecture.png
new file mode 100644
index 0000000..d4a65a7
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_Architecture.png differ
diff --git a/docs/deployment/Images/SkyWalking_Topology.png b/docs/deployment/Images/SkyWalking_Topology.png
new file mode 100644
index 0000000..2379255
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_Topology.png differ
diff --git a/docs/deployment/Images/SkyWalking_UI_Dashboard.png b/docs/deployment/Images/SkyWalking_UI_Dashboard.png
new file mode 100644
index 0000000..5518ea6
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_UI_Dashboard.png differ
diff --git a/docs/deployment/Images/SkyWalking_UI_Dashboard2.png b/docs/deployment/Images/SkyWalking_UI_Dashboard2.png
new file mode 100644
index 0000000..e206cb0
Binary files /dev/null and b/docs/deployment/Images/SkyWalking_UI_Dashboard2.png differ
diff --git a/docs/deployment/involve_skywalking_into_linkis.md b/docs/deployment/involve_skywalking_into_linkis.md
new file mode 100644
index 0000000..f61d525
--- /dev/null
+++ b/docs/deployment/involve_skywalking_into_linkis.md
@@ -0,0 +1,150 @@
+---
+title: Involve SkyWaling into Linkis
+sidebar_position: 7
+---
+This article describes how to enable SkyWalking when starting the Linkis service to facilitate subsequent distributed trace and troubleshooting.
+
+## 1. Introduction to SkyWalking
+
+### What is SkyWalking
+
+SkyWalking is an open source observability platform used to collect, analyze, aggregate and visualize data from services and cloud native infrastructures. SkyWalking provides an easy way to maintain a clear view of your distributed systems, even across Clouds. It is a modern APM, specially designed for cloud native, container based distributed systems.
+
+### SkyWalking Architecture
+
+The following figure is the overall architecture of SkyWalking.
+
+![](./Images/SkyWalking_Architecture.png)
+
+SkyWalking is logically split into four parts: Probes, Platform backend, Storage and UI.
+- **Probe**s collect data and reformat them for SkyWalking requirements (different probes support different sources).
+- **Platform backend** supports data aggregation, analysis and streaming process covers traces, metrics, and logs.
+- **Storage** houses SkyWalking data through an open/plugable interface. You can choose an existing implementation, such as ElasticSearch, H2, MySQL, TiDB, InfluxDB, or implement your own. Patches for new storage implementors welcome!
+- **UI** is a highly customizable web based interface allowing SkyWalking end users to visualize and manage SkyWalking data.
+
+Using SkyWalking in Linkis requires that the user already has the Backend service and the corresponding Storage. The Probe can be integrated when the Linkis service is started. There are three main ways of Probe integration:
+
+- **Language based native agent**. These agents run in target service user spaces, such as a part of user codes. For example, the SkyWalking Java agent uses the `-javaagent` command line argument to manipulate codes in runtime, where `manipulate` means to change and inject user’s codes. Another kind of agents uses certain hook or intercept mechanism provided by target libraries. As you can see, these agents are based on languages and libraries.
+- **Service Mesh probes**. Service Mesh probes collect data from sidecar, control plane in service mesh or proxy. In the old days, proxy is only used as an ingress of the whole cluster, but with the Service Mesh and sidecar, we can now perform observability functions.
+- **3rd-party instrument library**. SkyWalking accepts many widely used instrument libraries data formats. It analyzes the data, transfers it to SkyWalking’s formats of trace, metrics or both. This feature starts with accepting Zipkin span data. See [Receiver for Zipkin traces](https://skywalking.apache.org/docs/main/latest/en/setup/backend/zipkin-trace) for more information.
+
+We used **Language based native agent** when Linkis integrated SkyWalking, that is, the method of java agent. Below we will show you how to enable SkyWalking in Linkis service.
+
+
+## 2. Deploy the SkyWalking backend
+The SkyWalking backend is a prerequisite for enabling SkyWalk. The following is a brief demonstration of how to install the SkyWalking backend.
+
+First download SkyWalking APM from SkyWalking's [Downloads](https://skywalking.apache.org/downloads/) page.
+
+![](./Images/SkyWalking_APM_Download.png)
+
+After downloading, unzip it directly, and we get the following directory structure.
+```bash
+$ ls
+bin config config-examples LICENSE licenses logs NOTICE oap-libs README.txt tools webapp
+````
+
+The backend uses the H2 in-memory database as the backend storage by default, and does not need to modify the configuration. Start as follows.
+
+Start Backend
+```bash
+$ bash bin/startup.sh
+````
+
+Start WebApp
+```bash
+$ bash bin/webappService.sh
+````
+
+The UI starts on port 8080 by default. You can also modify the listening port by modifying the webapp.yml file in the webapp directory.
+````yaml
+server:
+  port: 8080
+
+spring:
+  cloud:
+    gateway:
+      routes:
+        - id: oap-route
+          uri: lb://oap-service
+          predicates:
+            - Path=/graphql/**
+    discovery:
+      client:
+        simple:
+          instances:
+            oap-service:
+              - uri: http://127.0.0.1:12800
+            # - uri: http://<oap-host-1>:<oap-port1>
+            # - uri: http://<oap-host-2>:<oap-port2>
+
+  mvc:
+    throw-exception-if-no-handler-found: true
+
+  web:
+    resources:
+      add-mappings: true
+
+management:
+  server:
+    base-path: /manage
+````
+
+## 3. Linkis service start and enable SkyWalking
+
+It is assumed here that the service deployment of Linkis is relatively clear. If it is not clear, it can be asynchronous:
+
+To start SkyWalking in Linkis, you first need to download the Java agent of SkyWalking, we can download it from the [Downloads](https://skywalking.apache.org/downloads/) page.
+
+![](./Images/SkyWalking_Agent_Download.png)
+
+After downloading, unzip it directly, the internal file structure is as follows:
+```bash
+tree skywalking-agent
+$ skywalking-agent
+├── LICENSE
+├── NOTICE
+├── activations
+│ ├── apm-toolkit-kafka-activation-8.8.0.jar
+│ ├── ...
+├── bootstrap-plugins
+│ ├── apm-jdk-http-plugin-8.8.0.jar
+│ └── apm-jdk-threading-plugin-8.8.0.jar
+├── config
+│ └── agent.config
+├── licenses
+│ └── LICENSE-asm.txt
+├── logs
+├── optional-plugins
+│ ├── apm-customize-enhance-plugin-8.8.0.jar
+│ ├── ...
+├── optional-reporter-plugins
+│ ├── kafka-reporter-plugin-8.8.0.jar
+│ ├── ...
+├── plugins
+│ ├── apm-activemq-5.x-plugin-8.8.0.jar
+│ ├── ...
+└── skywalking-agent.jar
+
+````
+
+Modify the configuration item `SKYWALKING_AGENT_PATH` in linkis-env.sh of Linkis. Set it to the path to `skywalking-agent.jar`.
+```bash
+SKYWALKING_AGENT_PATH=/path/to/skywalking-agent.jar
+````
+
+Then start Linkis.
+
+```bash
+$ bash linkis-start-all.sh
+````
+
+## 4. Result display
+
+The UI port of Linkis starts at port 8080 by default. After Linkis opens SkyWalking and opens the UI, if you can see the following picture, it means success.
+
+![](./Images/SkyWalking_UI_Dashboard.png)
+
+![](./Images/SkyWalking_UI_Dashboard2.png)
+
+![](./Images/SkyWalking_Topology.png)
\ No newline at end of file
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_APM_Download.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_APM_Download.png
new file mode 100644
index 0000000..9299fb1
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_APM_Download.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Agent_Download.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Agent_Download.png
new file mode 100644
index 0000000..85f471c
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Agent_Download.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Architecture.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Architecture.png
new file mode 100644
index 0000000..d4a65a7
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Architecture.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Topology.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Topology.png
new file mode 100644
index 0000000..2379255
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_Topology.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard.png
new file mode 100644
index 0000000..5518ea6
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard2.png b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard2.png
new file mode 100644
index 0000000..e206cb0
Binary files /dev/null and b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/images/SkyWalking_UI_Dashboard2.png differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/involve_skywalking_info_linkis.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/involve_skywalking_info_linkis.md
new file mode 100644
index 0000000..de86d8f
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/deployment/involve_skywalking_info_linkis.md
@@ -0,0 +1,150 @@
+---
+title: 启动 Linkis 开启 SkyWalking
+sidebar_position: 7
+---
+这篇文章介绍一下如何在启动 Linkis 服务的时候开启 SkyWalking,以方便后续做分布式 trace 和 troubleshooting。
+
+## 1. SkyWalking 介绍
+
+### SkyWalking 是什么
+
+SkyWalking 是开源的可视化平台,可以从多种数据源采集数据,并提供分析、聚合以及可视化等功能。通过 SkyWalking,我们可以对分布式系统的拓扑结构,数据交互有一个更加清晰的视图。
+
+
+
+### SkyWalking 架构
+
+下图是 SkyWalking 的整体架构图。
+
+![](./Images/SkyWalking_Architecture.png)
+
+从逻辑上可以划分成 4 个部分:
+* **Probe**:可以理解为数据采集 agent,主要负责数据采集和格式化。
+* **Platform Backend**:SkyWalking 的后端服务,支持数据聚合、分析以及流式处理等。
+* **Storage**:负责数据存储,以 plugin 的方式支持多种存储引擎,比如 ElasticSearch, H2, MySQL, TiDB, InfluxDB 等。
+* **UI**: 数据可视化。
+
+在 Linkis 中使用 SkyWalking,需要用户已经存在 Backend 服务以及对应的 Storage。Linkis 服务启动的时候集成 Probe 即可。Probe 集成主要有三种方式:
+* **Language based native agent**:这些 agent 和目标服务进程运行在相同的用户空间,从外部来看,agent 和目标服务的代码是一样的。一个典型的例子是 Java agent,在运行 Java 应用的时候我们可以通过 `-javaagent` 来指定 agent。
+* **Service Mesh probes**:这种 Probe 通过 sidecar 或者 proxy 收集数据。
+* **3rd-party intrument library**:简单来说就是第三方的数据,比如 zipkin。
+
+我们在 Linkis 集成 SkyWalking 的时候采用第一种方式,也就是 java agent 的方式。下面我们为大家演示一下如何在 Linkis 服务中开启 SkyWalking。
+
+## 2. 部署 SkyWalking 后端
+
+SkyWalking 后端是开启 SkyWalk 的前置条件,下面先简单演示下如何安装 SkyWalking 的后端。
+
+首先从 SkyWalking 的 [Downloads](https://skywalking.apache.org/downloads/) 页面下载 SkyWalking APM。
+
+![](./Images/SkyWalking_APM_Download.png)
+
+下载完,直接解压得到如下的目录结构。
+
+```bash
+$ ls
+bin  config  config-examples  LICENSE  licenses  logs  NOTICE  oap-libs  README.txt  tools  webapp
+```
+
+后端默认使用 H2 内存数据库作为后端存储,不需要修改配置。按如下方式启动。
+
+启动 Backend
+```bash
+$ bash bin/startup.sh
+```
+
+启动 WebApp
+```bash
+$ bash bin/webappService.sh
+```
+
+UI 默认启动在 8080 端口,也可以通过修改 webapp 目录下的 webapp.yml 文件修改监听端口。
+
+```yaml
+server:
+  port: 8080
+
+spring:
+  cloud:
+    gateway:
+      routes:
+        - id: oap-route
+          uri: lb://oap-service
+          predicates:
+            - Path=/graphql/**
+    discovery:
+      client:
+        simple:
+          instances:
+            oap-service:
+              - uri: http://127.0.0.1:12800
+            # - uri: http://<oap-host-1>:<oap-port1>
+            # - uri: http://<oap-host-2>:<oap-port2>
+
+  mvc:
+    throw-exception-if-no-handler-found: true
+
+  web:
+    resources:
+      add-mappings: true
+
+management:
+  server:
+    base-path: /manage
+```
+
+## 3. Linkis 服务启动开启 SkyWalking
+
+这里假定大家对 Linkis 的服务部署已经比较清晰,如果还不清晰,可以异步: 
+
+在 Linkis 中开启 SkyWalking 首先需要下载 SkyWalking 的 Java agent,我们可以在 [Downloads](https://skywalking.apache.org/downloads/) 页面进行下载。
+
+![](./Images/SkyWalking_Agent_Download.png)
+
+下载之后解压,内部的文件结构如下:
+```bash
+tree skywalking-agent                                   
+$ skywalking-agent
+├── LICENSE
+├── NOTICE
+├── activations
+│   ├── apm-toolkit-kafka-activation-8.8.0.jar
+│   ├── ...
+├── bootstrap-plugins
+│   ├── apm-jdk-http-plugin-8.8.0.jar
+│   └── apm-jdk-threading-plugin-8.8.0.jar
+├── config
+│   └── agent.config
+├── licenses
+│   └── LICENSE-asm.txt
+├── logs
+├── optional-plugins
+│   ├── apm-customize-enhance-plugin-8.8.0.jar
+│   ├── ...
+├── optional-reporter-plugins
+│   ├── kafka-reporter-plugin-8.8.0.jar
+│   ├── ...
+├── plugins
+│   ├── apm-activemq-5.x-plugin-8.8.0.jar
+│   ├── ...
+└── skywalking-agent.jar
+```
+
+修改 Linkis 的 deploy-config/linkis-env.sh 中的配置项 `SKYWALKING_AGENT_PATH`。将其设置为 `skywalking-agent.jar` 的路径。
+```bash
+SKYWALKING_AGENT_PATH=/path/to/skywalking-agent.jar
+```
+
+然后启动 Linkis 即可。
+```bash
+$ bash linkis-start-all.sh
+```
+
+## 4. 结果展示
+Linkis 的 UI 端口默认启动在 8080 端口,Linkis 开启 SkyWalking 之后打开 UI 如果能看到如下的图就表示成功了。
+![](./Images/SkyWalking_UI_Dashboard.png)
+
+![](./Images/SkyWalking_UI_Dashboard2.png)
+
+![](./Images/SkyWalking_Topology.png)
+

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org