A simple implementation to run Apache Ignite into a Spring Boot application, see org.hawkore.springframework.boot.ignite.config.IgniteConfig
for more details.
Set Apache Ignite node as server node
(clientMode=false
), enable persistence and configure IP finder on ignite-config.xml as org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder
with the kubernetes service name to find server nodes and the namespace.
<bean id="ignite-config" class="org.apache.ignite.configuration.IgniteConfiguration">
...
<!-- Explicitly configure TCP discovery SPI -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!--
Enables Kubernetes IP finder and set namespace and service name (cluster) to find SERVER nodes.
-->
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
<property name="shared" value="true" />
<property name="namespace" value="my-mule4-stack" />
<property name="serviceName" value="ignite-cluster-one-service" />
</bean>
</property>
</bean>
</property>
...
</bean>
- Namespace
my-mule4-stack
and serviceignite-cluster-one-service
for discovery, spring management and load balancing are defined in k8s configuration yaml for mandatory artifacts - See StatefulSet configuration yaml for Spring Boot Apache Ignite Server
Build docker image (docker.hawkore.com/k8s/spring-boot-apache-ignite-server:latest
):
mvn clean install -Pdocker