Customizing deployment to send settings.json to other nodered Instance

#1

Hi Guys. We are thinking to develop a distributed nodered cluster to make something like a Studio. My customers will draw your own flows but I want to customize the deploy button. When my customer clicks on the deploy button, I need to send the settings.json to other nodered instance.

In my case, I need only the feature to create and expose endpoints from JSON file on the backend (in a different place) and in the frontend, the nodered interface will get the settings.json dynamically from a previous request.

0 Likes

#2

While you can certainly send file contents between running node-red instances, and even replace the current settings.json file -- it will take a shutdown/restart cycle to have the new settings re-read. I don't believe there is any admin api available to change them on the fly...

0 Likes

#3

To me, it isn't a problem. I'm using Kubernetes and I can recreate any time my instances. But I don't find any example about how to do this. Do you have some examples to send data to other nodered instance?

0 Likes

#4

Wait, I'm not sure you actually mean that you want to send the "settings" file -- it sounds like you want the Deploy button to send the latest running version of the "flows.json" file, right?

Normally, the deploy button does an Http POST to the internal admin endpoint called /flows -- here is the documentation for this and all the other internal admin apis. What I have done in the past is to redirect that data to a remote node-red instance (running, of course). This causes the remote server to immediately replace its current runtime flows with the posted version, and restart the server's runtime. Is this what you are wanting to do?

0 Likes

#5

Sure! It's exactly what I want! Thanks :smiley: I'll try

0 Likes