One button upgrade in pallette?

Hi,
One of the key attraction of NR for me is the user friendliness, the GUI and making coding so much more easier and intuitive and fun. The pallete to install nodes is a game changer for me as I can confidently install nodes without having to worry that I may type something wrong in the script or installing the nodes in wrong directory (happened to me) and corrupt something.

We keep seeing posts about upgrade problems. Is there a possibility to have a one button upgrade in the pallette in NR. Understand there is an upgrade script, however, people could mistype, script could change etc. With an inbuilt update button, developers can control the upgrade process and eliminate another variable at the user end.
Thanks,
Ken

Do you mean a button to update Node-RED itself?

The problem is Node-RED doesn't know how it has been installed, so it doesn't know what commands to run in order to upgrade itself. For example, if its running in a docker container then an upgrade involves pulling a new docker image. If its a globally installed npm module, then an upgrade will require administrator/root privileges. Or it could be a locally installed npm module.

The only practical way of doing this would be to start packaging NR as a standalone installable application - with proper installers for each OS we want to run on. There are ways of doing that, but we simply don't have the resources to take on that amount of work.

Any possibility of making the install script add a node-red menu entry to re-run the script?

Hi @knolleary,
Thanks for your explanation, in my naivety, I only considered my own simple NR install instance and did not consider the wider picture and thought that is just a matter of packaging some scripts with some decision algorithms as you did with the node installation. Indeed a standalone installable application will be ideal scenario.

However I understand there are resource limitations. As it is, I consider myself lucky to be able use NR and have support without incurring any financial costs. NR is a very practical visual programming platform, I have yet to find another that even come close to NR in terms of flexibility, functionality and simplicity.

From the "about NR" (and correct me if I misread), NR is developed and managed under the JS foundation with IBM as a founding member with yourself and Dave from IBM emerging technology heading a NR team. NR currently is community focused and we are enjoying using the product and update for free. In future as NR matures, will NR evolved into a commercial product?

Thanks,
Ken

There are plenty of commercial products based on Node-RED I think. But as Node-RED itself has been donated to the JavaScript Foundation, I don't believe it ever could be or would be changed from open source.

1 Like

Sorry to unearth this topic but it is related to the last "share your project" i've posted :

Is there a solution to run the

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

From NR to update?
With an EXEC node, I tried "update-nodejs-and-nodered" and error 127 is displayed (invalid command)

I had heard that NR had to stop to update itself. This causes the script to stop, which updates it. Is this still the case now with v1.1.2? If yes, we have no solution to update NR directly from NR?

As long as you set the exec node to start its own shell, you can run things like this from Node-RED since the update is then in a separate shell to Node-RED itself and it doesn't matter if Node-RED then closes.

Should I create a shell script outside NR? It will not be 100% "made in NR"?
I admit to be incompetent when we leave Node-Red and we attack the shell script.

Not if you can embody what you want into a single command, then that isn't necessary.

If I remember rightly (I might not as I'm rather tired), the straight exec node will create a shell and should do what you want.

https://nodejs.org/docs/latest-v12.x/api/child_process.html#child_process_child_process_exec_command_options_callback

thanks for this track @TotallyInformation


wow, i'm like in front of Everest! It is not easy for a beginner to build a child_process.
Can anyone else help me?