Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.88 KB

File metadata and controls

44 lines (33 loc) · 1.88 KB

Spring Boot Apache Ignite Server Node

A simple implementation to run Apache Ignite into a Spring Boot application, see org.hawkore.springframework.boot.ignite.config.IgniteConfig for more details.

Ignite Configuration for Kubernetes

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>

Kubernetes artifacts

Build

Build docker image (docker.hawkore.com/k8s/spring-boot-apache-ignite-server:latest):

mvn clean install -Pdocker