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/shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 51382958bd apollo doc (#909)
51382958bd is described below

commit 51382958bd357d14d57393ff5a38c8eee7f57539
Author: Misaya295 <[email protected]>
AuthorDate: Fri May 19 16:16:04 2023 +0800

    apollo doc (#909)
    
    * client-config-apollo
    
    * client-config-apollo
    
    * register-access
    
    * apollo
---
 .../property-config/admin-property-config.md       |  11 +++
 .../property-config/client-property-config.md      |  24 ++++--
 .../property-config/gateway-property-config.md     |  38 ++++++---
 .../property-config/register-center-access.md      |  92 ++++++++++++++++++++-
 .../property-config/register-center-instance.md    |  15 ++--
 docs/user-guide/property-config/use-data-sync.md   |  33 ++++++++
 .../dataSync/shenyu-data-sync-admin-apollo-yml.png | Bin 0 -> 66000 bytes
 .../dataSync/shenyu-data-sync-apollo-pom.png       | Bin 0 -> 25828 bytes
 .../shenyu/register/register-apollo-admin-pom.png  | Bin 0 -> 79199 bytes
 .../shenyu/register/register-apollo-admin-yml.png  | Bin 0 -> 33607 bytes
 .../shenyu/register/register-apollo-client-pom.png | Bin 0 -> 94133 bytes
 .../shenyu/register/register-apollo-client-yml.png | Bin 0 -> 131681 bytes
 12 files changed, 187 insertions(+), 26 deletions(-)

diff --git a/docs/user-guide/property-config/admin-property-config.md 
b/docs/user-guide/property-config/admin-property-config.md
index 5e7df516ef..f3dd630d33 100644
--- a/docs/user-guide/property-config/admin-property-config.md
+++ b/docs/user-guide/property-config/admin-property-config.md
@@ -141,6 +141,17 @@ When the registerType is `consul`, the supported 
properties are as follows.
 |metadata-path                | String |  `shenyu/register`    |  No  
|Metadata path name, default is `shenyu/register`.|
 
 
+When the registerType is `apollo`, the supported properties are as follows.
+
+| Name          | Type   | Default | Required | Description          |
+|:--------------|:-------|:-------:|:--------:|:---------------------|
+| appId         | String |  null   |   Yes    | Apollo appId         |
+| namespace     | String |  null   |   Yes    | Apollo namespace     |
+| portalUrl     | String |  null   |   Yes    | Apollo portalUrl     |
+| env           | String |  null   |   Yes    | Apollo env           |
+| clusterName   | String |  null   |   Yes    | Apollo clusterName   |
+| token         | String |  null   |   Yes    | Apollo token         |
+ 
 
 ##### shenyu.sync config
 
diff --git a/docs/user-guide/property-config/client-property-config.md 
b/docs/user-guide/property-config/client-property-config.md
index 35b053f3e1..be863f087f 100644
--- a/docs/user-guide/property-config/client-property-config.md
+++ b/docs/user-guide/property-config/client-property-config.md
@@ -16,8 +16,8 @@ Set the `shenyu` property in your microservice, for example, 
in [shenyu-examples
 ```yaml
 shenyu:
   client:
-    registerType: http #zookeeper #etcd #nacos #consul
-    serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379 
#localhost:8848
+    registerType: http #zookeeper #etcd #nacos #consul #apollo
+    serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379 
#localhost:8848 #localhost:8080
     props:
       contextPath: /http
       appName: http
@@ -34,11 +34,11 @@ This section describes configurations related to client 
access. For details abou
 
 
 
-|Name                      | Type  |  Default   | Required  | Description      
                  |
-|:------------------------ |:----- |:-------: 
|:-------:|:----------------------------|
-|registerType                   |String |  http      | Yes     | Which mode to 
use for registry. Currently, http, zookeeper, etcd, consul and nacos are 
supported.|
-|serverLists                |String |  null    |  No  |Configure the address 
of the registry. In clustering, multiple addresses are separated by commas (,).|
-|props    | | |   | The value of the property varies according to the 
registerType.|
+| Name         | Type   | Default | Required | Description                     
                                                                          |
+|:-------------|:-------|:-------:|:--------:|:----------------------------------------------------------------------------------------------------------|
+| registerType | String |  http   |   Yes    | Which mode to use for registry. 
Currently, http, zookeeper, etcd, consul ,apollo and nacos are supported. |
+| serverLists  | String |  null   |    No    | Configure the address of the 
registry. In clustering, multiple addresses are separated by commas (,).     |
+| props        |        |         |          | The value of the property 
varies according to the registerType.                                           
|
 
 
 
@@ -92,5 +92,15 @@ When the registerType is `nacos`, the supported properties 
are as follows.
 |accessKey                | String |  ""    |  No  |accessKey|
 |secretKey                | String |  ""    |  No  |secretKey|
 
+When the registerType is `apollo`, the supported properties are as follows.
+
+| Name        | Type   | Default  | Required | Description |
+|:------------|:-------|:--------:|:--------:|:------------|
+| appId       | String | "shenyu" |   Yes    | appId       |
+| env         | String |    ""    |   Yes    | env         |
+| clusterName | String |    ""    |   Yes    | clusterName |
+| namespace   | String |    ""    |   Yes    | namespace   |
+| token       | String |    ""    |   Yes    | token       |
+| portalUrl   | String |    ""    |   Yes    | portalUrl   |
 
 When the registerType is `consul`, no other property configuration is 
provided. please set `spring.cloud.consul` for the configuration.
diff --git a/docs/user-guide/property-config/gateway-property-config.md 
b/docs/user-guide/property-config/gateway-property-config.md
index c207a1f488..e5970ae6a1 100644
--- a/docs/user-guide/property-config/gateway-property-config.md
+++ b/docs/user-guide/property-config/gateway-property-config.md
@@ -492,19 +492,31 @@ The following properties are configured for data 
synchronization using `http lon
 
 The following properties are configured for data synchronization using `nacos` 
:
 
-|Name                      |                      | Type  |  Default   | 
Required  | Description                        |
-|:------------------------ |:----- |:-------: 
|:-------:|:----------------------------|:---------------------------:|
-|url                |                | String |  null    | 是 |nacos url|
-|namespace                |                | String |  null    |  Yes  
|namespace|
-|username                |                | String |  null   |  No  |username|
-|password                |                | String |  null    |  No  |password|
-|acm                |                | Object | - |  No  |aliyun ACM service 
configuration.|
-| |enabled | boolean | false | No |whether to enable.|
-| |endpoint | String | null | No |ACM service address.|
-| |namespace | String | null | No |namespace.|
-| |accessKey | String | null | No |accessKey.|
-| |secretKey | String | null | No |secretKey.|
-
+|Name                      |                      | Type  |  Default   | 
Required | Description                        |
+|:------------------------ |:----- |:-------: 
|:-------:|:---------|:---------------------------:|
+|url                |                | String |  null    | Yes      |nacos url|
+|namespace                |                | String |  null    | Yes      
|namespace|
+|username                |                | String |  null   | No       
|username|
+|password                |                | String |  null    | No       
|password|
+|acm                |                | Object | - | No       |aliyun ACM 
service configuration.|
+| |enabled | boolean | false | No       |whether to enable.|
+| |endpoint | String | null | No       |ACM service address.|
+| |namespace | String | null | No       |namespace.|
+| |accessKey | String | null | No       |accessKey.|
+| |secretKey | String | null | No       |secretKey.|
+
+The following properties are configured for data synchronization using 
`apollo` :
+
+| Name        |     |  Type  | Default | Required | Description |
+|:------------|:----|:------:|:-------:|:---------|:-----------:|
+| namespace   |     | String |  null   | Yes      |  namespace  |
+| appId       |     | String |  null   | Yes      |    appId    |
+| token       |     | String |  null   | Yes      |    token    |
+| clusterName |     | String | default | Yes      |   cluster   |
+| portalUrl   |     | String |  null   | Yes      |  portalUrl  |
+| meta        |     | String |  null   | Yes      |    meta     |
+| env         |     | String |  null   | Yes      |     env     |
+    
 
 
 The following properties are configured for data synchronization using `etcd` :
diff --git a/docs/user-guide/property-config/register-center-access.md 
b/docs/user-guide/property-config/register-center-access.md
index af4a161846..9ba392e865 100644
--- a/docs/user-guide/property-config/register-center-access.md
+++ b/docs/user-guide/property-config/register-center-access.md
@@ -444,7 +444,97 @@ shenyu:
 # nacosNameSpace: nacos namespace
 ```
 
+### Apollo Registry Config
+
+#### shenyu-admin config
+
+First add the related dependencies to the `pom` file (already added by 
default) :
+
+```xml
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-register-server-apollo</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+```
+
+<img src="/img/shenyu/register/register-apollo-admin-pom.png" width="70%" 
height="60%" />
+
+
+* Then in the `yml` file, configure the registry as `apollo`, fill in the 
related `apollo` service address and parameters, and `apollo` namespace (need 
to be consistent with `shenyu-client`), the configuration information is as 
follows:
+
+
+```yaml
+shenyu:
+  register:
+    registerType: apollo #etcd #consul
+    serverLists: http://localhost:8080 #http://localhost:2379 #localhost:8848
+    props:
+      env: dev
+      appId: shenyu
+      namespaceName: application
+      clusterName: default
+      token: 0fff5645fc74ee5e0d63a6389433c8c8afc0beea31eed0279ecc1c8961d12da9
+      portalUrl: http://localhost:8070
+```
+
+<img src="/img/shenyu/register/register-apollo-admin-yml.png" width="70%" 
height="60%" />
+
+
+#### shenyu-client config
+
+The following shows the configuration information registered by `apollo` when 
the `Http` service accesses the `Apache ShenYu` gateway as a client. Other 
clients (such as `Dubbo` and `Spring Cloud`) can be configured in the same way.
+
+
+* First add dependencies to the `pom` file:
+
+```xml
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-register-client-apollo</artifactId>
+            <version>${shenyu.version}</version>
+        </dependency>
+```
+
+<img src="/img/shenyu/register/register-apollo-client-pom.png" width="70%" 
height="60%" />
+
+
+* Then in `yml` configure registration mode as `apollo`, and fill in `apollo` 
service address and related parameters, also need `apollo` namespace (need to 
be consistent with `shenyu-admin`), IP (optional, then automatically obtain the 
local IP address) and port, configuration information is as follows:
+
+```yaml
+shenyu:
+  register:
+    registerType: apollo #etcd #consul
+    serverLists: http://localhost:8080 #http://localhost:2379 #localhost:8848
+    props:
+      env: dev
+      appId: shenyu
+      namespace: application
+      clusterName: default
+      token: 0fff5645fc74ee5e0d63a6389433c8c8afc0beea31eed0279ecc1c8961d12da9
+      portalUrl: http://localhost:8070
+  client:
+    http:
+       props:
+               contextPath: /http
+               appName: http
+               port: 8188  
+               isFull: false
+# registerType : register type, set apollo 
+# serverList: when register type is apollo, add apollo address list
+# env: apollo namespace
+# appId: apollo appId
+# namespaceName: apollo namespaceName
+# clusterName: apollo clusterName
+# token: apollo opeanapi token
+# portalUrl: apollo  opeanapi portalUrl like http://localhost:8070
+# port: your project port number; apply to springmvc/tars/grpc
+# contextPath: your project's route prefix through shenyu gateway, such as 
/order ,/product etc,gateway will route based on it.
+# appName:your project name,the default value is`spring.application.name`.
+# isFull: set true means providing proxy for your entire service, or only a 
few controller. apply to springmvc/springcloud
+
+```
 
 
-In conclusion, this paper mainly describes how to connect your microservices 
(currently supporting `Http`, `Dubbo`, `Spring Cloud`, `gRPC`, `Motan`, `Sofa`, 
`Tars` and other protocols) to the `Apache ShenYu` gateway. the Apache ShenYu 
gateway support registry has `Http`, `Zookeeper`, `Etcd`, `Consul`, `Nacos` and 
so on. This paper introduces the different ways to register configuration 
information when `Http` service is used as the client to access `Apache ShenYu` 
gateway.
+In conclusion, this paper mainly describes how to connect your microservices 
(currently supporting `Http`, `Dubbo`, `Spring Cloud`, `gRPC`, `Motan`, `Sofa`, 
`Tars` and other protocols) to the `Apache ShenYu` gateway. the Apache ShenYu 
gateway support registry has `Http`, `Zookeeper`, `Etcd`, `Consul`, `Nacos`, 
`Apollo` and so on. This paper introduces the different ways to register 
configuration information when `Http` service is used as the client to access 
`Apache ShenYu` gateway.
 
diff --git a/docs/user-guide/property-config/register-center-instance.md 
b/docs/user-guide/property-config/register-center-instance.md
index cf81a67150..cc2c0633e9 100644
--- a/docs/user-guide/property-config/register-center-instance.md
+++ b/docs/user-guide/property-config/register-center-instance.md
@@ -50,18 +50,23 @@ instance:
       etcdTTL: 5 #Optional, default 5
 ```
 
-### Use consul
+### Use apollo
 
 Add the following configuration to the gateway's `yml` file:
 
 ```yaml
 instance:
     enabled: true
-    registerType: consul
-    serverLists: localhost:8848 #config with your consul address, used by the 
cluster environment, separated with (,).
+    registerType: apollo
+    serverLists: http://localhost:8080
     props:
-      consulTimeout: 3000 #Optional, default 3000
-      consulTTL: 3000 #Optional, default 3000
+      env: dev
+      appId: shenyu
+      namespace: application
+      clusterName: default
+      token: 0fff5645fc74ee5e0d63a6389433c8c8afc0beea31eed0279ecc1c8961d12da9
+      portalUrl: http://localhost:8070
 ```
 
+
 > After the configuration is complete, start the gateway and it will 
 > successfully register to the corresponding registration center.
diff --git a/docs/user-guide/property-config/use-data-sync.md 
b/docs/user-guide/property-config/use-data-sync.md
index 19bc227ae4..cae7b15e01 100644
--- a/docs/user-guide/property-config/use-data-sync.md
+++ b/docs/user-guide/property-config/use-data-sync.md
@@ -331,6 +331,39 @@ shenyu:
 
   <img src="/img/shenyu/dataSync/shenyu_consul_admin_sync_config.jpg" 
width="80%" height="70%" />
 
+### Apollo Synchronization Config
+
+* `Apache ShenYu` gateway config
+
+Add these dependencies in `pom.xml`:
+
+```xml
+<!-- apache shenyu data sync start use consul-->
+<dependency>
+  <groupId>org.apache.shenyu</groupId>
+  <artifactId>shenyu-spring-boot-starter-sync-data-apollo</artifactId>
+  <version>${project.version}</version>
+</dependency>
+```
+
+  <img src="/img/shenyu/dataSync/shenyu-data-sync-apollo-pom.png" width="80%" 
height="70%" />
+
+Add these config values in  yaml file:
+
+```yaml
+shenyu:
+  sync:
+    apollo:
+      meta: http://localhost:8080
+      appId: shenyu
+      portalUrl: http://localhost:8070
+      env: dev
+      clusterName: test
+      namespace: application
+      token: 0fff5645fc74ee5e0d63a6389433c8c8afc0beea31eed0279ecc1c8961d12da9
+```
+
+  <img src="/img/shenyu/dataSync/shenyu-data-sync-admin-apollo-yml.png" 
width="80%" height="70%" />
 
 
 > After the data synchronization strategy of Apache ShenYu gateway and 
 > shenyu-admin is reconfigured, the microservice needs to be restarted.
diff --git a/static/img/shenyu/dataSync/shenyu-data-sync-admin-apollo-yml.png 
b/static/img/shenyu/dataSync/shenyu-data-sync-admin-apollo-yml.png
new file mode 100644
index 0000000000..da0efe7c1d
Binary files /dev/null and 
b/static/img/shenyu/dataSync/shenyu-data-sync-admin-apollo-yml.png differ
diff --git a/static/img/shenyu/dataSync/shenyu-data-sync-apollo-pom.png 
b/static/img/shenyu/dataSync/shenyu-data-sync-apollo-pom.png
new file mode 100644
index 0000000000..963df1b02d
Binary files /dev/null and 
b/static/img/shenyu/dataSync/shenyu-data-sync-apollo-pom.png differ
diff --git a/static/img/shenyu/register/register-apollo-admin-pom.png 
b/static/img/shenyu/register/register-apollo-admin-pom.png
new file mode 100644
index 0000000000..2b18ce586c
Binary files /dev/null and 
b/static/img/shenyu/register/register-apollo-admin-pom.png differ
diff --git a/static/img/shenyu/register/register-apollo-admin-yml.png 
b/static/img/shenyu/register/register-apollo-admin-yml.png
new file mode 100644
index 0000000000..cc5375401e
Binary files /dev/null and 
b/static/img/shenyu/register/register-apollo-admin-yml.png differ
diff --git a/static/img/shenyu/register/register-apollo-client-pom.png 
b/static/img/shenyu/register/register-apollo-client-pom.png
new file mode 100644
index 0000000000..6c977fb4ef
Binary files /dev/null and 
b/static/img/shenyu/register/register-apollo-client-pom.png differ
diff --git a/static/img/shenyu/register/register-apollo-client-yml.png 
b/static/img/shenyu/register/register-apollo-client-yml.png
new file mode 100644
index 0000000000..33d831a28d
Binary files /dev/null and 
b/static/img/shenyu/register/register-apollo-client-yml.png differ

Reply via email to