[Koha-devel] Minimal docker images for Koha

Kyle Hall kyle.m.hall at gmail.com
Tue Feb 25 12:03:15 CET 2020


I could be mistaken as well. I was under the impression that Plack loaded
the plugin code into itself when the plugin was first run. I'm basing this
on the fact that it used to be that updating a plugin did not reflect the
updated info in the plugins table in the admin section for plugins. That
particular issue has been resolved.

I suppose the easiest way to test would be to load a plugin into a plack
enabled Koha instance, make a minor change to the plugin's perl code ( like
a warn statement or something ) and see if the change shows itself without
restarting plack. If it doesn't, then plugins are probably running under
plack.

---
http://www.kylehall.info
ByWater Solutions ( http://bywatersolutions.com )
Meadville Public Library ( http://www.meadvillelibrary.org )
Crawford County Federated Library System ( http://www.ccfls.org )


On Sun, Feb 23, 2020 at 6:01 PM <dcook at prosentient.com.au> wrote:

> It could just be that I misunderstand how the plugins work with Plack, but
> when I use Koha via CGI, this is the path that is being used:
> /plugin/Koha/Plugin/EDS/opac/
> eds-search.pl?q=Search?query-1=AND,:{test}&default=1
> <http://eds-search.pl?q=Search?query-1=AND,:%7Btest%7D&default=1>. I
> don’t think that would work using
> https://github.com/jajm/koha-docker/blob/master/master/app.psgi? I think
> just adding another mount would do the trick though?
>
>
>
> David Cook
>
> Systems Librarian
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Direct: 02 8005 0595
>
>
>
> *From:* Kyle Hall <kyle.m.hall at gmail.com>
> *Sent:* Friday, 21 February 2020 11:27 PM
> *To:* David Cook <dcook at prosentient.com.au>
> *Cc:* Julian Maurice <julian.maurice at biblibre.com>; koha-devel <
> koha-devel at lists.koha-community.org>
> *Subject:* Re: [Koha-devel] Minimal docker images for Koha
>
>
>
> Plugin code is loaded into Plack processes. Does the EDS plugin contain
> cgi scripts that wouldn't run under plack?
>
>
>
> Getting all scripts to run under plack is definitely a goal we should
> have, but a short term kludge would be to run two containers, one plack and
> one cgi, and to direct traffic from a proxy to the correct container based
> on the url. Not elegant, but functional.
>
>
>
> ---
>
> http://www.kylehall.info
> ByWater Solutions ( http://bywatersolutions.com )
> Meadville Public Library ( http://www.meadvillelibrary.org )
> Crawford County Federated Library System ( http://www.ccfls.org )
>
>
>
>
>
> On Thu, Feb 20, 2020 at 7:30 PM <dcook at prosentient.com.au> wrote:
>
> Actually, now that I think about it, I assume an Apache-less Koha would
> also lose support for web-facing OPAC plugins (like the EBSCO EDS plugin)?
>
>
>
> David Cook
>
> Systems Librarian
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Direct: 02 8005 0595
>
>
>
> *From:* Koha-devel <koha-devel-bounces at lists.koha-community.org> *On
> Behalf Of *dcook at prosentient.com.au
> *Sent:* Thursday, 20 February 2020 3:00 PM
> *To:* 'Kyle Hall' <kyle.m.hall at gmail.com>
> *Cc:* 'koha-devel' <koha-devel at lists.koha-community.org>
> *Subject:* Re: [Koha-devel] Minimal docker images for Koha
>
>
>
> Exactly! I would love to see a task queue based record importer. (I keep
> thinking about a Koha plugin to provide a web ui for scheduling OAI-PMH
> harvesting, and then third-party applications that can consume from the
> task queue, stage the records… probably via the REST API… and then enqueue
> tasks to a high performance record importer worker…)
>
>
>
> Are you going to the Hackfest in Marseille? (I wanted to go this year but
> life is just too hectic this year, although planning to go to Kohacon in
> October.) A task queue could be a great Hackfest project…
>
>
>
> David Cook
>
> Systems Librarian
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Direct: 02 8005 0595
>
>
>
> *From:* Kyle Hall <kyle.m.hall at gmail.com>
> *Sent:* Thursday, 20 February 2020 12:04 AM
> *To:* David Cook <dcook at prosentient.com.au>
> *Cc:* Julian Maurice <julian.maurice at biblibre.com>; koha-devel <
> koha-devel at lists.koha-community.org>
> *Subject:* Re: [Koha-devel] Minimal docker images for Koha
>
>
>
> Agreed! I think a task queue would be a huge benefit to Koha, we have so
> many long running batch operations.
>
>
>
> Kyle
>
>
>
> ---
>
> http://www.kylehall.info
> ByWater Solutions ( http://bywatersolutions.com )
> Meadville Public Library ( http://www.meadvillelibrary.org )
> Crawford County Federated Library System ( http://www.ccfls.org )
>
>
>
>
>
> On Tue, Feb 18, 2020 at 7:21 PM <dcook at prosentient.com.au> wrote:
>
> Funny I was just looking at
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032.
>
> One of these days we should push forward more on queues:
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417.
>
> David Cook
> Systems Librarian
> Prosentient Systems
> 72/330 Wattle St
> Ultimo, NSW 2007
> Australia
>
> Office: 02 9212 0899
> Direct: 02 8005 0595
>
> -----Original Message-----
> From: Koha-devel <koha-devel-bounces at lists.koha-community.org> On Behalf
> Of Julian Maurice
> Sent: Tuesday, 18 February 2020 11:11 PM
> To: Kyle Hall <kyle.m.hall at gmail.com>
> Cc: koha-devel <koha-devel at lists.koha-community.org>
> Subject: Re: [Koha-devel] Minimal docker images for Koha
>
> Are you talking about these files
>
> https://github.com/Koha-Community/Koha/blob/master/debian/templates/apache-shared-intranet-plack.conf#L14-L21
> ?
>
> I did nothing specific, so they are probably broken :)
>
> Le 18/02/2020 à 12:45, Kyle Hall a écrit :
> > One other question, how does this handle scripts that Koha
> > specifically does not execute using plack?
> >
> > Kyle
> >
> > ---
> > http://www.kylehall.info
> > ByWater Solutions ( http://bywatersolutions.com ) Meadville Public
> > Library ( http://www.meadvillelibrary.org ) Crawford County Federated
> > Library System ( http://www.ccfls.org )
> >
> >
> > On Tue, Feb 18, 2020 at 6:43 AM Kyle Hall <kyle.m.hall at gmail.com
> > <mailto:kyle.m.hall at gmail.com>> wrote:
> >
> >     This is fantastic Julian! The only thing I can contribute that
> >     hasn't already been said by you or David is to suggest taking a look
> >     at MiniDeb as a base image ( https://github.com/bitnami/minideb ). I
> >     would also suggest using quay.io <http://quay.io> to build and host
> >     your Docker images, as it has built in security scanning. I prefer
> >     minimal install images not for size reduction ( though it is nice ),
> >     but for the smaller attack surface they provide. Fewer things
> >     installed means fewer exploits available!
> >
> >     Kyle
> >
> >     ---
> >     http://www.kylehall.info
> >     ByWater Solutions ( http://bywatersolutions.com )
> >     Meadville Public Library ( http://www.meadvillelibrary.org )
> >     Crawford County Federated Library System ( http://www.ccfls.org )
> >
> >
> >     On Mon, Feb 17, 2020 at 12:59 PM Julian Maurice
> >     <julian.maurice at biblibre.com <mailto:julian.maurice at biblibre.com>>
> >     wrote:
> >
> >         Hi all,
> >
> >         I've been playing with docker lately, and I tried to build a
> >         minimal
> >         docker image for Koha. Here are the results.
> >
> >         My goals were:
> >         * Install only required "things" to get Koha up and running, and
> >         nothing
> >         else (no testing or dev tools),
> >         * No external dependencies except CPAN
> >         * Follow Docker best practices as much as possible
> >
> >         The resulting images are here:
> >         https://hub.docker.com/repository/docker/julianmaurice/koha
> >
> >         and the Dockerfiles are here:
> >         https://github.com/jajm/koha-docker
> >
> >         A few things worth mentioning:
> >
> >         * I tried to build the smallest image possible by using alpine
> >         or perl
> >         slim images at first but it was not that great, because the perl
> >         version
> >         shipped with those images is missing some libs, which cause
> >         MARC::Charset to build a database of several hundreds MBs (which
> >         is only
> >         5MBs with a standard perl version). So I chose a more standard
> >         image
> >         (debian:buster) as base.
> >
> >         * Koha doesn't work well when running with a perl version
> >         different than
> >         the system perl installed in /usr/bin/perl. For example, the
> >         updatedatabase doesn't work when called from the web installer.
> >         This is
> >         because Perl scripts are called directly as executable files, and
> >         shebangs contain '/usr/bin/perl'. Same problem from
> >         misc/translator/translate which calls tmpl_process3.pl
> >         <http://tmpl_process3.pl>.
> >
> >         * I tried to make the Koha installation as self-contained as
> >         possible.
> >         Almost everything is installed as a non-root user in /home/koha,
> >         including Perl dependencies.
> >
> >         * It doesn't need a reverse proxy such as apache or nginx. The
> >         necessary
> >         URL rewriting is handled in PSGI file. The container expose two
> >         ports,
> >         one for intranet, the other one for OPAC.
> >
> >         * Each Perl dependency is installed in its latest version, so
> >         expect
> >         things to break. I can only confirm that the webinstaller, basic
> >         cataloguing and search/indexation work. I did not test anything
> >         else.
> >
> >         * There are docker-compose.yml files in the github repository to
> >         get
> >         Koha running quickly with mariadb, memcached and elasticsearch.
> >
> >         * Zebra is not installed
> >
> >         * Images weigh ~1.15GB uncompressed (koha sources included)
> >
> >         If you made it this far, thanks for reading :)
> >         And if you want to use these docker images, you should start by
> >         reading
> >         https://github.com/jajm/koha-docker/blob/master/README.md
> >
> >         --
> >         Julian Maurice
> >         BibLibre
> >         _______________________________________________
> >         Koha-devel mailing list
> >         Koha-devel at lists.koha-community.org
> >         <mailto:Koha-devel at lists.koha-community.org>
> >
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> >         website : http://www.koha-community.org/
> >         git : http://git.koha-community.org/
> >         bugs : http://bugs.koha-community.org/
> >
>
> --
> Julian Maurice
> BibLibre
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/ git :
> http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200225/029f5987/attachment-0001.html>


More information about the Koha-devel mailing list