From 8d7cceeb51f446b418555ad0527a5166864a0ad9 Mon Sep 17 00:00:00 2001 From: lijasonvip Date: Fri, 9 Mar 2018 09:39:59 +0800 Subject: [PATCH] SCB-29 add README document for config-apollo Signed-off-by: lijasonvip --- samples/config-apollo-sample/README.md | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 samples/config-apollo-sample/README.md diff --git a/samples/config-apollo-sample/README.md b/samples/config-apollo-sample/README.md new file mode 100644 index 00000000000..398b8267679 --- /dev/null +++ b/samples/config-apollo-sample/README.md @@ -0,0 +1,42 @@ +## Use Apollo as Configuration Center + +To use Apollo as configuration source in ServiceComb Java Chassis services: + +* Start Apollo service and create a project to associate with Chassis service, then generate a token + + [How to use Apollo configuration center](http://servicecomb.incubator.apache.org/cn/users/dynamic-config/) + + +* Import `config-apollo` in pom: + + ```xml + + org.apache.servicecomb + config-apollo + + ``` + +* Configurations for Apollo itself in `microservice.yaml`, for example: + + ```yaml + apollo: + config: + serverUri: http://127.0.0.1:8070 #Apollo portal server address + serviceName: apollo-test #service name + env: DEV #default valueDEV + clusters: test-cluster #default value default + namespace: application #default value application + token: #get token from Apollo web pages + ``` + +* Start Chassis service and update configurations in Apollo portal service. + + [Need to start service center first](http://servicecomb.incubator.apache.org/users/setup-environment/#) + + +## More + +[Apollo Doc](https://github.com/ctripcorp/apollo/wiki) + +[Use Apollo In ServiceComb](http://servicecomb.incubator.apache.org/cn/users/dynamic-config/) +