You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by sa...@apache.org on 2021/07/16 09:35:25 UTC
[incubator-shenyu-website] branch main updated: Deployment (#107)
This is an automated email from the ASF dual-hosted git repository.
sabersola 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 39ebe53 Deployment (#107)
39ebe53 is described below
commit 39ebe53f4082767b4eaf057018c25cb13dd131b4
Author: xiaoyu <xi...@apache.org>
AuthorDate: Fri Jul 16 17:34:02 2021 +0800
Deployment (#107)
* modify shenyu framework png
* modify shenyu deployment
---
content/zh/projects/shenyu/_index.md | 30 +++-
.../zh/projects/shenyu/deployment-custom/index.md | 77 +++++++++
.../zh/projects/shenyu/deployment-docker/index.md | 48 ++++++
.../zh/projects/shenyu/deployment-helm/index.md | 14 ++
content/zh/projects/shenyu/deployment-k8s/index.md | 14 ++
.../zh/projects/shenyu/deployment-local/index.md | 42 +++++
.../zh/projects/shenyu/deployment-package/index.md | 51 ++++++
content/zh/projects/shenyu/shenyu-set-up/index.md | 190 ---------------------
8 files changed, 268 insertions(+), 198 deletions(-)
diff --git a/content/zh/projects/shenyu/_index.md b/content/zh/projects/shenyu/_index.md
index 40f3735..4065c5e 100644
--- a/content/zh/projects/shenyu/_index.md
+++ b/content/zh/projects/shenyu/_index.md
@@ -42,10 +42,22 @@ sidebar:
link: 'register-center-design'
- title: '流量控制'
link: 'flow-control'
+ - title: '运维部署'
+ sub:
+ - title: '本地部署'
+ link: 'deployment-local'
+ - title: '源码包部署'
+ link: 'deployment-package'
+ - title: 'Docker部署'
+ link: 'deployment-docker'
+ - title: 'Kubernetes部署'
+ link: 'deployment-k8s'
+ - title: 'Helm部署'
+ link: 'deployment-helm'
+ - title: '自定义部署'
+ link: 'deployment-custom'
- title: '快速开始'
sub:
- - title: '环境搭建'
- link: 'shenyu-set-up'
- title: 'Dubbo代理'
link: 'quick-start-dubbo'
- title: 'Http代理'
@@ -73,20 +85,20 @@ sidebar:
link: 'dictionary-management'
- title: '权限管理'
link: 'authority-management'
- - title: 'Http代理'
+ - title: '客户端接入'
+ link: 'register-center-access'
+ - title: 'Http用户'
link: 'http-proxy'
- - title: 'Dubbo代理'
+ - title: 'Dubbo用户'
link: 'dubbo-proxy'
- - title: 'SpringCloud代理'
+ - title: 'SpringCloud用户'
link: 'spring-cloud-proxy'
- - title: 'Sofa代理'
+ - title: 'Sofa用户'
link: 'sofa-rpc-proxy'
- title: '插件集合'
sub:
- title: 'Http 处理'
sub:
- - title: 'Divide插件'
- link: 'divide-plugin'
- title: 'Rewrite插件'
link: 'rewrite-plugin'
- title: 'Redirect插件'
@@ -101,6 +113,8 @@ sidebar:
link: 'modify-response-plugin'
- title: 'RPC 代理'
sub:
+ - title: 'Divide插件'
+ link: 'divide-plugin'
- title: 'Dubbo插件'
link: 'dubbo-plugin'
- title: 'Spring Cloud插件'
diff --git a/content/zh/projects/shenyu/deployment-custom/index.md b/content/zh/projects/shenyu/deployment-custom/index.md
new file mode 100644
index 0000000..46c2fed
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-custom/index.md
@@ -0,0 +1,77 @@
+---
+title: 自定义搭建网关
+keywords: Apache ShenYu Deployment
+description: 自定义搭建网关
+---
+
+本文介绍如何基于 `Apache ShenYu` 搭建属于你自己的网关。
+
+
+### 启动Apache ShenYu Admin
+
+* docker 用户参考 docker部署 Apache ShenYu Admin
+
+* liunx/windows 用户参考源码部署 Apache ShenYu Admin
+
+### 搭建自己的网关(推荐)
+
+* 首先新建一个空的 `springboot` 项目,可以参考 `shenyu-bootstrap`, 也可以在 [spring 官网](https://spring.io/quickstart) 创建。
+
+* 引入如下`jar`包:
+
+```xml
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-webflux</artifactId>
+ <version>2.2.2.RELEASE</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ <version>2.2.2.RELEASE</version>
+ </dependency>
+
+ <!--shenyu gateway start-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-gateway</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!--shenyu data sync start use websocket-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-sync-data-websocket</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+```
+
+其中, `${project.version}` 请使用当前最新版本。
+
+* 在你的 `application.yaml` 文件中加上如下配置:
+
+```yaml
+spring:
+ main:
+ allow-bean-definition-overriding: true
+
+management:
+ health:
+ defaults:
+ enabled: false
+shenyu:
+ sync:
+ websocket :
+ urls: ws://localhost:9095/websocket //设置成你的 shenyu-admin 地址
+```
+
+
+
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/deployment-docker/index.md b/content/zh/projects/shenyu/deployment-docker/index.md
new file mode 100644
index 0000000..2e176da
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-docker/index.md
@@ -0,0 +1,48 @@
+---
+title: docker部署
+keywords: Apache ShenYu Deployment
+description: docker部署
+---
+
+本文介绍使用docker来部署Apache ShenYu网关。
+
+### 启动Apache ShenYu Admin
+
+```
+> docker pull apache/shenyu-admin
+> docker network create shenyu
+```
+
+* 使用 `h2` 来存储后台数据:
+
+```
+> docker run -d -p 9095:9095 --net shenyu apache/shenyu-admin
+```
+
+* 使用 `MySQL` 来存储后台数据,将`mysql-connector.jar` 拷贝到 /${your_work_dir}/ext-lib:
+
+```
+docker run -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib -e "SPRING_PROFILES_ACTIVE=mysql" -e "spring.datasource.url=jdbc:mysql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false" -e "spring.datasource.user=${your_username}" -e "spring.datasource.password=${your_password}" -d -p 9095:9095 --net shenyu apache/shenyu-admin
+```
+
+另外一种方式把 `application.yml` 配置放到${your_work_dir}/conf, 然后执行以下语句:
+
+```
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf/ -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib -d -p 9095:9095 --net shenyu apache/shenyu-admin
+```
+
+### 启动Apache ShenYu Bootstrap
+
+```
+> docker network create shenyu
+> docker pull apache/shenyu-bootstrap
+> docker run -d -p 9195:9195 --net shenyu apache/shenyu-bootstrap
+```
+
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/deployment-helm/index.md b/content/zh/projects/shenyu/deployment-helm/index.md
new file mode 100644
index 0000000..8aeb9f7
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-helm/index.md
@@ -0,0 +1,14 @@
+---
+title: helm部署
+keywords: Apache ShenYu Deployment
+description: helm部署
+---
+
+本文介绍使用 `helm` 来部署 `Apache ShenYu` 网关。
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/deployment-k8s/index.md b/content/zh/projects/shenyu/deployment-k8s/index.md
new file mode 100644
index 0000000..b396ae3
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-k8s/index.md
@@ -0,0 +1,14 @@
+---
+title: k8s部署
+keywords: Apache ShenYu Deployment
+description: k8s部署
+---
+
+本文介绍使用k8s来部署Apache ShenYu网关。
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/deployment-local/index.md b/content/zh/projects/shenyu/deployment-local/index.md
new file mode 100644
index 0000000..3535583
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-local/index.md
@@ -0,0 +1,42 @@
+---
+title: 本地启动
+keywords: Apache ShenYu Deployment
+description: 本地启动
+---
+
+本文介绍本地环境启动 `Apache ShenYu` 网关。
+
+### 环境准备
+
+* 本地正确安装JDK1.8+
+* 本地正确安装Git
+* 本地正确安装Maven
+* 选择一款开发工具,比如IDEA
+
+### 下载编译代码
+
+* 下载代码
+```
+> git clone https://github.com/apache/incubator-shenyu.git
+> cd shenyu
+> mvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
+```
+
+* 使用开发工具启动 `org.apache.shenyu.admin.ShenyuAdminBootstrap`,访问 http://localhost:9095 , 默认用户名和密码分别为: `admin` 和 `123456`。
+
+ * 如果使用`h2`来存储,设置变量 `--spring.profiles.active = h2`
+
+ * 如果使用`MySQL`来存储,修改 `application.yaml` 中的 `mysql` 配置。
+
+* 使用开发工具启动 `org.apache.shenyu.bootstrap.ShenyuBootstrapApplication`。
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/deployment-package/index.md b/content/zh/projects/shenyu/deployment-package/index.md
new file mode 100644
index 0000000..edbb781
--- /dev/null
+++ b/content/zh/projects/shenyu/deployment-package/index.md
@@ -0,0 +1,51 @@
+---
+title: 源码包部署
+keywords: Apache ShenYu Deployment
+description: 源码包部署
+---
+
+本文介绍使用源码包部署 `Apache ShenYu` 网关。
+
+
+### 启动 Apache ShenYu Admin
+
+* 下载 [2.4.0](https://github.com/apache/incubator-shenyu/releases/tag/2.4.0) 下载 `apache-shenyu-admin-bin-2.4.0-RELEASE.tar.gz`
+
+* 解压缩 `apache-shenyu-admin-bin-2.4.0-RELEASE.tar.gz`。 进入 `bin` 目录。
+
+* 使用 `h2` 来存储后台数据:
+
+```
+> windows: start.bat --spring.profiles.active = h2
+
+> linux: ./start.sh --spring.profiles.active = h2
+```
+
+* 使用 `MySQL` 来存储后台数据, 进入 `/conf` 目录,修改 `application.yaml` 中 `mysql` 的配置。
+
+```
+> windows: start.bat
+
+> linux: ./start.sh
+```
+
+### 启动 Apache ShenYu Bootstrap
+
+* 下载 [2.4.0](https://github.com/apache/incubator-shenyu/releases/tag/2.4.0) 下载 `apache-shenyu-bootstrap-bin-2.4.0-RELEASE.tar.gz`
+
+* 解压缩 `apache-shenyu-bootstrap-bin-2.4.0-RELEASE.tar.gz`。 进入 bin 目录。
+
+```
+> windwos : start.bat
+
+> linux : ./start.sh
+```
+
+
+
+
+
+
+
+
+
diff --git a/content/zh/projects/shenyu/shenyu-set-up/index.md b/content/zh/projects/shenyu/shenyu-set-up/index.md
deleted file mode 100644
index 1d05cba..0000000
--- a/content/zh/projects/shenyu/shenyu-set-up/index.md
+++ /dev/null
@@ -1,190 +0,0 @@
----
-title: 环境搭建
-keywords: shenyu
-description: 环境搭建
----
-
-本文介绍如何基于 `ShenYu` 搭建属于你自己的网关。
-
-> 请确保你的机器安装了 JDK 1.8+,MySQL 5.5.20 +。
-
-## 启动 shenyu-admin
-
-### 方式一:远程下载
-
-* [2.3.0](https://github.com/apache/incubator-shenyu/releases/tag/2.3.0) 下载 `shenyu-admin-bin-2.3.0-RELEASE.tar.gz`
-
-* 解压缩 `shenyu-admin-bin-2.3.0-RELEASE.tar.gz`。 进入 `bin` 目录。
-
-* 使用 `h2` 来存储后台数据:
-
-```
-> windows: start.bat --spring.profiles.active = h2
-
-> linux: ./start.sh --spring.profiles.active = h2
-```
-
-* 使用 `MySQL` 来存储后台数据, 进入 `/conf` 目录,修改 `application.yaml` 中 `mysql` 的配置。
-
-```
-> windows: start.bat
-
-> linux: ./start.sh
-```
-
-### 方式二:docker构建
-
-```
-> docker pull dromara/shenyu-admin
-> docker network create shenyu
-```
-
-* 使用 `h2` 来存储后台数据:
-```
-> docker run -d -p 9095:9095 --net shenyu dromara/shenyu-admin
-```
-
-* 使用 `MySQL` 来存储后台数据:
-
-```
-docker run -e "SPRING_PROFILES_ACTIVE=mysql" -d -p 9095:9095 --net shenyu dromara/shenyu-admin
-```
-
-如果你想覆盖环境变量,你可以这样操作:
-
-```
-docker run -e "SPRING_PROFILES_ACTIVE=mysql" -e "spring.datasource.url=jdbc:mysql://192.168.1.9:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false" -e "spring.datasource.password=123456" -d -p 9095:9095 --net shenyu dromara/shenyu-admin
-```
-
-另外一种方式,可以挂载你本地磁盘其他目录。
-
-把你的 `application.yml` 配置放到xxx目录, 然后执行以下语句:
-
-```
-docker run -v D:\tmp\conf:/opt/shenyu-admin/conf/ -d -p 9095:9095 --net shenyu dromara/shenyu-admin
-```
-
-### 方式三:本地构建
-
-* 下载代码
-```
-> git clone https://github.com/apache/incubator-shenyu.git
-> cd shenyu
-```
-
-* 编译代码
-```
-> mvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-```
-
-* 启动 `ShenyuAdminBootstrap`。
-
- * 如果使用`h2`来存储,设置变量 `--spring.profiles.active = h2`
-
- * 如果使用`MySQL`来存储,修改 `application.yaml` 中的 `mysql` 配置。
-
-
-访问 http://localhost:9095 , 默认用户名和密码分别为: `admin` 和 `123456`。
-
-
-## 启动 shenyu-bootstrap
-
-### 方式一:远程下载
-
-* [2.3.0](https://github.com/apache/incubator-shenyu/releases/tag/2.3.0) 下载 `shenyu-bootstrap-bin-2.3.0-RELEASE.tar.gz`
-
-* 解压缩 `shenyu-bootstrap-bin-2.3.0-RELEASE.tar.gz`。 进入 bin 目录。
-
-```
-> windwos : start.bat
-
-> linux : ./start.sh
-```
-
-### 方式二:docker构建
-
-```
-> docker network create shenyu
-> docker pull dromara/shenyu-bootstrap
-> docker run -d -p 9195:9195 --net shenyu dromara/shenyu-bootstrap
-```
-
-### 方式三:本地构建
-
-* 下载代码
-```
-> git clone https://github.com/apache/incubator-shenyu.git
-> cd shenyu
-```
-
-* 编译代码
-```
-> mvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-```
-
-* 启动 `ShenyuBootstrap`。
-
-## 搭建自己的网关(推荐)
-
-* 首先新建一个空的 `springboot` 项目,可以参考 `shenyu-bootstrap`, 也可以在 [spring 官网](https://spring.io/quickstart) 创建。
-
-* 引入如下`jar`包:
-
-```xml
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
- <version>2.2.2.RELEASE</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- <version>2.2.2.RELEASE</version>
- </dependency>
-
- <!--shenyu gateway start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-gateway</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!--shenyu data sync start use websocket-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-sync-data-websocket</artifactId>
- <version>${project.version}</version>
- </dependency>
-```
-
-其中, `${project.version}` 请使用当前最新版本。
-
-* 在你的 `application.yaml` 文件中加上如下配置:
-
-```yaml
-spring:
- main:
- allow-bean-definition-overriding: true
-
-management:
- health:
- defaults:
- enabled: false
-shenyu:
- sync:
- websocket :
- urls: ws://localhost:9095/websocket //设置成你的 shenyu-admin 地址
-```
-
-你的网关环境搭建完成,启动你的项目。
-
-
-
-
-
-
-
-
-
-