Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

[SCB-1200] Omega support discovery service consul#431

Merged
WillemJiang merged 4 commits intoapache:masterfrom
coolbeevip:SCB-1200
Mar 15, 2019
Merged

[SCB-1200] Omega support discovery service consul#431
WillemJiang merged 4 commits intoapache:masterfrom
coolbeevip:SCB-1200

Conversation

@coolbeevip
Copy link
Member

add dependencies

<dependency>
        <groupId>org.apache.servicecomb.pack</groupId>
        <artifactId>omega-spring-cloud-consul-starter</artifactId>
</dependency>

add consul paramters

alpha:
  cluster:
    address: localhost:8080
    serviceId: servicecomb-alpha-server
    register:
      type: consul

omega:
  instance:
    instanceId: ${spring.application.name}-${spring.cloud.client.hostname}-${server.port}

spring:
  cloud:
    consul:
      host: 0.0.0.0
      port: 8500
      discovery:
        serviceName: {spring.application.name}
        healthCheckPath: /health
        healthCheckInterval: 10s
        instanceId: ${spring.application.name}-${server.host}-${server.port}

You can see the following log

801  INFO [booking-service,,,] 13797 [main] o.a.s.p.omega.spring.OmegaSpringConfig.alphaClusterConfig : Discovery alpha cluster address 0.0.0.0:8080 from CONSUL

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 90.375% when pulling c33cc8e on coolbeevip:SCB-1200 into 79f3435 on apache:master.

Copy link
Member

@WillemJiang WillemJiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to updated the accept test for this consul discovery endpoint.

@WillemJiang WillemJiang merged commit 10742bb into apache:master Mar 15, 2019
@coolbeevip
Copy link
Member Author

We need to updated the accept test for this consul discovery endpoint.

coming soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants