[Bug 25671] New: Administrators should be able to add/upload plugins from the command line
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 Bug ID: 25671 Summary: Administrators should be able to add/upload plugins from the command line Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org I want to create the following: koha-plugin-install <instance> <plugin.kpz> You'd have 1 KPZ package, and you'd be able to add/upload/install it into an instance from the command line. This would allow a sysadmin to easily automate the installation of plugins across Koha instances from the server side. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23191 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25672 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- It would also be interesting to use "koha-plugin-install <instance> <http://repo.org/releases/plugin.kpz>" That could make plugin management even easier. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Actually, I think the syntax would be "koha-plugin --install <plugin> <instance1> <instance2>" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Administrators should be |Install 1 Koha plugin for X |able to add/upload plugins |Koha instances using the |from the command line |CLI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Turns out that the easier way to do this was to create "misc/koha_plugin.pl" which will be called by koha-plugin... koha-shell -c "perl misc/koha_plugin.pl --uninstall Koha::Plugin::Com::ByWaterSolutions::CoverFlow" kohadev -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- koha-shell -c "perl misc/koha_plugin.pl --install https://github.com/bywatersolutions/koha-plugin-coverflow/releases/download/..." kohadev koha-shell -c "perl misc/koha_plugin.pl --install https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo..." kohadev koha-shell -c "perl misc/koha_plugin.pl --uninstall Koha::Plugin::Com::ByWaterSolutions::CoverFlow" kohadev koha-shell -c "perl misc/koha_plugin.pl --uninstall Koha::Plugin::Com::ByWaterSolutions::KitchenSink" kohadev -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- I'm also going to make it so that you can provide a KPZ file or an unzipped KPZ, so misc/koha_plugin.pl will be very flexible in terms of inputs. The Debian script koha-plugin will download plugins over HTTP/HTTPS, and then unpack downloaded/local KPZ files into a staging directory. The staging directory will then be copied to each instance specified. It should be pretty sweet. I want to add enable/disable options as well at some point, but that's not critical yet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- The following would work too but it wouldn't be efficient with a KPZ file or a HTTP(S) URL, because it would be re-downloading and/or re-unzipping every time: koha-foreach perl misc/koha_plugin.pl --install https://github.com/bywatersolutions/koha-plugin-coverflow/releases/download/... koha-foreach perl misc/koha_plugin.pl --uninstall Koha::Plugin::Com::ByWaterSolutions::CoverFlow That said, it could be done with an unzipped plugin. That could be interesting. You wouldn't even need a KPZ file. You could point it right at a git checkout for instance. (That could actually be really useful from a Koha plugin development point of view as well.) -- Perhaps I should rename misc/koha_plugin.pl to misc/koha_plugin_manager.pl. -- A goal of mine is to use this management feature to actually install a Koha Plugin for all my many libraries which is itself a Web-based Koha Plugin manager (inspired by the "Game Package Registry for Unity release" from Google for the Unity IDE). That Web-based Koha Plugin manager will then easily let Koha intranet users decide which plugins they want to install, but it'll only include a list of curated plugins. Alternatively, I might use this management feature to install Koha plugins which used to be local customizations, and popular third-party plugins like Bywater's CoverFlow. Ultimately, I think we need a tool like this for dealing with plugins on any kind of scale that becomes manually unmanageable (e.g. 40 instances, 80 instances, etc.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- The code is still WIP, but I probably won't get back to this for a week or two. Looking forward to getting back to this though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 107210 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107210&action=edit WIP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107210|0 |1 is obsolete| | --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Created attachment 107211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107211&action=edit WIP This is just my current work in progress. It's nearly done, but I haven't had time to complete it yet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28498 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #10 from David Cook <dcook@prosentient.com.au> --- *** This bug has been marked as a duplicate of bug 28498 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I didn't know or heard about this before. Will be looking at this code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- (In reply to Tomás Cohen Arazi from comment #11)
I didn't know or heard about this before. Will be looking at this code.
<3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25671 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30999 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org