Connecting to pivotal cloud cache from a spring boot gemfire client app on non PCF (VSI) Platform - gemfire

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 ?

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.

Related

Apache Ignite with Spring framework

Does the Apache Ignite operate on a spring framework basis?
Can I register a spring controller in classpath at server remote node and use it?(using component , like #Controller)
Apache Ignite is integrated with Spring but isn't based on it.
You can register spring beans when starting remote node (using normal spring approach) and then use them from e.g. compute or distributed services.
I'm not sure if you can register beans remotely in runtime, but I don't see why not.

Service grid in a micro services environment

We are using apache ignite as a IMDG in our micro services environment.
For scalability and load balancing we are considering to use a service registry like eureka or consul which is supported by spring cloud for the deployed micro services.
There is a concept of service grid providing support for node singleton and cluster singleton in apache ignite.
I also see WCF,weblogic and JBoss to having the same sort of features.
I am trying to understand what these service grids are and if i can use them to achieve the same benefits as the eureka service registry provided by netflix and supported by spring cloud.
Can someone guide if i can achieve the same using service grid in apache ignite.
No, you cannot use Apache Ignite Service Grid for the same purposes as Eureka. Eureka is used for load balancing and service discovery over WAN. Using Ignite clusters spanning over multiple AWS zones and remote client machines is not the most efficient way of using it.
More information on Ignite Service Grid can be found here - http://apacheignite.gridgain.org/docs/service-grid
Thanks!
UPD (for the 1st comment):
You cannot (in most cases) span and effectively use Ignite over WAN networks with high latencies and lower throughput characteristics.
As far as local clusters in non-cloud environments - go ahead! This is the best environment for systems of such kind.

Deploying the Redis Broker then Redis as a service onto Cloud Foundry

So I am currently trying to deploy the Redis CF service onto Cloud Foundry which is on an Openstack IAAS and getting stuck with deploying the Redis Service Broker. Cloud Foundry is all set up (deployed using BOSH), but how to I deploy the broker? Is it pushed like an application? Do I need to change any files/manifests manually?
The documentation seemed a little light on how I would do this.
Googling "Cloud Foundry Redis service broker", the first result I find is https://github.com/pivotal-cf/cf-redis-release. This appears to document the deployment and configuration steps pretty well in its README. You will deploy the Redis service as a BOSH deployment, and this service includes the broker. You can drive that broker to register it with the Cloud Foundry service broker API as documented in that same README.
There are a couple ways to handle this.
Run open source Cloud Foundry on top of Openstack and then deploy open source Redis (or Redis Cloud, Redis Enterprise, etc.) and connect to it using User-Provided Service Instances
The easiest way is with a Service Broker (aka Pivotal Tile) as Amit describes in the previous answer. Run Pivotal Cloud Foundry on top of Openstack and then deploy a Redis Service Broker, such as Redis Enterprise Service Broker for Pivotal Cloud Foundry and connect to it as documented.
There are other Redis service providers in the The Foundry: such as a9s, IBM, Redis Labs, Pivotal and Swisscom

Legacy application to communicate with cloud foundry using RabbitMQ

I am new to cloud foundry and investigating possible ways for our legacy Java EE application to communicate asynchronously with an application running on cloud foundry.
We are doing a lot of asynchronous work already and are publishing events to Active MQ.
I know that cloud foundry has a possibility to bind with Rabbit MQ and my question is with the possibility for a cloud foundry running application to connect (listen) to an existing out of CF platform Rabbit MQ?
Any idea on other alternatives to achieve this?
Yes, that is possible. You can use a user provided service.
That allows you to inject the environment variables into your app, that are needed to connect to RabbitMQ (like host, port, vhost, username, password).
Once you create that service, you can bind it to your app. Inside your app code, you then can read the environment variables exactly the same way as you would do it, if you had used a RabbitMQ service provided by CloudFoundry.

How can I debug a spring integration / rabbitmq app on Cloud Foundry?

I have deployed a multi node application to cloud foundry, all connected via a shared rabbitmq service. The application consists of:
A grails app.
3 standalone spring-integration-amqp java apps.
All are communicating to rabbit via spring-integration-amqp, using cloud:rabbit-connection-factory.
All of the applications have the same rabbitmq service bound.
All of the applications start correctly and seem to connect to rabbit ok.
The behaviour I am seeing is that the grails app is timing out whilst waiting for a response from one of the standalone apps. This is consistent with me only starting up the grails app locally and not the message consumers.
What I am struggling with is how to debug where the problem is.
I can't see any errors in the logs
It doesn't seem possible to tunnel to the rabbitmq service in order to query the state of the queues etc.
Any ideas?
Are you pushing to cloudfoundry.com or micro cloudfoundry?
To answer your questions:
Have you tried using "vmc file"? For java web applications cloudfoundry uses tomcat as the app server and you can use that command to navigate to tomcat/logs to have a look. Maybe some stdout was redirected there.
Did you have Caldecott installed? If you did not read this doc, here it is: http://docs.cloudfoundry.com/tools/vmc/caldecott.html