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.tsxon left side of the screen. This is will show up the plugin example. - Open up
plugin-api/dev/plugins/dev-plugin/index.htmlwith your code editor and start developing your plugin here.Alternatively you can make a new folder (
plugin-api/dev/plugins/new-plugin) and addindex.htmlandmanifest.jsonlike in dev-plugin. Also make copy ofindex.plugin-dev.tsxand 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 guidefrom below
This way requires the use of the UI application and Metaflow Metadata services.
- Clone Metaflow UI
- Install dependencies
yarn installand start up UI withyarn start - Clone Metaflow Service
- Create a new folder to
services/ui_backend_service/plugins/installed/your-new-pluginand addindex.html,manifest.jsonandMetaflowPluginAPI.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:3000and start developing the plugin. Plugin should show up inrun-header,task-details,header, ortop-navdepending on the manifest.jsonslotparameter. - See
Deployment guidefrom below
Production stage plugins live on the server side. Detailed instructions at Metaflow Service docs.
- Setup GIT repo for your plugin.
- Configure
PLUGINSvariable at metaflow-service/ui_backend_service with following example.{ "plugin-example": "git@github.com: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/installedon the backend service. - Configure
PLUGINSvariable at metaflow-service/ui_backend_service with{ "plugin-folder-name": {} } - Start up the service