cluster activation on k8s when native persistence is enabled

classic Classic list List threaded Threaded
6 messages Options
radha radha
Reply | Threaded
Open this post in threaded view
|

cluster activation on k8s when native persistence is enabled

Hi,
   I am new to ignite usage.
   Can someone help me, how to activate the ignite cluster on k8s
environment without login to the ignite server pods to activate it by
executing the command ./control.sh --activate?

  Is there any rest api call that i can use to activate the cluster.
  Also let me know , how the cluster gets activated automatically in case of
ignite server pod restart?

Thanks in Advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: cluster activation on k8s when native persistence is enabled

If you expose the TCP connector port (default 11211), you should be able to connect to your k8s cluster using the —host parameter, e.g.,

./control.sh —host service_ip —activate

I didn’t test this, but it should work.

You don’t need to reactivate your cluster again. You do need to add and remove nodes from your baseline topology as you expand/contract your cluster. The recommendation is generally to use StatefulSets so pods are added/removed in a predictable manner.

./control.sh —host host —baseline add new_node

Finally, just to be explicit since you say you’re new to Ignite: you only need to do all this if you enable native persistence. You don’t need to define your baseline topology with a memory-only Ignite cluster.

Regards,
Stephen

On 4 Dec 2018, at 12:15, radha <[hidden email]> wrote:

Hi,
  I am new to ignite usage.
  Can someone help me, how to activate the ignite cluster on k8s
environment without login to the ignite server pods to activate it by
executing the command ./control.sh --activate?

 Is there any rest api call that i can use to activate the cluster.
 Also let me know , how the cluster gets activated automatically in case of
ignite server pod restart?

Thanks in Advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: cluster activation on k8s when native persistence is enabled

I tested it… it didn’t work. Try creating a job instead:

apiVersion: batch/v1
kind: Job
metadata:
  name: ignite-activate
spec:
  ttlSecondsAfterFinished: 100
  template:
    spec:
      containers:
      - name: ignite-image
        image: apacheignite/ignite:2.6.0
        command: ["/opt/ignite/apache-ignite-fabric/bin/control.sh", "--activate", "--host ignite"]
      restartPolicy: Never

That assumes that your Ignite service is called “ignite”. You might need the —validate=false flag since ttlSecondsAfterFinished option is still alpha.

I tested that and it does work.

Regards,
Stephen

On 5 Dec 2018, at 14:51, Stephen Darlington <[hidden email]> wrote:

If you expose the TCP connector port (default 11211), you should be able to connect to your k8s cluster using the —host parameter, e.g.,

./control.sh —host service_ip —activate

I didn’t test this, but it should work.

You don’t need to reactivate your cluster again. You do need to add and remove nodes from your baseline topology as you expand/contract your cluster. The recommendation is generally to use StatefulSets so pods are added/removed in a predictable manner.

./control.sh —host host —baseline add new_node

Finally, just to be explicit since you say you’re new to Ignite: you only need to do all this if you enable native persistence. You don’t need to define your baseline topology with a memory-only Ignite cluster.

Regards,
Stephen

On 4 Dec 2018, at 12:15, radha <[hidden email]> wrote:

Hi,
  I am new to ignite usage.
  Can someone help me, how to activate the ignite cluster on k8s
environment without login to the ignite server pods to activate it by
executing the command ./control.sh --activate?

 Is there any rest api call that i can use to activate the cluster.
 Also let me know , how the cluster gets activated automatically in case of
ignite server pod restart?

Thanks in Advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/




radha radha
Reply | Threaded
Open this post in threaded view
|

Re: cluster activation on k8s when native persistence is enabled

Thanks stephen
I will try to create a job and try this out.
Yes, i have enabled native persistence.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: cluster activation on k8s when native persistence is enabled

Hi radha,

You are able to connect to one of Ignite POD using kubectl and activate the
cluster:

/$ kubectl exec -it <pod> --namespace=<namespace> -- /bin/bash

$ cd /opt/ignite/apache-ignite-*
$ ./bin/control.sh --activate/

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
radha radha
Reply | Threaded
Open this post in threaded view
|

Re: cluster activation on k8s when native persistence is enabled

In reply to this post by stephendarlington
Hi stephen,
  Thanks for your help. It worked!!
Regards
Krupa



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/