[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16396700#comment-16396700 ]
ASF GitHub Bot commented on SCB-210: ------------------------------------ WillemJiang closed pull request #41: [SCB-210] update document for apollo configuration item URL: https://github.com/apache/incubator-servicecomb-website/pull/41 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/_users/cn/dynamic-config.md b/_users/cn/dynamic-config.md index 719854e..8a32b34 100644 --- a/_users/cn/dynamic-config.md +++ b/_users/cn/dynamic-config.md @@ -24,7 +24,7 @@ redirect_from: git clone https://github.com/lijasonvip/apollo-image-for-servicecomb.git cd apollo-image-for-servicecomb && docker-compose up ``` -等待出现 `Portal started. You can visit http://localhost:8070 now!` 后表示系统启动完成,可以在浏览器中访问`http://localhost:8070`进入配置中心页面。 `docker-compose`安装请参考[文档](https://docs.docker.com/compose/install/)。 +等待出现 `Portal started. You can visit http://localhost:8070 now!` 后表示系统启动完成(启动时间基于机器性能可能需要1-3分钟),可以在浏览器中访问`http://localhost:8070`进入配置中心页面。 `docker-compose`安装请参考[文档](https://docs.docker.com/compose/install/)。 ### 通过Apollo界面配置应用获取TOKEN @@ -58,21 +58,13 @@ redirect_from: ```xml <dependency> - <groupId>com.netflix.archaius</groupId> - <artifactId>archaius-core</artifactId> - </dependency> - <dependency> - <groupId>io.servicecomb</groupId> + <groupId>org.apache.servicecomb</groupId> <artifactId>config-apollo</artifactId> </dependency> ``` ### 添加配置项 ```yaml - cse: - config: - client: - serverUri: http://127.0.0.1:8070 apollo: config: serverUri: http://127.0.0.1:8070 @@ -83,7 +75,8 @@ redirect_from: token: testtoken refreshInterval: 10 ``` - `cse.config.client.serverUri`配置项填写Apollo配置中心portal服务地址,只是表示对接配置中心,`apollo.config`下的配置项是用户创建的应用参数,包括服务地址,用户名,集群,namespace,token等参数。这些参数可以在配置中心页面项目信息栏中查到。需要注意的是`refreshInterval: 10`表示应用会每隔10秒去配置中心查询一次最新的配置信息,不配置此项默认刷新周期为30秒。 + `apollo.config`下的配置项是用户创建的应用参数,包括服务地址,用户名,集群,namespace,token等参数。这些参数可以在配置中心页面项目信息栏中查到。需要注意的是`refreshInterval: 10`表示应用会每隔10秒去配置中心查询一次最新的配置信息,不配置此项默认刷新周期为30秒。 + `serviceName`对应Apollo中的第三发应用ID: `AppId`. ### 获取动态属性 diff --git a/_users/dynamic-config.md b/_users/dynamic-config.md index 2d61f7e..d5a0b84 100644 --- a/_users/dynamic-config.md +++ b/_users/dynamic-config.md @@ -24,7 +24,7 @@ Apollo services can be easily deployed and started step by step following its [o git clone https://github.com/lijasonvip/apollo-image-for-servicecomb.git cd apollo-image-for-servicecomb && docker-compose up ``` -When your console shows `Portal started. You can visit http://localhost:8070 now!` , it means the service is started and ready for use. Visit Apollo configuration pages at `http://localhost:8070` in a browser. Please refer to [Docker document](https://docs.docker.com/compose/install/) about `docker-compose`. +When your console shows `Portal started. You can visit http://localhost:8070 now!` , it means the service is started and ready for use(It could take serval minutes which depends on machines). Visit Apollo configuration pages at `http://localhost:8070` in a browser. Please refer to [Docker document](https://docs.docker.com/compose/install/) about `docker-compose`. ### Configure services and get a token @@ -58,21 +58,13 @@ Visit `http://192.168.199.1:8070/open/manage.html` and fill in application ID an ```xml <dependency> - <groupId>com.netflix.archaius</groupId> - <artifactId>archaius-core</artifactId> - </dependency> - <dependency> - <groupId>io.servicecomb</groupId> + <groupId>org.apache.servicecomb</groupId> <artifactId>config-apollo</artifactId> </dependency> ``` ### Add configurations in microservice.yaml ```yaml - cse: - config: - client: - serverUri: http://127.0.0.1:8070 apollo: config: serverUri: http://127.0.0.1:8070 @@ -83,7 +75,8 @@ Visit `http://192.168.199.1:8070/open/manage.html` and fill in application ID an token: testtoken refreshInterval: 10 ``` - Configuration `cse.config.client.serverUri` is the portal address of Apollo configuration center just the same as `apollo.config.serverUri`. Configurations under `apollo.config` are parameters of the project that users created above, including serviceName, env, clusters, namespace, token and refreshInterval. Pay attention to `refreshInterval: 10`, it means service will fetch latest configuration items every each 10 seconds, default refresh cycle is 30 second if no value is configured here. + Configurations under `apollo.config` are parameters of the project that users created above, including serviceName, env, clusters, namespace, token and refreshInterval. Pay attention to `refreshInterval: 10`, it means service will fetch latest configuration items every each 10 seconds, default refresh cycle is 30 second if no value is configured here. + `serviceName` need to be `AppId` in apollo, please pay attention to that. ### Get configurations ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use map feature to design microservice yaml file to support control flag of > config center > ----------------------------------------------------------------------------------------- > > Key: SCB-210 > URL: https://issues.apache.org/jira/browse/SCB-210 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis > Reporter: Bo Li > Assignee: Bo Li > Priority: Major > > check comment of wujimin at: > https://github.com/apache/incubator-servicecomb-java-chassis/pull/489/ -- This message was sent by Atlassian JIRA (v7.6.3#76005)