The purpose of this project is demonstrate the integration between Jboss Fuse 7 Spring Boot and Red Hat Datagrid.
JBoss Fuse Version: 7.5.0.fuse-750029-redhat-00002 Red Hat Datagrid: jboss-datagrid-7.3.0 (Infinispan 9)
Before of run this project, ensure that an instance of RHDG is running with a cache configured. The default cache expected is cache1 and can be changed in the file applicarion.properties. See the property custom.rhdg.cache.name.
To insert a key (put) in RHDG use the API http://localhost:8083/fuse/rhdg This api should send a JSON below
{
"key": "10",
"value": "Value to Key"
}
The expected result is a HTTP status 200 and a new key inserted in RHDG.
To get a Key use the API (http://localhost:8083/fuse/rhdg/{key}
The route health-check-route execute a request in the Management REST API of RHDG to get the number of actives nodes. The url is below:
http://<RHDG HOST><Management PORT>/management/subsystem/datagrid-infinispan/cache-container/<CACHE CONTAINER NAME>>/health/HEALTH?operation=resource&include-runtime=true&json.pretty=1
This API requires basic authentication. Use the username and password configured during RHDG instalation.
mvn clean spring-boot:run
Use this template to create a configMap:
oc create -f configMap.yml
oc policy add-role-to-user view system:serviceaccount:openshift:fuse-sb-rhdg-quickstart-s2i-7
To deploy on OpenShift
mvn clean fabric8:deploy -Popenshift