huaweicloud / dubbo-servicecomb

Dubbo-Serivcecomb provide extensions for Apache Dubbo to using Cloud Service Engine, so that Dubbo users can use service center, config center and governance features.
Apache License 2.0
22 stars 14 forks source link

Dubbo-Serivcecomb | 中文

NOTICE: This project is no longer in maintain. Please use it very carefully for your product.

Dubbo-Serivcecomb provide extensions for Apache Dubbo to using Cloud Service Engine, so that Dubbo users can use service center, config center and governance features.

Dubbo's versions before 2.7.x interface based discovery is used. After 2.7.x, users can also use service based discovery, which is widely used in Spring Cloud, ServiceComb and Istio.

Dubbo-ServiceComb provides service based discovery for all Dubbo's versions includes versions before 2.7.x. So that different versions of Dubbo applications can be managed by Cloud Service Engine.

Supported versions

Before reading the next contents, check the supported versions in different branch.

Branch Latest Version Dubbo Base Version Supported Dubbo Suggestions
master 2.0.0-2.7.x 2.7.8 2.7.x,Suggested upgrade to 2.7.8 or later
2.6.x 2.0.0-2.6.x 2.6.9 2.6.x,Suggested upgrade to 2.6.9 or later

Dubbo Microservice Concepts vs Dubbo-ServiceComb Concepts

In the following chapters we use Dubbo-ServiceComb Concepts.

Dubbo Governance vs Dubbo-ServiceComb Governance

When Dubbo application starts up, it registers all governance properties to register center. Users change governance properties from Dubbo Admin, and Dubbo Admin will push changes to application. The internal governance feature will read the change and follow the instructions.

Dubbo-ServiceComb registers governance properties to config center. Users change configurations throw config center, and config center will push all change to the application.

Benefits and Drawbacks

Quick Start

This quick start can be found in dubbo-servicecomb-sample.

dubbo:
  servicecomb:
    governance: {"providerInfos":[{"serviceName":"price-provider","schemaInfos":[{"schemaId":"com.huaweicloud.it.price.PriceService","parameters":{"timeout":5000}}]}]}

Using Cloud Service Engine

Change address to Cloud Service Engine address and configure HTTPS, AK/SK.

#### service center address ####
dubbo.servicecomb.registry.address=https://cse.cn-north-1.myhuaweicloud.com

#### config center address ####
dubbo.servicecomb.config.address=https://cse.cn-north-1.myhuaweicloud.com

#### enabled SSL  ####
dubbo.servicecomb.ssl.enabled=true

#### Configure AK/SK  ####
dubbo.servicecomb.credentials.enabled=true
dubbo.servicecomb.credentials.accessKey= Your access key
dubbo.servicecomb.credentials.secretKey= Your secret key
dubbo.servicecomb.credentials.project=cn-north-1

Configurations Reference

#### Microservices ####
# Application
dubbo.servicecomb.service.application=discovery
# Microservice Name
dubbo.servicecomb.service.name=price-provider
# Version, default is 1.0.0.0
dubbo.servicecomb.service.version=1.0.0
# Environment, default is Empty.  Options: development, testing, acceptance, production
# dubbo.servicecomb.service.environment=production
# Project 
# dubbo.servicecomb.service.project=
#### END

#### Microservice Instance ####
# Initial status. Options: UP, DOWN, STARTING, OUTOFSERVICE
# dubbo.servicecomb.instance.initialStatus=UP
#### END

#### service center address ####
dubbo.servicecomb.registry.address=http://127.0.0.1:30100

#### config center address ####
dubbo.servicecomb.config.address=http://127.0.0.1:30113

#### SSL options  ####
#dubbo.servicecomb.ssl.enabled=true
# ssl engine. Options JDK or OPENSSL
#dubbo.servicecomb.ssl.engine=
# ssl protocols, default to TLSv1.2
#dubbo.servicecomb.ssl.protocols=
# ssl ciphers, default to TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
#dubbo.servicecomb.ssl.ciphers=
#dubbo.servicecomb.ssl.authPeer=false
#dubbo.servicecomb.ssl.trustStore=
#dubbo.servicecomb.ssl.trustStoreType=
#dubbo.servicecomb.ssl.trustStoreValue=
#dubbo.servicecomb.ssl.keyStore=
#dubbo.servicecomb.ssl.keyStoreType=
#dubbo.servicecomb.ssl.keyStoreValue=
#dubbo.servicecomb.ssl.crl=
#dubbo.servicecomb.ssl.sslCustomClass=

#### AK/SK Options  ####
#dubbo.servicecomb.credentials.enabled=true
#dubbo.servicecomb.credentials.accessKey=
#dubbo.servicecomb.credentials.secretKey=
#dubbo.servicecomb.credentials.cipher=
#dubbo.servicecomb.credentials.project=cn-south-1