We will consider two deployment modes: stateful and stateless. Stateless deployments are suitable for in-memory use cases where your cluster keeps the application data in RAM for better performance. This instruction was written using kubectl version 1. Creating cluster my-cluster in us-west Cluster is being health-checked master is healthy
|Published (Last):||21 April 2012|
|PDF File Size:||5.67 Mb|
|ePub File Size:||4.79 Mb|
|Price:||Free* [*Free Regsitration Required]|
We will consider two deployment modes: stateful and stateless. Stateless deployments are suitable for in-memory use cases where your cluster keeps the application data in RAM for better performance. This instruction was written using kubectl version 1. Creating cluster my-cluster in us-west Cluster is being health-checked master is healthy Kubernetes Configuration Kubernetes configuration involves creating the following resources: A namespace A ConfigMap for the node configuration file A ConfigMap for the license file if you use Enterprise or Ultimate Edition A service to be used for discovery and load balancing when external apps connect to the cluster A configuration for pods running GridGain nodes Creating Namespace Create a unique namespace for your deployment.
Create the namespace using the following command: kubectl create namespace gridgain Creating Service The Kubernetes service is used for auto-discovery and as a load-balancer for external applications that will connect to your cluster. Using these addresses, the new node will be able to discover all cluster nodes. The following file is an example of a cluster role: cluster-role. This will allow you to keep a single instance of the configuration file for all nodes.
Choose one of the tabs below, depending on whether you use persistence or not. Using these addresses, the new node will be able to discover all other cluster nodes. The file will look like this: node-configuration. These directories will be mounted in each pod that runs a GridGain node. Volume configuration is part of the pod configuration. Add other properties as required for your use case. To create the ConfigMap, run the following command in the directory with the node-configuration.
You can provide the license file as a link to a remote resource, or you can mount the file to each pod. See the example in the Creating Pod Configuration section. The --from-file option must point to an existing license file. See the example in the Creating Pod Configuration section below. Creating Pod Configuration Now we will create a configuration for pods. In the case of stateless deployment, we will use a Deployment. For a stateful deployment, we will use a StatefulSet. If you want to use Enterprise or Ultimate Edition, change the spec.
Use the configuration file from the ConfigMap we created earlier. The volume type will depend on the cloud provider. You can have more control over the volume type by defining storage classes. Create the StatefulSet by running the following command: kubectl create -f statefulset. Activating the Cluster If you deployed a stateless cluster, skip this step: a cluster without persistence does not require activation. If you are using persistence, you must activate the cluster after it is started.
Scaling the Cluster You can add more nodes to the cluster by using the kubectl scale command. Make sure your GKE cluster has enough resources to add new pods. In the following example, we will bring up one more node we had two. If you reduce the number of nodes by more than the number of partition backups , you may lose data. Connecting to the Cluster If your application is also running in Kubernetes, you can use either thin clients or client nodes to connect to the cluster.
The ports are also listed in the output of the command. Connecting Client Nodes A client node requires connection to every node in the cluster. The only way to achieve this is to start a client node within Kubernetes.
Connecting with Thin Clients The following code snippet illustrates how to connect to your cluster using the java thin client.
You can use other thin clients in the same way.
GridGain for Java
Some of the topics listed in the table of contents are useful right away, and others you may not need until later or not at all, depending on your use case. GridGain is based on Ignite and adds several useful and key features so the documentation mentions Ignite features things like Ignite Persistence or Ignite Compute Grid. The documentation will notify you when a feature is specific to GridGain installations, so anything else covered in the documentation applies to both GridGain and Ignite installations. Programming Languages GridGain is available for Java,. The Java version provides the richest API. To make this guide intuitive for all developers, we adhere to the following conventions: The information provided in the guide applies to all programming languages unless noted otherwise.
This chapter explains how to install the GridGain CE binary distribution. Unzip the zip archive into the installation folder in your system. The library is used by GridGain Web Console for cluster management and monitoring needs. Optional Enable required modules. Starting a GridGain Node You can start a GridGain node from the command line using the default configuration or by passing a custom configuration file.
Google Kubernetes Engine Deployment