You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ma...@apache.org on 2022/11/22 09:24:58 UTC

[fineract-cn-group] branch develop updated: Remove eureka & client side loadbalancing

This is an automated email from the ASF dual-hosted git repository.

manojvm pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-group.git


The following commit(s) were added to refs/heads/develop by this push:
     new 9e678b1  Remove eureka & client side loadbalancing
     new a54be42  Merge pull request #17 from BLasan/remove-eureka
9e678b1 is described below

commit 9e678b1b14b2cafc6304efa3e3d87cbd71180e0a
Author: BLasan <be...@gmail.com>
AuthorDate: Wed Jun 1 20:41:40 2022 +0530

    Remove eureka & client side loadbalancing
---
 .../fineract/cn/group/api/v1/client/GroupManager.java  |  2 +-
 .../apache/fineract/cn/group/AbstractGroupTest.java    |  1 -
 service/build.gradle                                   |  2 +-
 .../apache/fineract/cn/group/GroupConfiguration.java   |  1 -
 service/src/main/resources/application.yml             | 18 +++++++++++-------
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/api/src/main/java/org/apache/fineract/cn/group/api/v1/client/GroupManager.java b/api/src/main/java/org/apache/fineract/cn/group/api/v1/client/GroupManager.java
index 12c563d..fe4c342 100644
--- a/api/src/main/java/org/apache/fineract/cn/group/api/v1/client/GroupManager.java
+++ b/api/src/main/java/org/apache/fineract/cn/group/api/v1/client/GroupManager.java
@@ -41,7 +41,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 @SuppressWarnings("unused")
-@FeignClient(name="group-v1", path="/group/v1", configuration=CustomFeignClientsConfiguration.class)
+@FeignClient(path="/group/v1", url = "http://${kubernetes.group.service.name}:${kubernetes.group.server.port}", configuration=CustomFeignClientsConfiguration.class)
 public interface GroupManager {
 
   @RequestMapping(
diff --git a/component-test/src/main/java/org/apache/fineract/cn/group/AbstractGroupTest.java b/component-test/src/main/java/org/apache/fineract/cn/group/AbstractGroupTest.java
index 12d8b83..ca912d8 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/group/AbstractGroupTest.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/group/AbstractGroupTest.java
@@ -77,7 +77,6 @@ public class AbstractGroupTest extends SuiteTestEnvironment {
     @Configuration
     @EnableEventRecording
     @EnableFeignClients(basePackages = {"org.apache.fineract.cn.group.api.v1.client"})
-    @RibbonClient(name = APP_NAME)
     @Import({GroupConfiguration.class})
     @ComponentScan("org.apache.fineract.cn.group.listener")
     public static class TestConfiguration {
diff --git a/service/build.gradle b/service/build.gradle
index 668ce31..c6d1beb 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -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.group', name: 'api', version: project.version],
             [group: 'org.apache.fineract.cn.anubis', name: 'library', version: versions.frameworkanubis],
diff --git a/service/src/main/java/org/apache/fineract/cn/group/GroupConfiguration.java b/service/src/main/java/org/apache/fineract/cn/group/GroupConfiguration.java
index 3f16aa7..6e38a61 100644
--- a/service/src/main/java/org/apache/fineract/cn/group/GroupConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/group/GroupConfiguration.java
@@ -39,7 +39,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @SuppressWarnings("WeakerAccess")
 @Configuration
 @EnableAutoConfiguration
-@EnableDiscoveryClient
 @EnableAsync
 @EnableTenantContext
 @EnableCassandra
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index a14c2fc..508c34c 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -41,13 +41,6 @@ spring:
     config:
       enabled: false
 
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: http://localhost:8761/eureka/
-  instance:
-    homePageUrl: "http://${eureka.hostname}:2032/group/v1/"
-
 server:
   port: 2032
   contextPath: /group/v1/*
@@ -86,3 +79,14 @@ async:
 
 flyway:
   enabled: false
+
+kubernetes:
+  group:
+    service:
+      name: group-service
+    server:
+      port: 2032
+
+ribbon:
+  eureka:
+    enabled: false
\ No newline at end of file