hazelcast-jet

by joaquinito2051

Helm chartv1.1.0App 3.0

Hazelcast Jet is an application embeddable, distributed computing engine built on top of Hazelcast In-Memory Data Grid (IMDG). With Hazelcast IMDG providing storage functionality, Hazelcast Jet performs parallel execution to enable data-intensive applications to operate in near real-time.

About this chart

Hazelcast Jet

Hazelcast Jet is a distributed computing platform built for high-performance stream processing and fast batch processing. It embeds Hazelcast In-Memory Data Grid (IMDG) to provide a lightweight, simple-to-deploy package that includes scalable in-memory storage.

Visit jet.hazelcast.org to learn more about the architecture and use cases.

Quick Start

$ helm install <helm-repo>/hazelcast-jet

$ helm install stable/hazelcast-jet

Introduction

This chart bootstraps a Hazelcast Jet deployments on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.9+

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/hazelcast-jet

$ helm install --name my-release stable/hazelcast-jet The command deploys Hazelcast Jet on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Hazelcast chart and their default values.

ParameterDescriptionDefault
image.repositoryHazelcast Jet Image namehazelcast/hazelcast-jet
image.tagHazelcast Jet Image tag{VERSION}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an arraynil
cluster.memberCountNumber of Hazelcast Jet members2
jet.restEnable REST endpoints for Hazelcast Jet membertrue
jet.javaOptsAdditional JAVA_OPTS properties for Hazelcast Jet membernil
jet.configurationFilesHazelcast configuration files{DEFAULT_HAZELCAST_XML}
nodeSelectorHazelcast Node labels for pod assignmentnil
gracefulShutdown.enabledTurn on and off Graceful Shutdowntrue
gracefulShutdown.maxWaitSecondsMaximum time to wait for the Hazelcast Jet POD to shut down600
livenessProbe.enabledTurn on and off liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
livenessProbe.periodSecondsHow often to perform the probe10
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.3
readinessProbe.enabledTurn on and off readiness probetrue
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated30
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out1
readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.3
resourcesCPU/Memory resource requests/limitsnil
service.typeKubernetes service type ('ClusterIP', 'LoadBalancer', or 'NodePort')ClusterIP
service.portKubernetes service port5701
rbac.createEnable installing RBAC Role authorizationtrue
serviceAccount.createEnable installing Service Accounttrue
serviceAccount.nameName of Service Account, if not set, the name is generated using the fullname templatenil

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
  --set cluster.memberCount=3,serviceAccount.create=false \
    <helm-repo>/hazelcast-jet
$ helm install --name my-release \

The above command sets number of Hazelcast Jet members to 3 and disables REST endpoints.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/hazelcast-jet

$ helm install --name my-release -f values.yaml stable/hazelcast-jet

Tip: You can use the default values.yaml

Custom Hazelcast IMDG and Jet configuration

Custom Hazelcast IMDG and Hazelcast Jet configuration can be specified inside values.yaml, as the jet.configurationFiles.hazelcast.xml and jet.configurationFiles.hazelcast-jet.xml properties.

jet:
  configurationFiles:
    hazelcast.xml: |-
      <?xml version="1.0" encoding="UTF-8"?>
      <hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.10.xsd"
                     xmlns="http://www.hazelcast.com/schema/config"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
        <properties>
          <property name="hazelcast.discovery.enabled">true</property>
        </properties>
        <network>
          <join>
            <multicast enabled="false"/>
            <tcp-ip enabled="false" />
            <discovery-strategies>
              <discovery-strategy enabled="true" class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">
                <properties>
                  <property name="service-name">${serviceName}</property>
                  <property name="namespace">${namespace}</property>
                </properties>
              </discovery-strategy>
            </discovery-strategies>
          </join>
        </network>
        <!-- Custom Configuration Placeholder -->
      </hazelcast>
    hazelcast-jet.xml: |-
      <?xml version="1.0" encoding="UTF-8"?>
      <hazelcast-jet xsi:schemaLocation="http://www.hazelcast.com/schema/jet-config hazelcast-jet-config-0.8.xsd"
                    xmlns="http://www.hazelcast.com/schema/jet-config"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <instance>
              <!-- number of threads in the cooperative thread pool -->
            <cooperative-thread-count>8</cooperative-thread-count>
              <!-- period between flow control packets in milliseconds -->
            <flow-control-period>100</flow-control-period>
              <!-- number of backup copies to configure for Hazelcast IMaps used internally in a Jet job -->
            <backup-count>1</backup-count>
          </instance>
          <!-- custom properties which can be read in the user code -->
          <properties>
            <property name="custom.property">custom property</property>
          </properties>
          <edge-defaults>
              <!-- capacity of the concurrent SPSC queue between each two processors -->
            <queue-size>1024</queue-size>
              <!-- network packet size limit in bytes, only applies to distributed edges -->
            <packet-size-limit>16384</packet-size-limit>
              <!-- receive window size multiplier, only applies to distributed edges -->
            <receive-window-multiplier>3</receive-window-multiplier>
          </edge-defaults>
          <!-- whether metrics collection is enabled -->
          <metrics enabled="true">
              <!-- the number of seconds the metrics will be retained on the instance -->
              <retention-seconds>120</retention-seconds>
              <!-- the metrics collection interval in seconds -->
              <collection-interval-seconds>5</collection-interval-seconds>
              <!-- whether metrics should be collected for data structures. Metrics
                  collection can have some overhead if there is a large number of data
                  structures -->
              <metrics-for-data-structures>false</metrics-for-data-structures>
          </metrics>
      </hazelcast-jet>

Deploy hazelcast-jet with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hazelcast-jet on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthazelcast-jet is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply