Sunday, 1 March 2015

Obdi Splitting off Plugins Completed

All the Obdi plugins are now in their own separate git repositories. This means that after installation obdi does almost nothing, and plugin repositories need to be added.

To install plugins, obdi needs to know where to get them from. This is accomplished by adding repositories in the admin interface. The repositories hold just one important file: repodata.json. This file contains the URL(s) obdi needs to go and download the plugins. The json file for obdi-core-repository is shown below:
    "Description":"Plugin to view system jobs.",

The two plugin repositories I have are obdi-salt-repository and obdi-core-repository. These hold Salt plugins and obdi core plugins (currently the system jobs tool) respectively. These are added to obdi using the GUI as shown:

Once these are added then the Add Plugin button will display all the plugins referenced in the repodata.json files from the two repositories. A partial list is shown below:

Three new configuration variables have been added to /etc/obdi/obdi.conf to support plugins:
  1. cache_dir
    Directory to store cache files. These cache files are the git repositories that hold the repodata.json files.
  2. http_proxy
    Sets the http_proxy environment variable that will be used by git. This is the standard Linux http_proxy variable.
  3. https_proxy
    Sets the https_proxy environment variable that will be used by git. This is also the standard Linux https_proxy variable.
Plugin repositories (where the repodata.json file is) can be stored in any git repository, local to your network, public or private, although there is no way to add public keys yet but these could be added using the Linux command line. A bit more is required, like checking dependencies and version compatibility, but I think this is a good start.

This link is to a gif video that shows me adding a bunch of plugins then using the installed plugins. The bottom window is a 'tail' on /var/log/obdi.log.

Next task, documentation.