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

DietPi-Software | Node-RED: Switch to a local service user install #4124

Merged
merged 5 commits into from
Feb 21, 2021

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Feb 18, 2021

Status: Review

Commit list/description:

  • DietPi-Software | Node-RED: Switch to a local service user install right into /mnt/dietpi_userdata/node-red/node_modules. This allows Node-RED to control core modules as well. Additionally add a console alias for the admin CLI which invokes the service user instance via sudo. Also do not install Python 2 anymore, everything should now work with Python 3.

+ DietPi-Software | Node-RED: Switch to a local service user install right into /mnt/dietpi_userdata/node-red/node_modules. This allows Node-RED to control core modules as well. Additionally add a console alias for the admin CLI which invokes the service user instance via sudo. Also do not install Python 2 anymore, everything should now work with Python 3.
@MichaIng
Copy link
Owner Author

MichaIng commented Feb 18, 2021

@StephanStS
Since you actively use Node-RED, could you have a look at this? We previously installed Node-RED as global Node module and command. But that does not allow full control over those initially installed Node-RED modules via its web interface. One can install new modules, update or remove them, but not the ones installed to the global system directories, of course.

It makes much more sense hence to install the modules as "nodered" user right from the start. So they are no globally available Node modules and commands, but everything is in that service users home directory. Also self updates should be possible then, but since there is no update available, I cannot see it currently.

And do you know a reason to keep installing Python 2 together with Node-RED?

And it seems the docs require a fix: https://dietpi.com/docs/software/hardware_projects/#node-red

  • It does not run on HTTPS by default
  • And http://<your.IP>:1880/ui does not exist, http://<your.IP>:1880 without /ui path is right to access the web UI, or do I misunderstand what the dashboard means and is something else required before this is available?

EDIT: Ah found it: node-red-dashboard
Then we should add an info about how to install that module.
Whoopsie, I merged the docs commit accidentally instead of creating a PR. Please review: MichaIng/DietPi-Docs@5b56e1c

@StephanStS
Copy link
Collaborator

StephanStS commented Feb 18, 2021

Whoopsie, I merged the docs commit accidentally instead of creating a PR. Please review: MichaIng/DietPi-Docs@5b56e1c

@MichaIng: I already started to change it also. :-)
My changed were done on https://github.com/StephanStS/DietPi-Docs/tree/dev-StS-NodeRedEditorial.
The only thing you could do would be to change https -> http at the dashboard ui.

+ CHANGELOG | Node-RED: New installs and reinstalls with install Node-RED as local module for the "nodered" service user
+ DietPi-Software | Node-RED: npm does not install modules into the users home directory but into the current directory
+ DietPi-Software | Node-RED: Do not remove the local Node-RED install via npm, as the whole directory is removed anyway
+ CHANGELOG | Minor wording
@MichaIng
Copy link
Owner Author

I'll merge it now, as I see no issues with it, all web UI elements work perfectly fine.

@MichaIng MichaIng merged commit 27496dc into dev Feb 21, 2021
@MichaIng MichaIng deleted the node-red branch February 21, 2021 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DietPi-Software | Node-RED: Pre-installed modules cannot be updated via webUI
2 participants