You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each EMG plugins needs to be installed (or linked to) <EDGEMICRO_HOME>/plugins. A plugin is made (at a minimum) of a package.json and an index.js, which makes it looking like a legitimate NPM module.
In order to integrate an EMG custom plugin as a real legitimate NPM module (from the public NPMjs.com or from a private NPM registry), one need to install it & then symlink it into the EMG plugins folder…
...and finally edit the ~/.edgemicro/<org>-<env>-config.yaml to insert it into the plugins: list.
plugins:
sequence:
- oauth
- my-emg-plugin
These are multiple operations, both at NPM, Shell & configuration level. They could be made simpler (and less OS-specific) using only NPM & EMG configuration.
Possible Solutions
Use the NPM module resolver (load them using require(‘my-emg-plugin’) as a fallback for plugins not found into <EDGEMICRO_HOME>/plugins.
Add a manual mapping between NPM modules and EMG plugin names in ~/.edgemicro/<org>-<env>-config.yaml, like (for example) the below.
Download custom plugin & its configuration from Edge Cloud (much like Edge Cloud Call-Out policies)
Proposal (2) above adds more information in the configuration file, but gives complete control to the developer of the NPM module names (eg. can adopt a naming convention to differentiate them from other general purpose NPM modules like ‘edgemicro-plugin-my-logic’) and the EMG plugin name (eg. ‘my-logic’)
The text was updated successfully, but these errors were encountered:
Problem Statement
Each EMG plugins needs to be installed (or linked to)
<EDGEMICRO_HOME>/plugins
. A plugin is made (at a minimum) of apackage.json
and anindex.js
, which makes it looking like a legitimate NPM module.In order to integrate an EMG custom plugin as a real legitimate NPM module (from the public NPMjs.com or from a private NPM registry), one need to install it & then symlink it into the EMG plugins folder…
...and finally edit the
~/.edgemicro/<org>-<env>-config.yaml
to insert it into theplugins:
list.These are multiple operations, both at NPM, Shell & configuration level. They could be made simpler (and less OS-specific) using only NPM & EMG configuration.
Possible Solutions
require(‘my-emg-plugin’)
as a fallback for plugins not found into<EDGEMICRO_HOME>/plugins
.~/.edgemicro/<org>-<env>-config.yaml
, like (for example) the below.Recommendation
Proposal (2) above adds more information in the configuration file, but gives complete control to the developer of the NPM module names (eg. can adopt a naming convention to differentiate them from other general purpose NPM modules like ‘edgemicro-plugin-my-logic’) and the EMG plugin name (eg. ‘my-logic’)
The text was updated successfully, but these errors were encountered: