This way uses mock data and does not require other services for development.
- Clone Metaflow UI
- Install dependencies
yarn install
- Open plugin development environment
yarn dev:plugin
. Cypress UI will open in browser in a while. - Click
index.plugin-dev.tsx
on left side of the screen. This is will show up the plugin example. - Open up
plugin-api/dev/plugins/dev-plugin/index.html
with your code editor and start developing your plugin here.Alternatively you can make a new folder (
plugin-api/dev/plugins/new-plugin
) and addindex.html
andmanifest.json
like in dev-plugin. Also make copy ofindex.plugin-dev.tsx
and updatePLUGIN_DEFINITIONS
. This is recommended so you can easily initialize this new folder as a git repo. - Before deployment add a copy of MetaflowPluginAPI.js with the plugin and make sure that index.html refers to it correctly.
- See
Deployment guide
from below
This way requires the use of the UI application and Metaflow Metadata services.
- Clone Metaflow UI
- Install dependencies
yarn install
and start up UI withyarn start
- Clone Metaflow Service
- Create a new folder to
services/ui_backend_service/plugins/installed/your-new-plugin
and addindex.html
,manifest.json
andMetaflowPluginAPI.js
. - Start up the backend service with docker-compose with plugin configurations.
PLUGINS={"your-new-plugin": {}} docker-compose -f docker-compose.development.yml up
- Run Metaflow runs with the new backend service. https://github.com/Netflix/metaflow-service
- Open UI in browser
http://localhost:3000
and start developing the plugin. Plugin should show up inrun-header
,task-details
,header
, ortop-nav
depending on the manifest.jsonslot
parameter. - See
Deployment guide
from below
Production stage plugins live on the server side. Detailed instructions at Metaflow Service docs.
- Setup GIT repo for your plugin.
- Configure
PLUGINS
variable at metaflow-service/ui_backend_service with following example.{ "plugin-example": "[email protected]:User/plugin-repo.git" }
or (all possible settings are described in Metaflow Service docs)
{ "plugin-example": { "repository": "path_to_your_repo", "ref": "1234f5a", "auth": { "user": "user", "password": "password" } } }
- Start up the service and the plugin is fetched and installed.
- Move plugin folder to
services/ui_backend_service/plugins/installed
on the backend service. - Configure
PLUGINS
variable at metaflow-service/ui_backend_service with{ "plugin-folder-name": {} }
- Start up the service