Skip to content
Permalink
Browse files
Remove eureka & client side loadbalancing
  • Loading branch information
BLasan committed May 27, 2022
1 parent c7896d6 commit 4108e108d9586318a07af737da5ef5ffcd7dfd69
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 16 deletions.
@@ -17,6 +17,7 @@
# under the License.
#
FROM openjdk:8-jdk-alpine AS builder

RUN mkdir builddir
COPY . builddir
WORKDIR builddir
@@ -39,7 +39,7 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "teller-v1", path = "/teller/v1", configuration = CustomFeignClientsConfiguration.class)
@FeignClient(path = "/teller/v1", url = "http://${kubernetes.teller.service.name}:${kubernetes.teller.server.port}", configuration = CustomFeignClientsConfiguration.class)
public interface TellerManager {

@RequestMapping(
@@ -63,7 +63,7 @@ public class AbstractTellerTest extends SuiteTestEnvironment {
@Configuration
@EnableEventRecording
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.teller.api.v1.client"})
@RibbonClient(name = APP_NAME)
// @RibbonClient(name = APP_NAME)
@Import({TellerConfiguration.class})
@ComponentScan("org.apache.fineract.cn.teller.listener")
public static class TestConfiguration {
@@ -44,7 +44,7 @@ bootRepackage {
dependencies {
compile(
[group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
[group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka'],
[group: 'org.springframework.boot', name: 'spring-boot-starter-web'],
[group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'],
[group: 'org.apache.fineract.cn.teller', name: 'api', version: project.version],
[group: 'org.apache.fineract.cn.office', name: 'api', version: versions.frameworkoffice],
@@ -46,7 +46,7 @@
@SuppressWarnings("WeakerAccess")
@Configuration
@EnableAutoConfiguration
@EnableDiscoveryClient
// @EnableDiscoveryClient
@EnableAsync
@EnableTenantContext
@EnableCassandra
@@ -44,6 +44,7 @@ public OrganizationService(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger
public boolean officeExists(final String officeIdentifier) {
try {
this.organizationManager.findOfficeByIdentifier(officeIdentifier);
this.logger.info("Talked to office");
return true;
} catch (final NotFoundException nfex) {
this.logger.warn("Office {} not found.", officeIdentifier);
@@ -17,19 +17,19 @@
# under the License.
#

spring:
cloud:
discovery:
enabled: false
config:
enabled: false
#spring:
# cloud:
# discovery:
# enabled: false
# config:
# enabled: false

eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
instance:
homePageUrl: "http://${eureka.hostname}:2028/teller/v1/"
# eureka:
# client:
# serviceUrl:
# defaultZone: http://localhost:8761/eureka/
# instance:
# homePageUrl: "http://${eureka.hostname}:2028/teller/v1/"

server:
port: 2028
@@ -69,3 +69,39 @@ async:

flyway:
enabled: false

kubernetes:
teller:
service:
name: teller-service
server:
port: 2028
office:
service:
name: office-service
server:
port: 2023
accounting:
service:
name: accounting-service
server:
port: 2025
deposit:
service:
name: deposit-service
server:
port: 2027
cheque:
service:
name: cheques-service
server:
port: 2030
portfolio:
service:
name: portfolio-service
server:
port: 2026

ribbon:
eureka:
enabled: false

0 comments on commit 4108e10

Please sign in to comment.