Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the extension in kibertnetes cluster #104

Open
hammamr opened this issue Jun 29, 2020 · 6 comments
Open

Running the extension in kibertnetes cluster #104

hammamr opened this issue Jun 29, 2020 · 6 comments
Labels
installation Issues related to setup and installation

Comments

@hammamr
Copy link

hammamr commented Jun 29, 2020

Hello Nabeel,

The POC on the local machine with QlikSense dektop and docker desktop for Windows was conclusive.
The next step is to run the extension into the enterprise kibernetes cluster.

So we created three .yaml files (deployment, service and ingress), see the attached file (yaml.zip).
Then we created the deployment, service and ingress with kubectl commands using the .yam files.

And finally we configured the Analytics connection in QMC.

However we are not able to get the extension working in QlikSense, it seems that the service is not exposed correctly.

When we expose the deployment using this kubectl command, the extension is exposed correctly and we can use it in QlikSesnse using the external IP in the analytics connection configuration in QMC.
kubectl expose deployment qliksense-qqsens-datascience --type=LoadBalancer --name=qliksense-qqsens-datascience-test-load-balancer2
Do you have an idea on how to expose the service correctly using . YAML file with a configured DNS ? Have you already run the extension in kibernetes ? Does the service support type: NodePort in the service YAML file ?

What is the protocol used in the communication between the extension and Qlik ?
Is there a simple way to check if the extension is working from commande line? for example from the kibernetes linux client machine.

Best regards.
Sidi

yaml.zip

@hammamr hammamr added the installation Issues related to setup and installation label Jun 29, 2020
@nabeel-oz
Copy link
Owner

Hi Sidi,

The communication between the SSE and Qlik is using the gRPC protocol. Last time I checked this needed some extra config for load balancing.

I don't have much experience with Kubernetes. The repository below might help. It includes PyTools and a couple of other SSE's deployed for use with Qlik Sense Enterprise on Kubernetes.

https://github.com/AnalyticsEarth/qlik-k8s-demo-resources

Cheers,
Nabeel

@hammamr
Copy link
Author

hammamr commented Sep 14, 2020

Hello Nabeel,

Finally we deployed the extension on kibernetes and it's working fine.
We had to expose the service in LoadBalancer mode, and we don't need ingress because it is not of type http/https.

However, we need to setup readinessProbe and livenessProbe for kibernetes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).

To do so, we need to execute a command to check if the extension is ready and another command to check if the extension is working.

Do you have an idea of what commands we can excute to check the readiness and liveness of the extension ?

Best Regards
Sidi

@nabeel-oz
Copy link
Owner

Hi Sidi,

Glad you have the extension running on Kubernetes.

I think you may be able to set the probes using a gRPC CLI (e.g. https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md).

You could check that the gRPC service is exposed at the given port and call the GetCapabilities function to check that the service is live.

@hammamr
Copy link
Author

hammamr commented Sep 17, 2020

Hi Nabeel,

Thanks for the answer.
I would like to know if the docker image of the extension already contains a gRPC CLI ?
Because the commands of liveness and readiness are executed inside the conatiner (POD in K8S).

Best Regards.
Sidi

@nabeel-oz
Copy link
Owner

Hi Sidi,

The docker image I publish doesn't contain a gRPC CLI, so you'd have to build a new image. You can refer to the docker files here.

You could build a new image starting with PyTools v.8.1 as the parent image.

# Use the previous version of qlik-py-tools as a parent image
FROM nabeeloz/qlik-py-tools:8.1

# Set the working directory to /qlik-py-tools/core
WORKDIR /qlik-py-tools/core

...

# Make ports 80 and 50055 available to the world outside this container
EXPOSE 80 50055

# Run __main__.py when the container launches
CMD ["python", "__main__.py"]

@hammamr
Copy link
Author

hammamr commented Oct 12, 2020

Hello,

Ok thanks, I will see to do that.
If you integrate a gRPC CLI in the next version of the image that will be great, so that we could implement liveness and readiness probes natively in kubernetes.

Best Regards.
Sidi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Issues related to setup and installation
Projects
None yet
Development

No branches or pull requests

2 participants