Closed torgeirl closed 3 years ago
In a kubernetes / container environment, if the plugin and data paths are stored in a persistent volume, there would be no need for this command.
From a technical standpoint, !repo install
is essentially doing a git clone
. A git clone could be executed within a Dockerfile or init container to setup your bot and it's plugins accordingly.
@sijis: this would be useful for creating container images with plugins preinstalled.
!repo install
seems to trigger the over-writable activate()
function, and default to a specific installation path (username/repo). That could easily be done by an user once the container is running, but being able to reproduce this at build is time-consuming without a CLI command.
@torgeirl I think what @sijis is saying is that you don't need a command line option to install plugins or backends. I've written a basic shell script to handle building an errbot container for the project I maintain. Perhaps you could adapt it to include the plugins you need for your errbot instance? https://github.com/nzlosh/err-stackstorm/blob/master/contrib/docker/Dockerfile
@nzlosh: thanks for the suggestion.
I ended up cloning the plugin's repo to my defined BOT_EXTRA_PLUGIN_DIR
path, and it works for my use case so I'll leave it with that.
If you feel the documentation for this capability could be improved, a PR would be most welcome.
I am...
I am running...
Errbot version: master branch (
git+https://github.com/errbotio/errbot.git@master#egg=errbot
) OS version: Debian (python:3.7-slim
container) Python version: 3.7 Using a virtual environment: no (using Docker instead) Backend:Slack
Issue description
Most of Errbot's documentation assumes direct user interaction with Errbot using either commands in a running prompt or direct chat dialog. This is problematic for a container environment, were everything should be highly re-producible and automated.
One example is the installation of an external Errbot plugin. Current options are limited:
!repos install
command, but that's tricky to automate./plugins
directory and all needed settings/data has to be configured before the bot's daemon is started.It would have be nice with a command-line option too, something like:
Since it should run as if an admin ran the
!repos install
it should be able to reuse much of the existing code.