FlowForge Concept
FlowForge (hereinafter referred to as FF) greatly simplifies the creation and management of Node-RED instances. To achieve this, FlowForge introduces many concepts, which are essential components of FF. Understanding these concepts helps us comprehend the overall product architecture.
- Project
- Type
- stack
- Template
- Snapshot
- Deployment
- Team
- Device
Project
In FF, each Node-RED instance represents a project.
In the FF application, you can create, start, stop a project, and view its logs.
Each project represents a Node-RED instance, but different custom configurations can be used when integrating these instances.
For FF instances launched in Docker and Kubernetes, developers can enter a project by using the project name as the hostname. This means that the project name must comply with DNS security requirements, which include being composed of lowercase and uppercase letters, digits, and dashes, and cannot start with a digit.
Project Type
When creating a project, you can select a type from a list set by the administrator. For example, each type can provide different amounts of memory and CPU. In the future, more features can be set on the type.
If you are using the professional version, each type has different monthly fees (haha...).
Project Stack
The project stack can be simply understood as the properties of the project during runtime. It includes the following properties:
Node-RED version, memory, and CPU allocation. These specific details depend on how FF is run and where it is run.
The project stack can be created by the platform administrator. When a user wants to create a new project, they can choose the stack they need by selecting the project type.
Project Template
The project template describes the properties of the Node-RED instance itself, many of which are similar to Node-RED configuration files. However, it also supports setting up some pre-installed nodes.
Provides a set of default flows and changes the appearance of the editor.
In addition to the above features, project templates can also utilize certain environment variables. You can specify whether a particular environment is read-only within the project, but you cannot disable it.
(Official note: Not all features are currently implemented. Wink and smile)
Project snapshots
A project snapshot is a backup of a project at a specific point in time, encompassing flows, certificates, and runtime settings.
Snapshots can be created and deleted within the FF dashboard. Within the dashboard, you can also roll back a project to a newer snapshot.
Project deployment
Each FlowForge project deploys Node-RED, which is hosted by FlowForge within the same
domain. For a FlowForge project, there are two types of deployments:
- Hosted on FF
Currently, this type of deployment includes a single instance of Node-RED
hosted within the same domain as FlowForge and configured through project settings.
- Remote deployment
Remote deployment is created and managed using the FlowForge Device Agent.
You can bind existing devices to a project and set a target snapshot for these devices. FF will automatically deploy the snapshot to any device under the project.
Teams
Each project belongs to a team, and only members of that team have access to the Node-RED editor. Members can have different roles. Using teams to restrict permissions and isolate projects meets the requirements of multi-tenant usage scenarios.
Devices
The FF platform can manage projects running on remote devices. To achieve this, FF provides a device agent tool. Users must install it on remote devices, through which the remote devices establish a connection with the FF platform and receive updates.
Devices are registered in a team and assigned to projects within that team. Users can create a project snapshot and apply it to the device. The FF platform will deploy the snapshot to all devices under that project.
To further simplify device registration, Provisioning Tokens can be created to allow
devices to automatically connect to the team without manual registration first.
Tokens can also be configured to directly assign devices to projects within the team.
Summary
The above are several core concepts of FlowForge. Without hands-on experience, it is impossible to truly appreciate the role of each function based solely on concepts. Later, the blogger will provide practical explanations for each concept.
Leave a Reply