提交 c7da6409 编写于 作者: J Jason Song

update wiki url and refine documentation

上级 2fdca1f7
......@@ -10,7 +10,7 @@ assignees: ''
- [ ] I have checked the [discussions](https://github.com/ctripcorp/apollo/discussions)
- [ ] I have searched the [issues](https://github.com/ctripcorp/apollo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/ctripcorp/apollo/wiki/%E9%83%A8%E7%BD%B2&%E5%BC%80%E5%8F%91%E9%81%87%E5%88%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://ctripcorp.github.io/apollo/#/zh/faq/common-issues-in-deployment-and-development-phase) of this repository and believe that this is not a duplicate.
**Describe the bug**
A clear and concise description of what the bug is.
......
......@@ -10,7 +10,7 @@ assignees: ''
- [ ] 我已经检查过[discussions](https://github.com/ctripcorp/apollo/discussions)
- [ ] 我已经搜索过[issues](https://github.com/ctripcorp/apollo/issues)
- [ ] 我已经仔细检查过[FAQ](https://github.com/ctripcorp/apollo/wiki/%E9%83%A8%E7%BD%B2&%E5%BC%80%E5%8F%91%E9%81%87%E5%88%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
- [ ] 我已经仔细检查过[FAQ](https://ctripcorp.github.io/apollo/#/zh/faq/common-issues-in-deployment-and-development-phase)
**描述bug**
......
......@@ -30,7 +30,7 @@ import java.util.List;
/**
* This class contains collections of methods to access Apollo Open Api.
* <br />
* For more information, please refer <a href="https://github.com/ctripcorp/apollo/wiki/">Apollo Wiki</a>.
* For more information, please refer <a href="https://ctripcorp.github.io/apollo/#/zh/usage/apollo-open-api-platform">Apollo Wiki</a>.
*
*/
public class ApolloOpenApiClient {
......
......@@ -228,7 +228,7 @@ public class PortalConfig extends RefreshableConfig {
}
public String wikiAddress() {
return getValue("wiki.address", "https://github.com/ctripcorp/apollo/wiki");
return getValue("wiki.address", "https://ctripcorp.github.io/apollo");
}
public boolean canAppAdminCreatePrivateNamespace() {
......
......@@ -26,7 +26,7 @@
<div class="row">
<div class="col-md-6">{{'Namespace.Title' | translate }}
<small><a target="_blank"
href="https://github.com/ctripcorp/apollo/wiki/Apollo%E6%A0%B8%E5%BF%83%E6%A6%82%E5%BF%B5%E4%B9%8B%E2%80%9CNamespace%E2%80%9D">
href="https://ctripcorp.github.io/apollo/#/zh/design/apollo-core-concept-namespace">
{{'Namespace.UnderstandMore' | translate }}
</a> </small>
</div>
......
......@@ -28,11 +28,11 @@
<h6 ng-show="systemInfo.version">{{'SystemInfo.SystemVersion' | translate }}: {{systemInfo.version}}
</h6>
<h6 translate="SystemInfo.Tips1" translate-value-server-config-url="server_config.html"
translate-value-wiki-url="https://github.com/ctripcorp/apollo/wiki/%E5%88%86%E5%B8%83%E5%BC%8F%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97">
translate-value-wiki-url="https://ctripcorp.github.io/apollo/#/zh/deployment/distributed-deployment-guide">
</h6>
<h6 translate="SystemInfo.Tips2"
translate-value-wiki-url="https://github.com/ctripcorp/apollo/wiki/%E5%88%86%E5%B8%83%E5%BC%8F%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97">
translate-value-wiki-url="https://ctripcorp.github.io/apollo/#/zh/deployment/distributed-deployment-guide">
</h6>
<div ng-repeat="env in systemInfo.environments">
......
......@@ -88,44 +88,60 @@ Apollo客户端和Portal会从Meta Server获取服务的地址(IP+端口),
需要注意的是,`apollo-configservice``apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,**请不要将`apollo-configservice`和`apollo-adminservice`直接暴露在公网**
所以如果实际部署的机器有多块网卡(如docker),或者存在某些网卡的IP是Apollo客户端和Portal无法访问的(如网络安全限制),那么我们就需要在`apollo-configservice``apollo-adminservice`中做相关限制以避免Eureka将这些网卡的IP注册到Meta Server
所以如果实际部署的机器有多块网卡(如docker),或者存在某些网卡的IP是Apollo客户端和Portal无法访问的(如网络安全限制),那么我们就需要在`apollo-configservice``apollo-adminservice`中做相关配置来解决连通性问题
具体文档可以参考[Ignore Network Interfaces](http://projects.spring.io/spring-cloud/spring-cloud.html#ignore-network-interfaces)章节。具体而言,就是分别编辑[apollo-configservice/src/main/resources/application.yml](https://github.com/ctripcorp/apollo/blob/master/apollo-configservice/src/main/resources/application.yml)[apollo-adminservice/src/main/resources/application.yml](https://github.com/ctripcorp/apollo/blob/master/apollo-adminservice/src/main/resources/application.yml),然后把需要忽略的网卡加进去。
### 1.4.1 忽略某些网卡
如下面这个例子就是对于`apollo-configservice`,把docker0和veth.*的网卡在注册到Eureka时忽略掉。
可以分别修改`apollo-configservice``apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会把`docker0``veth`开头的网卡在注册到Eureka时忽略掉。
JVM System Property示例:
```properties
-Dspring.cloud.inetutils.ignoredInterfaces[0]=docker0
-Dspring.cloud.inetutils.ignoredInterfaces[1]=veth.*
```
OS Environment Variable示例:
```properties
SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0
SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.*
```
### 1.4.2 指定要注册的IP
可以分别修改`apollo-configservice``apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的IP为`1.2.3.4`
JVM System Property示例:
```properties
-Deureka.instance.ip-address=1.2.3.4
```
spring:
application:
name: apollo-configservice
profiles:
active: ${apollo_profile}
cloud:
inetutils:
ignoredInterfaces:
- docker0
- veth.*
OS Environment Variable示例:
```properties
EUREKA_INSTANCE_IP_ADDRESS=1.2.3.4
```
> 注意,对于application.yml修改时要小心,千万不要把其它信息改错了,如spring.application.name等。
另外一种方式是直接指定要注册的IP,可以修改startup.sh,通过JVM System Property在运行时传入,如`-Deureka.instance.ip-address=${指定的IP}`,也可以通过OS Environment Variable,如`EUREKA_INSTANCE_IP_ADDRESS=${指定的IP}`,或者也可以修改apollo-adminservice或apollo-configservice 的bootstrap.yml文件,加入以下配置
### 1.4.3 指定要注册的URL
``` yaml
eureka:
instance:
ip-address: ${指定的IP}
可以分别修改`apollo-configservice``apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的URL为`http://1.2.3.4:8080`
JVM System Property示例:
```properties
-Deureka.instance.homePageUrl=http://1.2.3.4:8080
-Deureka.instance.preferIpAddress=false
```
最后一种方式是直接指定要注册的IP+PORT,可以修改startup.sh,通过JVM System Property在运行时传入,如`-Deureka.instance.homePageUrl=http://${指定的IP}:${指定的Port}`,也可以通过OS Environment Variable,如`EUREKA_INSTANCE_HOME_PAGE_URL=http://${指定的IP}:${指定的Port}`,或者也可以修改apollo-adminservice或apollo-configservice 的bootstrap.yml文件,加入以下配置
OS Environment Variable示例:
``` yaml
eureka:
instance:
homePageUrl: http://${指定的IP}:${指定的Port}
preferIpAddress: false
```properties
EUREKA_INSTANCE_HOME_PAGE_URL=http://1.2.3.4:8080
EUREKA_INSTANCE_PREFER_IP_ADDRESS=false
```
做完上述修改并重启后,可以查看Eureka页面(http://${config-service-url:port})检查注册上来的IP信息是否正确。
### 1.4.4 直接指定apollo-configservice地址
如果Apollo部署在公有云上,本地开发环境无法连接,但又需要做开发测试的话,客户端可以升级到0.11.0版本及以上,然后配置[跳过Apollo Meta Server服务发现](zh/usage/java-sdk-user-guide#_1222-跳过apollo-meta-server服务发现)
......@@ -587,7 +603,7 @@ Apollo 1.7.0版本增加了基于Kubernetes原生服务发现的部署模式,
#### 2.4.1.2 添加Apollo Helm Chart仓库
```bash
$ helm repo add apollo http://ctripcorp.github.io/apollo/charts
$ helm repo add apollo https://ctripcorp.github.io/apollo/charts
$ helm search repo apollo
```
......
......@@ -11,55 +11,7 @@
### 3. admin server 或者 config server 注册了内网IP,导致portal或者client访问不了admin server或config server
分布式部署的时候,`apollo-configservice``apollo-adminservice`需要把自己的IP和端口注册到Meta Server(apollo-configservice本身)。
Apollo客户端和Portal会从Meta Server获取服务的地址(IP+端口),然后通过服务地址直接访问。
所以如果实际部署的机器有多块网卡(如docker),或者存在某些网卡的IP是Apollo客户端和Portal无法访问的(如网络安全限制),那么我们就需要在`apollo-configservice``apollo-adminservice`中做相关限制以避免Eureka将这些网卡的IP注册到Meta Server。
#### 方案一: 忽略某些网卡
具体文档可以参考[Ignore Network Interfaces](http://projects.spring.io/spring-cloud/spring-cloud.html#ignore-network-interfaces)章节。具体而言,就是分别编辑[apollo-configservice/src/main/resources/application.yml](https://github.com/ctripcorp/apollo/blob/master/apollo-configservice/src/main/resources/application.yml)[apollo-adminservice/src/main/resources/application.yml](https://github.com/ctripcorp/apollo/blob/master/apollo-adminservice/src/main/resources/application.yml),然后把需要忽略的网卡加进去。
如下面这个例子就是对于`apollo-configservice`,把docker0和veth.*的网卡在注册到Eureka时忽略掉。
```yaml
spring:
application:
name: apollo-configservice
profiles:
active: ${apollo_profile}
cloud:
inetutils:
ignoredInterfaces:
- docker0
- veth.*
```
> 注意,对于application.yml修改时要小心,千万不要把其它信息改错了,如spring.application.name等。
#### 方案二:强制指定admin server和config server向eureka注册的IP
可以修改startup.sh,通过JVM System Property在运行时传入,如`-Deureka.instance.ip-address=${指定的IP}`,或者也可以修改apollo-adminservice或apollo-configservice 的bootstrap.yml文件,加入以下配置
``` yaml
eureka:
instance:
ip-address: ${指定的IP}
```
#### 方案三:强制指定admin server和config server向eureka注册的IP和Port
可以修改startup.sh,通过JVM System Property在运行时传入,如`-Deureka.instance.homePageUrl=http://${指定的IP}:${指定的Port}`,或者也可以修改apollo-adminservice或apollo-configservice 的bootstrap.yml文件,加入以下配置
``` yaml
eureka:
instance:
homePageUrl: http://${指定的IP}:${指定的Port}
preferIpAddress: false
```
做完上述修改并重启后,可以查看Eureka页面(http://${config-service-url:port})检查注册上来的IP信息是否正确。
> 注:如果Apollo部署在公有云上,本地开发环境无法连接,但又需要做开发测试的话,客户端可以升级到0.11.0版本及以上,然后通过`-Dapollo.configService=http://config-service的公网IP:端口`来跳过meta service的服务发现,记得要对公网 SLB 设置 IP 白名单,避免数据泄露
请参考[网络策略](zh/deployment/distributed-deployment-guide?id=_14-网络策略)
### 4. Portal如何增加环境?
......
......@@ -14,7 +14,7 @@ The apollo-service and apollo-portal charts create deployments for apollo-config
## 3. Add Apollo Helm Chart Repository
```bash
$ helm repo add apollo http://ctripcorp.github.io/apollo/charts
$ helm repo add apollo https://ctripcorp.github.io/apollo/charts
$ helm search repo apollo
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册