Plugin Management (Now Available and Testing)
From AIBenchWiki
Contents |
Problem
Sometimes we have a base application which contains a set of "optional" plugins. It will be useful that the user could get the base application and install the optional plugins in a easy way.
Possible solution
Create a plugin settings file: /conf/plugins.conf [DONE]
The file will be used, by now, to enable/disable plugins
myplugin.active=false
Extend Platonos plugin manager [DONE]
- Support the (started but not yet finished) version-based plugin dependencies.
- Read the /conf/plugins.conf in order to not to start disabled plugins.
- (Study how) and make the plugin engine to report which plugins are installed, their version, dependencies and state (also if they are disabled) (public methods, or similar).
Create a new plugin: PluginManager
It adds a new panel in the Workbench's bottom zone to bring an Plugin Information Panel which:
- Shows the current available plugins, their version, and their state (diabled/enabled). [DONE]
- Allows the user to enable/disable current installed plugins, by changing their option in the /conf/plugins.conf. Changes only will take effect after AIBench restarts. [DONE]
- Allows a quick plugin update and missing dependency plugins install. [DONE]
- Allows the user to manage a plugin repository to download. The user can change the repository url and can view the plugins stored through a Plugin Repository Dialog. The Plugin Repository Dialog informs about which plugins can be installed or updated. When the plugin is downloaded/updated, AIBench should be restarted. When the user searchs for a new plugin, AIBench connects and lists the available plugins from the repository showing something like: [DONE]
Plugin name/Dependency Installed Version Repository Version Required Version Download ------------------------------------------------------------------------------------------------------------------------------ New plugin 1.5 2.0 [Update - Version 2.0] + aplugin(1.1+) 1.4 none 1.4 + bplugin(1.2) none 1.2 1.2 [Install - Version 1.2] New plugin 2 none 1.0 [Install - Version 1.0]
- The PluginManager checks the dependencies between the plugins to warn the user about inconsistencies or incompatibilities when a plugin is disabled or when a plugins is updated/installed.
Define a plugin repository specification [DONE]
Define a server with new or updated plugins (repository). A store should:
- Be available via HTTP. The URL of the store and the repository metadata file can be configured in the /conf/pluginmanager.conf.
pluginrepository.host=http://my.software.org/plugins # URL of the repository. pluginrepository.infofile=plugins.dat # File containing the repository metadata. plugininstaller.dir=plugins_install # Directory where the plugins are downloaded before being installed.
- The server should declare a metadata file with available plugins information, i.e.: http://my.software.org/plugins/plugins.dat
plugin1.uid=myplugin # The plugin UID. plugin1.name=My plugin # The name of the plugin. plugin1.version=1.1 # The version of the plugin stored in the repository. plugin1.needs=pluginA[1.5+];pluginB[1.7] # The plugins needed by the plugin (dependencies). - Optional plugin1.file=plugin1.zip # The file containing the plugin files. May be in .zip, .jar, .tar or .tar.gz format. plugin1.md5=1a2b3c4d5e6f7890 # The md5 of the file. Allows client-side validation of the downloaded files. - Optional plugin2.uid=myotherplugin plugin2.name=My other plugin plugin2.version=1.5 plugin2.file=plugin2.zip
- The client is responsible to check the current AIBench meets the dependencies.

