tprelog / iocage-node-red

Node-RED - TrueNAS CORE Community Plugin
2 stars 5 forks source link

This plugin needs an update #10

Closed tprelog closed 2 years ago

tprelog commented 3 years ago

I think this plugin is in serious need of an update.

The thing is, I don't actually Node-RED, so I can't say what effect this would have when running the plugin update from TrueNAS.

Does anyone have an option on this... should I just leave it alone to avoid possible breaking changes?

Would you be OK having to reinstall this plugin, if that's what it takes to update?

If I introduce a breaking change, is there anything we should change? For example, should the configuration be moved to /home/node-red

Comments, suggestions and/or concerns are welcome

Ekristoffe commented 3 years ago

I think we should first check what remnant folders are available in the freenas (truenas) plugin system. For the nodejs version is should not be a problem (at least I hope not) and using the LTS node version is the best. for python, i understand python 3 use but maybe we could have both python installed but with python 3 be the default used one. (and if dependencies need python 2 for build or other they can still use it)

tprelog commented 3 years ago

Sorry I completely missed your reply


I think we should first check what remnant folders are available in the freenas (truenas) plugin system.

Sounds good to me - I ended up with /var/db/... because that's what the Emby plugin used (that was just the my starting reference, because it was the only plugin I used before I discovered Home Assistant) - my thoughts back then here was that you would use /var/bd/nodered if config was stored inside the jail. This would leave /home/nodered as an empty mount point. the idea was if you wanted to save on external dataset, you would mount it to /home/nodered and use sysrc to set the new location.

sysrc nodered_config_dir="/home/nodered

One of my problems is that I have multiple ideas to do the same thing. Sometimes I can't decide the advantage or disadvantage of one way or another when they seem to work equally the same - These cases come down to personal preference but I'm usually indifferent so I end up doing nothing, or only half something multiple times :confused:


For the nodejs version is should not be a problem (at least I hope not) and using the LTS node version is the best.

Sounds good, node12 it is.


python, i understand python 3 use but maybe we could have both python installed but with python 3 be the default used one. (and if dependencies need python 2 for build or other they can still use it)

Do you know of any Node-RED dependencies still requiring Python 2, or is this a "just in case" suggestion?

I will suggest, if there are very few Python 2 dependencies remaining or it's "just in case" - maybe we leave it out and users can just install as needed. -- If you're familiar with how Plugin UPDATES work, you may know all packages are removed before an update, and only those in the plugin's manifest get reinstalled - However, I have a function I can pull from the Home Assistant plugin, that can be used for users to add extra packages that are not included in the manifest, and have them reinstalled during the Plugin UPDATE.

I'm fine with having both if you still think that's best. Since you're using Node-RED (and I am not), I think you will have better judgment on this than me.

Ekristoffe commented 3 years ago

I will check some point and confirm later ... edit: for the folder it doesn’t really matter as long as we know where the nodes are installed ...

Node-RED Nodejs support is: 12.x Recommended
14.x Supported

Python 2 support was more an “what if” but since it has been discontinued we ça only use python 3 and let the user do it himself ...

tprelog commented 2 years ago

Hi @Ekristoffe -- Have you already, or do you plan on switching to over to TrueNAS SCALE?

I was wondering if your still using this (or any) plugins on TrueNAS CORE?

Finally, almost one year after opening this issue, I've done some very minor clean-up for this plugin. I think this will be the final update I make here. I am debating if I will publish this final update in time for TrueNAS CORE 13, or if I will just have the node-red plugin removed from TrueNAS and archive this repo.

Ekristoffe commented 2 years ago

Hello @tprelog, indedd i am still using TrueNAS CORE: image TrueNAS SCALE doesn't fit my use so I will stay on the CORE. idk if there is other user or how much this plugin is downloaded ... I just feel this plugin is really useful. If you need help I can try to maintain it (I will need to learn how it work)

tprelog commented 2 years ago

Thanks @Ekristoffe - I will go ahead publish the update... Nothing major, just small bit of clean-up and removed reference to python2.7 - I completely forgot python 2.7 has already been remove from the plugin manifest for some time by now.

If you need help I can try to maintain it (I will need to learn how it work)

I appreciate the offer. Nothing special about how this works... It's just an install script (basic bash script) - all the "plugin" stuff is handled by TrueNAS -- Anyways, it's usually not much to maintain since the steps to install node-red never change. Typically it's just keeping up to date on Node or Python versions as they change.

If you want to take over completely, you would just need to fork this repo and I could help get started with the basics of "plugins" - Otherwise I can continue to hold the repository and if somethings breaks you can report it. Since I don't use Node-Red or TrueNAS CORE any more, it would still be a huge help if you could work with me to figure out any issues.

EliasZoockt commented 1 year ago

is there a way to install nodered as plugin in truenas 13.0? can someone help me?

tprelog commented 1 year ago

@EliasZoockt - Probably best to avoid plugins in general - It's better to have a regular jail instead.

https://www.truenas.com/community/threads/ixsystems-when-are-you-going-to-stop-pretending-that-core-has-usable-plugins.104355

But yes, it is still possible to install a "plugin" version of Node-Red as well. It's been almost a year since I last used TrueNAS CORE, so I don't remember the commands right now, but I can probably help this weekend.

Ekristoffe commented 1 year ago

is there a way to install nodered as plugin in truenas 13.0?

can someone help me?

As Tprelog says, I highly recommend making a normal jail and use free bad command to install nodejs and nodered. Since the plug-in is not listed anymore you won't be able to update the jail itself and this could by a security hole in your network.

I may be able to make a how to but not anytime soon (sorry I have some private thing that must be cleaned before).