Microsoft Azure Deployment
This is a legacy Apache Ignite documentationThe new documentation is hosted here: https://ignite.apache.org/docs/latest/
Azure Kubernetes Service Deployment
The first step is to configure Azure Kubernetes Service (AKS) cluster following one of the Microsoft guidelines:
In this documentation, we're going to use Azure portal for the AKS deployment.
AKS Configuration
Once you've created a Microsoft account, navigate to https://portal.azure.com and choose Create a resource > Kubernetes Service > Create.
On the next screen specify general parameters for your deployment:
In our case, we're using IgniteCluster as a name of both Resource group and Kubernetes cluster name.
Pick the required number of nodes in your AKS cluster on the same screen:
In our case, the cluster will consist of 4 nodes each with 2 vcpus and 8 GB RAM.
Next, navigate to Networking configuration screen and set up the network the way you need. If there are no network specific parameters then feel free to use the default settings as follows:
After that, go to Monitoring configuration screen. It's suggested to have the monitoring enabled so that you can observe the state of the cluster from Azure portal:
On the next screen, set any tags you need for your applications and click on Review + create button. Double check the configuration parameters and click on the Create button.
Go to All Resources > IgniteCluster and give Azure some time to deploy the cluster for you:
Access to your Kubernetes cluster
Kubernetes Dashboard is a simple tool that helps to monitor the deployment from a local machine or another environment.
To start using the dashboard, you need to install Azure CLI. Follow these instructions if you don't have it configured.
Once Azure CLI is installed, perform the steps below.
First, get the credentials for your cluster by running the following command:
az aks get-credentials --resource-group IgniteCluster --name IgniteClusterNext, check that all the nodes are in Ready state with this command:
kubectl get nodesThe output might be as follows:
aks-agentpool-41298956-0 Ready agent 1m v1.10.3
aks-agentpool-41298956-1 Ready agent 1m v1.10.3
aks-agentpool-41298956-2 Ready agent 1m v1.10.3
aks-agentpool-41298956-3 Ready agent 1m v1.10.3Finally, launch Kubernetes dashboard by running the following command:
az aks browse --resource-group IgniteCluster --name IgniteClusterOnce the dashboard is opened, go to Cluster > Nodes to confirm that you can see all the nodes of your AKS cluster running:
Ignite Cluster Deployment
To deploy Ignite cluster within Azure Kubernetes Service you need to perform at least three steps:
- Set up RBAC authorization.
- Deploy Ignite Service that is used for Ignite nodes auto-discovery within Kubernetes and that is also used as a LoadBalancer for your external applications.
- Deploy Ignite cluster as a stateless or stateful solution.
All the yaml files required to perform these steps are provided for you on GitHub. Download these files to your Azure CLI shell.
RBAC Authorization
You need RBAC Authorization to create an Ignite-specific namespace, service account, and role. Run the following commands, in order, one-by-one:
kubectl create -f ignite-namespace.yamlkubectl create -f ignite-service-account.yamlkubectl create -f ignite-account-role.yamlkubectl create -f ignite-role-binding.yamlRefer to the RBAC Authorization guide for further details.
Once RBAC is configured open Kubernetes dashboard, go to Cluster > Roles to confirm that you have an Ignite-specific role there:
Switch the current namespace to ignite in Kubernetes dashboard by selecting Namespace > ignite. Finally, switch the current namespace for your Azure CLI connection by running the following command:
kubectl config set-context $(kubectl config current-context) --namespace=igniteIgnite Service Deployment
Deploy a special Ignite service that is used for Ignite nodes auto-discovery and as a LoadBalancer for external applications. Run the following command:
kubectl create -f ignite-service.yamlRefer to the Ignite Service guide for further details.
Once the service is deployed, go to Discovery and Load Balancing > Services to confirm that the service is observable from Kubernetes dashboard:
Ignite StatefulSet Deployment
Ignite Statefulset deployment can be used to deploy Ignite as a memory-centric database with Ignite persistence enabled. Two options are available depending upon where you wish to store the Write Ahead Log (WAL):
- Separate Disk for WAL (recommended)
- Same storage for the database and WAL files
Separate Disk for WAL
Run the following commands, in order, one-by-one:
kubectl create -f ignite-wal-storage-class.yamlkubectl create -f ignite-persistence-storage-class.yamlkubectl create -f ignite-stateful-set.yamlSame storage for the database and WAL files
Refer to the Stateful Deployment guide for further details.
Go to Cluster > Persistence Volumes to see what type of drives were allocated for the cluster. For instance, this is how the screen might look like:
StatefulSet Deployment TimeIt might take a while for Microsoft Azure to allocate requested persistence volumes and, as a result, deploy all the pods successfully. While the volumes will be being assigned, the deployment status of the pods might show the message like this -
"pod has unbound PersistentVolumeClaims (repeated 4 times)".
Once the pods are deployed try to scale out your Ignite deployment by running the following command:
kubectl scale sts ignite --replicas=4Once the cluster is scaled and the disks are mounted to the pods, you'll be able to see a screen like that after navigating to Workloads > Pods in Kubernetes dashboard:
Ignite Cluster Activation
Since we're using Ignite native persistence for our deployment we need to activate the Ignite cluster after it's started. To do that, connect to one of the pods:
kubectl exec -it ignite-0 --namespace=ignite -- /bin/bashGo to the following folder:
cd /opt/ignite/apache-ignite-fabric/bin/And activate the cluster by running the following command:
./control.sh --activateConnecting from External Applications
Let's connect to our Ignite cluster from an external application (the one that's not deployed in Kubernetes). We're going to use JDBC driver to work with Ignite using SQL interface.
First, find out what's an external address of Ignite service. For instance, you can do that by going to Discovery and Load Balancing > Services and pick an external endpoint with port number 10800 (that port is used by default for SQL drivers in Ignite).
Next, download an Ignite release, go to {ignite_release}/bin and use the following command to connect to the cluster with SQLLine tool:
./sqlline.sh --verbose=true -u jdbc:ignite:thin://{EXTERNAL_IP}:10800Once connected, preload the World Databases delivered with every Ignite release by running this command from SQLLine:
!run ../examples/sql/world.sqlAfter that, feel free to interact with your deployment by running SQL queries as follows:
SELECT country.name, city.name, MAX(city.population) as max_pop FROM country
JOIN city ON city.countrycode = country.code
WHERE country.code IN ('USA','RUS','CHN')
GROUP BY country.name, city.name ORDER BY max_pop DESC LIMIT 3;Installing Web Console
If you want to install Web Console in Kubernetes, please refer to the installation instructions.
Updated 11 months ago
