AiiDA Workgraph: WebUI when AiiDA is deployed on cloud

Hi all,

I’ve just found aiida-workgraph, which looks interesting. There is WebUI which can be used by bringing up a local web server
workgraph web start

However, my AiiDA instance is deployed on a Kubernetes cluster. How can I use the WebUI on this k8s cluster?

Thanks,
Hung

Hi @hungdt , the web app runs on port 8000. I think you need to create a Kubernetes service to expose the port.

Maybe @jusong.yu and @yakutovicha can comment more on how to export the port on the k8s cluster.

Thank you. That would be the way. I will try to figure it out.

I’ve just thought of it again. This solution seems not generalized. There are some number of people using aiida in my k8s cluster. Of course they are not allowed to create services to expose that port.

It could be very useful if you can integrate this WebUI into the AiiDAlab interface.

I think you made a good point. For a k8s deployment it is in general not okay to allow user to have control on expose the port from container. From the security point of view, if the port is mapped out and not used, it can be used for host any service on user which is not ideal.

One way is that in the official aiida-core docker image we pre-allocating some ports for “future major plugins” like aiida-workgraph.

However, from a more broad view, having a specific GUI only for workgraph is not a good design IMO. It would be much better that aiida provide its own GUI and the service can start with the deployment (there are some experimental phase attempts but from the team we don’t yet have agreement on which way to go and the restAPI part which is essential component for any of such solution is not ready). Then, the workgraph can either be the core part of the AiiDA GUI or as a GUI plugin.

Hi @hungdt, which part of the aiida-workgraph’s web UI are you interested in? In case you weren’t aware, the WorkGraph has a built-in widget that allows you to visualize the tasks and links inside the Jupyter Notebook, thus inside the AiiDAlab.

I like WorkGraph in the way that it can help me writing my workflow quickly and visualize directly in notebook. WorkChain takes me more time to write and is also more error-prone. I don’t care much of the GUI, I use command line most of the time.

But the GUI is useful for my students who are not skillful in computation. They can just use AiiDA on the cloud immediately. If there is GUI, they can simply interact with the simulations, check the tasks and see the results only with mouse, without typing commands.

Anyway, WorkGraph is great and is still developing. For GUI, my students can use the Process GUI from the base widgets of AiiDAlab instead.

Thanks for the work,
Hung

Yes, I agree. From user perspective, having several different UIs is confusing. I would prefer, if you choose AiiDAlab the main GUI, then WorkGraph UI also follows the format of this GUI. Thus WorkGraph can be an app or a button in AiiDAlab, then the user can just click on it and examine workflows and tasks immediately.