This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new 7c9b9d0 add deployment doc for shenyu-agent (#436)
7c9b9d0 is described below
commit 7c9b9d093e9f5d2e1810b8a07e8375af2b9f9b9f
Author: Kunshuai Zhu <[email protected]>
AuthorDate: Wed Jan 12 12:00:39 2022 +0800
add deployment doc for shenyu-agent (#436)
---
docs/deployment/deployment-agent.md | 46 ++++++++++++++++++++++
docs/user-guide/observability/observability.md | 10 +----
.../current/deployment/deployment-agent.md | 46 ++++++++++++++++++++++
.../user-guide/observability/observability.md | 10 +----
4 files changed, 94 insertions(+), 18 deletions(-)
diff --git a/docs/deployment/deployment-agent.md
b/docs/deployment/deployment-agent.md
new file mode 100644
index 0000000..24c3f4b
--- /dev/null
+++ b/docs/deployment/deployment-agent.md
@@ -0,0 +1,46 @@
+---
+sidebar_position: 8
+title: Deploy shenyu-agent
+keywords: ["Deployment", "agent"]
+description: Deploy shenyu-agent
+---
+
+This article describes how to deploy `shenyu-agent`. (2.4.2 version starts to
support)
+
+To learn more about `shenyu-agent` , see
[Observability](../user-guide/observability/observability.md).
+
+## Deployment with binary package
+
+* Download `apache-shenyu-incubating-2.4.2-bootstrap-bin.tar.gz`
+
+* Unzip `apache-shenyu-incubating-2.4.2-bootstrap-bin.tar.gz` and enter the
`apache-shenyu-incubating-2.4.2-bootstrap-bin` directory.
+
+Agent related configuration is in `./agent/conf`.
+
+* Start with a script, add a parameter `agent`
+
+```shell
+./bin/start.sh agent
+```
+
+## Deploy with docker
+
+* Edit configuration file
+
+Agent related configuration files are located at
[shenyu-dist/shenyu-agent-dist/src/main/resources/conf/](https://github.com/apache/incubator-shenyu/tree/master/shenyu-dist/shenyu-agent-dist/src/main/resources/conf),
after editing `shenyu-agent.yaml` and `tracing-point.yaml`, put these two
files in the same directory, record them as `$AGENT_CONF`.
+
+In the host, the directory where the bootstrap configuration file is located
is recorded as `$BOOTSTRAP_CONF`.
+
+* Pull the docker image and run
+
+The additional parameter `agent` means to start `shenyu-agent`.
+
+```shell
+> docker network create shenyu
+> docker pull apache/shenyu-bootstrap
+> docker run -d \
+ -p 9195:9195 \
+ -v $AGENT_CONF:/opt/shenyu-bootstrap/agent/conf \
+ -v $BOOTSTRAP_CONF:/opt/shenyu-bootstrap/conf \
+ apache/shenyu-bootstrap agent
+```
diff --git a/docs/user-guide/observability/observability.md
b/docs/user-guide/observability/observability.md
index 048c832..810b1f2 100644
--- a/docs/user-guide/observability/observability.md
+++ b/docs/user-guide/observability/observability.md
@@ -86,14 +86,6 @@ plugins:
## For use
-In the startup script to start the `Apache ShenYu` gateway, add the -javaagent
parameter when running the jar package at the end, namely:
-
-```shell
-nohup java ${JAVA_OPTS}\
--javaagent:${SHENYU_AGENT_PATH}/shenyu-agent.jar\
--classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${LOG_FILES} 2>&1 &
-```
-
-Where `${SHENYU_AGENT_PATH}` is the path of the `shenyu-agent` directory
+For deployment, please refer to [Deploy
shenyu-agent](../../deployment/deployment-agent.md)
> Developers can add the `-javaagent` parameter to the JVM parameter of the
> IDE startup configuration
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-agent.md
b/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-agent.md
new file mode 100644
index 0000000..849c89a
--- /dev/null
+++
b/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-agent.md
@@ -0,0 +1,46 @@
+---
+sidebar_position: 8
+title: 部署shenyu-agent
+keywords: ["Deployment", "agent"]
+description: 部署shenyu-agent
+---
+
+本文介绍如何部署 `shenyu-agent`。(2.4.2版本开始支持)
+
+了解更多关于 `shenyu-agent` ,可参考
[可观测性](../user-guide/observability/observability.md)。
+
+## 二进制包部署
+
+* 下载 `apache-shenyu-incubating-2.4.2-bootstrap-bin.tar.gz`
+
+* 解压缩 `apache-shenyu-incubating-2.4.2-bootstrap-bin.tar.gz`,进入
`apache-shenyu-incubating-2.4.2-bootstrap-bin` 目录。
+
+agent相关配置在 `./agent/conf` 中。
+
+* 使用脚本启动,添加一个参数 `agent` 即可
+
+```shell
+./bin/start.sh agent
+```
+
+## 使用docker部署
+
+* 编辑配置文件
+
+agent相关配置文件位于
[shenyu-dist/shenyu-agent-dist/src/main/resources/conf/](https://github.com/apache/incubator-shenyu/tree/master/shenyu-dist/shenyu-agent-dist/src/main/resources/conf)
,编辑好 `shenyu-agent.yaml` 和 `tracing-point.yaml` 后,将这两个文件放在同一目录下,记为
`$AGENT_CONF`。
+
+宿主机中,bootstrap的配置文件所在目录记为 `$BOOTSTRAP_CONF`。
+
+* 拉取docker镜像并启动
+
+附带参数 `agent` 表示启动 `shenyu-agent`。
+
+```shell
+> docker network create shenyu
+> docker pull apache/shenyu-bootstrap
+> docker run -d \
+ -p 9195:9195 \
+ -v $AGENT_CONF:/opt/shenyu-bootstrap/agent/conf \
+ -v $BOOTSTRAP_CONF:/opt/shenyu-bootstrap/conf \
+ apache/shenyu-bootstrap agent
+```
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/observability/observability.md
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/observability/observability.md
index 7e3ed72..595d66c 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/observability/observability.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/observability/observability.md
@@ -86,14 +86,6 @@ plugins:
## 使用
-在启动 `Apache ShenYu` 网关的启动脚本中,最后运行jar包时加上-javaagent参数即可,即:
-
-```shell
-nohup java ${JAVA_OPTS}\
--javaagent:${SHENYU_AGENT_PATH}/shenyu-agent.jar\
--classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${LOG_FILES} 2>&1 &
-```
-
-其中 `${SHENYU_AGENT_PATH}` 为 `shenyu-agent` 目录的路径
+部署请参考 [部署shenyu-agent](../../deployment/deployment-agent.md)
> 开发者可将-javaagent参数添加到IDE启动配置的JVM参数中