[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16328496#comment-16328496 ] ASF GitHub Bot commented on SCB-225: asifdxtreme closed pull request #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249 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/docs/README.md b/docs/README.md index 1575955f..c4f9ac77 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,3 +7,5 @@ [Contribution Guide](/docs/contribution.md) [Docker Image Guide](/docs/create-docker-image.md) + + [Deploy Service-Center in Cluster](/docs/sc-cluster.md) diff --git a/docs/sc-cluster.md b/docs/sc-cluster.md new file mode 100644 index ..1296c367 --- /dev/null +++ b/docs/sc-cluster.md @@ -0,0 +1,117 @@ +### Deploying Service-Center in Cluster Mode + +As Service-center is a stateless application so it can be seamlessly deployed in cluster mode to achieve HA. +SC is dependent on the etcd to store the microservices information so you can opt for running etcd standalone or in [cluster](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/container.md) mode. +Once you are done with installing the etcd either in cluster or standalone mode then you can follow the below steps to run the Service-Center. + +Let's assume you want to install 2 instances of Service-Center on VM with following details + +| Name| Address | +| :-: | :-: | +| VM1 | 10.12.0.1 | +| VM2 | 10.12.0.2 | + +Here we assume your etcd is running on http://10.12.0.4:2379 (you can follow [this](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/container.md) guide to install etcd in cluster mode.) + +# Step 1 +Download the SC release from [here](https://github.com/apache/incubator-servicecomb-service-center/releases) on all the VM's. +``` +# Untar the release +# tar -xvf service-center-X.X.X-linux-amd64.tar.gz + +``` + +Note: Please don't run start.sh as it will also start the etcd. + +# Step 2 +Edit the configuration of the ip/port on which SC will run and etcd ip +## VM1 +``` +# vi conf/app.conf +#Replace the below values +httpaddr = 10.12.0.1 +manager_cluster = "10.12.0.4:2379" + +# Start the Service-center +./service-center +``` + +## VM2 +``` +# vi conf/app.conf +#Replace the below values +httpaddr = 10.12.0.2 +manager_cluster = "10.12.0.4:2379" + +# Start the Service-center +./service-center +``` + +Note: In `manger_cluster` you can put the multiple instances of etcd in the cluster like +``` +manager_cluster= "10.12.0.4:2379, 10.12.0.X:2379, 10.12.0.X:2379" +``` + + Step 4 +Verify your instances +``` +# curl http://10.12.0.1:30101/v4/default/registry/health +{ +"instances": [ +{ +"instanceId": "d6e9e976f9df11e7a72b286ed488ff9f", +"serviceId": "d6e99f4cf9df11e7a72b286ed488ff9f", +"endpoints": [ +"rest://10.12.0.1:30101" +], +"hostName": "service_center_10_12_0_1", +"status": "UP", +"healthCheck": { +"mode": "push", +"interval": 30, +"times": 3 +}, +"timestamp": "1516012543", +"modTimestamp": "1516012543" +}, +{ +"instanceId": "16d4cb35f9e011e7a58a286ed488ff9f", +"serviceId": "d6e99f4cf9df11e7a72b286ed488ff9f", +"endpoints": [ +"rest://10.12.0.2:30100" +], +"hostName": "service_center_10_12_0_2", +"status": "UP", +"healthCheck": { +"mode": "push", +"interval": 30, +"times": 3 +}, +"timestamp": "1516012650", +"modTimestamp": "1516012650" +} +] +} +``` + +As we can see here the Service-Center can auto-discover all the instances of the Service-Center running in cluster, this auto-discovery feature is used by the [Java-Chassis SDK](https://github.com/apache/incubator-servicecomb-java-chassis) to auto-discover all the instances of the Service-Center by knowing atleast 1 IP of Service-Center running in cluster. + +In your microservice.yaml you can provide the SC IP of both the instance or any one instance, sdk can auto-discover other instances and use the other instances to get microservice details in case of failure of the first one. +``` +cse: + service: +registry: + address: "http://10.12.0.1:30100, http://10.12.0.2:30100; + autodiscovery: true +``` +or +``` +cse: + service: +registry: +
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326232#comment-16326232 ] ASF GitHub Bot commented on SCB-225: codecov-io commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357683331 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=h1) Report > Merging [#249](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/57c1da3d798761ba939c4521891973b2dea2026a?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/graphs/tree.svg?token=GAaF7zrg8R=pr=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #249 +/- ## === Coverage 69.43% 69.43% === Files 17 17 Lines3537 3537 === Hits 2456 2456 Misses913 913 Partials 168 168 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/service\_dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2VydmljZV9kZXBlbmRlbmN5Lmdv) | `74.78% <0%> (-0.87%)` | :arrow_down: | | [server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `76.02% <0%> (+0.58%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=footer). Last update [57c1da3...b0a20b2](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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 > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326231#comment-16326231 ] ASF GitHub Bot commented on SCB-225: coveralls commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357683193 [![Coverage Status](https://coveralls.io/builds/15053459/badge)](https://coveralls.io/builds/15053459) Coverage remained the same at 73.034% when pulling **b0a20b25bfb222dc8c5c4863cb544b7601ca744f on asifdxtreme:master** into **57c1da3d798761ba939c4521891973b2dea2026a on apache:master**. 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 > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326224#comment-16326224 ] ASF GitHub Bot commented on SCB-225: asifdxtreme commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357681246 Preview : https://github.com/asifdxtreme/incubator-servicecomb-service-center/blob/master/docs/sc-cluster.md 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 > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)