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/06/02 16:46:13 UTC
[fineract-cn-reporting] 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-reporting.git
The following commit(s) were added to refs/heads/develop by this push:
new 9d4c34f Remove eureka & client side loadbalancing
new add58df Merge pull request #16 from BLasan/remove-eureka
9d4c34f is described below
commit 9d4c34ff119fb167634883bb1373e7225c928464
Author: BLasan <be...@gmail.com>
AuthorDate: Wed Jun 1 20:04:54 2022 +0530
Remove eureka & client side loadbalancing
---
.../cn/reporting/api/v1/client/ReportManager.java | 2 +-
.../AbstractReportingSpecificationTest.java | 1 -
service/build.gradle | 2 +-
.../reporting/service/ReportingConfiguration.java | 1 -
service/src/main/resources/application.yml | 28 ++++++++++++----------
5 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/api/src/main/java/org/apache/fineract/cn/reporting/api/v1/client/ReportManager.java b/api/src/main/java/org/apache/fineract/cn/reporting/api/v1/client/ReportManager.java
index 8cf82d5..886ae61 100644
--- a/api/src/main/java/org/apache/fineract/cn/reporting/api/v1/client/ReportManager.java
+++ b/api/src/main/java/org/apache/fineract/cn/reporting/api/v1/client/ReportManager.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@SuppressWarnings("unused")
-@FeignClient(value="reporting-v1", path="/reporting/v1", configuration = CustomFeignClientsConfiguration.class)
+@FeignClient(path="/reporting/v1", url = "http://${kubernetes.reporting.service.name}:${kubernetes.reporting.server.port}", configuration = CustomFeignClientsConfiguration.class)
public interface ReportManager {
@RequestMapping(
diff --git a/component-test/src/main/java/org/apache/fineract/cn/reporting/AbstractReportingSpecificationTest.java b/component-test/src/main/java/org/apache/fineract/cn/reporting/AbstractReportingSpecificationTest.java
index cd9a56c..7e5a8b1 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/reporting/AbstractReportingSpecificationTest.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/reporting/AbstractReportingSpecificationTest.java
@@ -51,7 +51,6 @@ public class AbstractReportingSpecificationTest extends SuiteTestEnvironment {
@Configuration
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.reporting.api.v1.client"})
- @RibbonClient(name = APP_NAME)
@Import({ReportingConfiguration.class})
public static class TestConfiguration {
public TestConfiguration() {
diff --git a/service/build.gradle b/service/build.gradle
index 015bde3..4740d26 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.reporting', 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/reporting/service/ReportingConfiguration.java b/service/src/main/java/org/apache/fineract/cn/reporting/service/ReportingConfiguration.java
index 056e1cb..1d38a97 100644
--- a/service/src/main/java/org/apache/fineract/cn/reporting/service/ReportingConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/reporting/service/ReportingConfiguration.java
@@ -39,7 +39,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@SuppressWarnings("WeakerAccess")
@Configuration
@EnableAutoConfiguration
-@EnableDiscoveryClient
@EnableApplicationName
@EnableCommandProcessing
@EnableTenantContext
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index be472cd..9b1163e 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -18,18 +18,11 @@
#
spring:
- cloud:
- discovery:
- enabled: false
- config:
- enabled: false
-
-eureka:
- client:
- serviceUrl:
- defaultZone: http://localhost:8761/eureka/
- instance:
- homePageUrl: "http://${eureka.hostname}:2029/reporting/v1/"
+ cloud:
+ discovery:
+ enabled: false
+ config:
+ enabled: false
server:
port: 2029
@@ -69,3 +62,14 @@ async:
flyway:
enabled: false
+
+kubernetes:
+ reporting:
+ service:
+ name: reporting-service
+ server:
+ port: 2029
+
+ribbon:
+ eureka:
+ enabled: false
\ No newline at end of file