Plugin Installation

Installing custom plugins

As an authorative user perform the commands below to install a plugin:

$ # copy the plugin to the user plugin directory
$ cp myplugin.py /opt/arcapix/usr/share/apsearch/plugins/available/user

$ # make sure the 'apsearch' user has permissions to use it
$ chown apsearch:apsearch /opt/arcapix/usr/share/apsearch/plugins/available/user/myplugin.py
$ chmod 755 /opt/arcapix/usr/share/apsearch/plugins/available/user/myplugin.py

$ # create a symlink to the plugin in 'enabled' to use it in ingest
$ ln -s /opt/arcapix/usr/share/apsearch/plugins/available/user/myplugin.py /opt/arcapix/usr/share/apsearch/plugins/enabled/myplugin.py

This process will need to be repeated for all nodes which will participate in ingest.

Important

Whenever a new plugin is installed, the environment MUST be reloaded on all nodes, as described below

To uninstall a plugin, simply delete its symlink from the enabled directory.

Available plugins

Some plugins may be pre-provided in the /opt/arcapix/usr/share/apsearch/plugins/available directory.

These might include ArcaPix developed plugins, or community developed plugins, such as those available in the public github repo

The typical directory layout is

/opt/arcapix/usr/share/apsearch/plugins/
├── enabled
└── available
        ├── arcapix-core
        ├── arcapix-supported-extras
        ├── arcapix-community-extras
        └── user

As with custom plugins, these can be activated by creating symlinks in the enabled directory.

Configuring the plugin path

The plugin path should have been set to the default /opt/arcapix/usr/share/apsearch/plugins/enabled during PixStor Search install.

You can verify the configured plugin path with

$ python -m arcapix.config --get arcapix.search.metadata.plugins.path

If the path hasn’t been configured, or if you want to change the plugin path, use

$ python -m arcapix.config --set arcapix.search.metadata.plugins.path <plugin_path>

If you set/change the plugin path, you will need to restart PixStor Search (see below)

PixStor Search will only use custom plugins installed in the configured plugin path, or sub-directories of that path

Reloading the Environment

Instruct PixStor Search to register the new plugin via the following command line:

$ systemctl restart apsearch-middleware

This must be done on all ingest nodes.

Validating Plugins

It is recommended that you use the plugin validation tool on any custom plugins.

$ searchctl plugins validate /path/to/plugin.py::PluginName example_file.ext

This tool will identify common issues with plugins, and will offer advice for how to fix them.

See man searchctl-plugins-check for more details.