Difference between revisions of "Node-RED Installer"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
[[File:Nrinstallmods2.png| | [[File:Nrinstallmods2.png|frame|Selecting Mods to install into Node-RED]] | ||
The controls architecture is built around Node-RED and Docker, and the Node-RED Installer is the method used to set everything up. | The controls architecture is built around Node-RED and Docker, and the Node-RED Installer is the method used to set everything up. | ||
Revision as of 22:09, 29 November 2022
The controls architecture is built around Node-RED and Docker, and the Node-RED Installer is the method used to set everything up.
The concept is as follows:
- A startup flow is loaded into Node-RED and deployed.
- This flow pulls the latest files from the GitHub repository, and creates a Docker container running Node-RED on port 5099, on which it installs a Node-RED Setup flow, with access to all credentials.
- The setup flow provides a menu system to select the required Application (Node-RED flows) and Mods (additional Node-RED flows to be added to the application).
- As items are selected, they are installed, along with any missing node types and credentials, onto the original Node-RED on port 1880.
- Additional Node-RED containers, on ports 5001+, are started to implement isolated services such as data management, that may need separate access rights or updating.
- The setup container is closed.
In essence, the Node-RED Installer gives Node-RED the ability to program itself, and create new instances of Node-RED or any other software.
This method has a number of advantages:
- Entirely handled by Node-RED. Other systems are used by Node-RED, but using the same platform to orchestrate everything makes things more user friendly.
- A standard simple Node-RED flow can be used as a starting point to install any system.
https://github.com/heatweb/plumbing-controller/blob/main/flows/flows_install_installer.json
- Node-RED provides a powerful method to manage containers, with the ability to spin up temporary containers based on logic, running any services needed to boost the systems abilities.
- Credentials for both Node-RED elements and Docker containers can all be managed by the single setup container, that is killed once the system is up.
- Better updating control, with the ability to build (and rebuild) custom Node-RED flows from scratch, from a large selection of flow pages that each provide a specific function.
- Updating is performed live, without closing down existing flows. Variables are kept in memory during updates. The system can then be rebooted (if required) to clear out old variables in memory, but is generally not needed for minor updates or adding functions.
- Easier maintenance, with a set of maintained core flows (and starting points), expanded and customised as required.
- Manufacturers can develop their own flows adapted for different functions, place them into the GitHub repository, and make available to controllers at setup.
- Improved reliability, with services isolated in separate containers. Redundancy can be built into the architecture.
- Complicated setup procedures, including systems scripts, can be maintained in a Node-RED flow (stored on GitHub), deployed as needed in privileged containers, and removed.
Prerequisites:
- Node-RED on port 1880 (with Dashboard nodes installed)
- Docker