Follow these steps
-
- install eksctl
-
- install kubectl
eksctl create cluster --name ignitecluster --nodes 2 --nodes-min 1 --nodes-max 4
Now check the cluster and the service by using commands
eksctl get cluster -n ignitecluster
kubectl get svc
create namespace
kubectl create namespace ignite
create service
kubectl create -f service.yaml
create service name
kubectl create sa ignite -n ignite
create cluster role
kubectl create -f cluster-role.yaml
create node configuration
kubectl create configmap ignite-config -n ignite --from-file=node-configuration.xml
Create the StatefulSet by running the following command:
kubectl create -f statefulset.yaml
Check if the pods were deployed correctly:
kubectl get pods -n ignite
Check if the ignite were deployed correctly (eg):
kubectl logs ignite-cluster-5b69557db6-lcglw -n ignite
Since you are using persistence, you must activate the cluster after it is started. To do that, connect to one of the pods:
kubectl exec -it <pod_name> -n ignite -- /bin/bash
Execute the following command:
/opt/ignite/apache-ignite/bin/control.sh --set-state ACTIVE --yes
scale the cluster
kubectl scale sts ignite-cluster --replicas=3 -n ignite
Get the public IP of the service:
$ kubectl describe svc ignite-service -n ignite
Name: ignite-service
Namespace: ignite
Labels: app=ignite
Annotations: <none>
Selector: app=ignite
Type: LoadBalancer
IP: 10.0.144.19
LoadBalancer Ingress: 13.86.186.145
Port: rest 8080/TCP
TargetPort: 8080/TCP
NodePort: rest 31912/TCP
Endpoints: 10.244.1.5:8080
Port: thinclients 10800/TCP
TargetPort: 10800/TCP
NodePort: thinclients 31345/TCP
Endpoints: 10.244.1.5:10800
Session Affinity: None
External Traffic Policy: Cluster
Connect to the cluster’s REST API as follows:
$ curl http://13.86.186.145:8080/ignite?cmd=version
{"successStatus":0,"error":null,"response":"2.10.0","sessionToken":null}
To start the test create a new environment ( to use python3) Follow this steps .
python3 -m venv /path/to/new/virtual/environment
source venv/bin/activate
pip3 install -r requirements.txt
and then run
python3 test_scipt.py
and then
python3 test_script_2.py