-1

I have Pivotal cloud cache service with https URL , i can connect to the https service via gfsh .

I have a spring boot app annotated with @ClientCacheAPplication which is running on a VSI , on a seperate VSI server , on a non PCF / non cloud environment .

Is there a way to connect to the https PCC service from the spring boot client app ?

Vaidy
  • 19
  • 4

1 Answers1

0

First, you should be using Spring Boot for Apache Geode [alternatively, VMware Tanzu GemFire] (SBDG); see project page and documentation for more details.

By using SBDG, it eliminates the need to explicitly annotate your Spring Boot (and Apache Geode or GemFire ClientCache) application with SDG's @ClientCacheApplication annotation. See here for more details.

NOTE: If you are unfamiliar with SBDG, then you can follow along in the Getting Started Sample. Keep in mind that SBDG is just an extension of Spring Boot dedicated to Apache Geode (and GemFire).

I also have documentation on connecting your Spring Boot app to a Pivotal Cloud Cache (or now know as VMware Tanzu GemFire for VMs) instance.

1 particular piece of documentation that is not present in SBDG's docs is when you are running your Spring Boot application off-platform (that is when your Spring Boot app has not been deployed to Pivotal CloudFoundry (or rather, VMware Tanzu Application Service)) and you are "connecting" to the Pivotal Cloud Cache (VMware Tanzu GemFire for VMs) service on platform (that is GemFire running in PCF as PCC, or running VMW TAS as VMW Tanzu GemFire for VMs).

To do this, you need to use the new SNI Services Gateway provided by the GemFire itself. This interface allows GemFire/Geode clients (whether Spring Boot application or otherwise) to run off-platform, yet still connect to the GemFire service (PCC or VMW Tanzu GemFire for VMs) on-platform (e.g. PCF or VMW TAS).

This is also required if you are deploying your Spring Boot application in its own foundation on-platform, separately from the services foundation where the GemFire service is running. For example, if you deploy and run your Spring Boot app in the APP_A_FOUNDATION and the GemFire service is running the the SERV_2_FOUNDATION, both on-platform, then you would also need to use the GemFire SNI Service Gateway feature.

This can be configured using Spring Boot easily enough.

I have posted an internal query, reaching out to the people who have more information on this subject, and I am currently waiting to hear back from them.

Supposedly (so I was told) there is an acceptance test (SNIAcceptanceTest) that would demonstrate how this feature works and how to use, but I cannot find any references to this in the Apache Geode codebase (develop branch).

I will get back to you (in the comments below) if I hear back from anyone.

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • With a little help from my friends, I was able to find the (acceptance) tests, located here: https://github.com/apache/geode/tree/rel/v1.14.0/geode-assembly/src/acceptanceTest/java/org/apache/geode/client/sni. Feel free to refer to these tests in the Apache Geode codebase to help you with you implementation using Spring Boot. – John Blum Nov 19 '21 at 00:48
  • I am still waiting to hear back on formal documentation & examples of the SNI Services Gateway feature and support in GemFire. – John Blum Nov 19 '21 at 00:48
  • And finally, here is all the information I could acquire about configuring an off-platform Spring Boot app to connect to an on-platform GemFire service: https://github.com/pivotal-cf/PCC-Sample-App-PizzaStore#run-the-app-off-platform. If you continue to experience problems, then I encourage you to reach out to the support team at VMware, and possibly request help from the services team. – John Blum Nov 19 '21 at 18:01