[Bug 13791] New: Plack out of the box
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Bug ID: 13791 Summary: Plack out of the box Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: dpavlin@rot13.org QA Contact: testopia@bugs.koha-community.org Offer plack as valid alternative for installation. For now, some progress is documented at wiki page: http://wiki.koha-community.org/wiki/Plack -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13793 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11998 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Plack out of the box |Plack - Out of the box | |support on packages -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13793, 13805 CC| |jonathan.druart@biblibre.co | |m Blocks|13793 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13815 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41481 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41481&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file TODO (by priority): - changes to koha-create - configurable workers/max-reqs (per instance?) - allow per instance psgi file (debugging?) and fallback to shipped - tab completion in bash [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41482 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41482&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41483 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41483&action=edit Bug 13791: koha-plack documentation -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41484 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41484&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41485 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41485&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41484|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41486 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41486&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Heather Braum <hbraum@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hbraum@nekls.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41481|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41503 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41503&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41482|0 |1 is obsolete| | --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41504 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41504&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. A check for the right apache version is introduced, in the for of an IfVersion block: <IfVersion >= 2.4> --- Plack configuration here --- </IfVersion> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41483|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41505 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41505&action=edit Bug 13791: koha-plack documentation -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41486|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41506 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41506&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41485|0 |1 is obsolete| | --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41507 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41507&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41503|0 |1 is obsolete| | --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41508 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41508&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi and is installed by the package. It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41504|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41509 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41509&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. A check for the right apache version is introduced, in the for of an IfVersion block: <IfVersion >= 2.4> --- Plack configuration here --- </IfVersion> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41505|0 |1 is obsolete| | --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41510 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41510&action=edit Bug 13791: koha-plack documentation -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41506|0 |1 is obsolete| | --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41511 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41511&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41507|0 |1 is obsolete| | --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41512 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41512&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. It also introduces a plack_status function to check the status of the Plack daemon when called: $ servive koha-common status Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41513 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41513&action=edit Bug 13791: tab-completion for koha-plack in bash This patch adds tab-completion in bash for the koha-plack command. After the --start, --stop, --restart and --disable switches it only offers plack-enabled instances. And disabled instances to --enable. --help and -h just finish end the completion. --quiet and -q are trickier to implement. They will work (be offered) only before the action switches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #18 from Josef Moravec <josef.moravec@gmail.com> --- Hello Tomás, I think there is a typo in apache configuration here: http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41509&action=diff#a/debian/templates/apache-site.conf.in_sec1 Start tag <IfVersion>, but end tag </IfDefine> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #19 from Josef Moravec <josef.moravec@gmail.com> --- And I had to install starman and perl module Plack::Middleware::ReverseProxy shouldn't it be at least documented somewhere? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Josef Moravec from comment #19)
And I had to install starman and perl module Plack::Middleware::ReverseProxy
shouldn't it be at least documented somewhere?
I'll fix both. Thanks Josef -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41508|0 |1 is obsolete| | --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41563 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41563&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi and is installed by the package. It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file To test this patches you will need to install - starman - libplack-middleware-reverseproxy-perl [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41509|0 |1 is obsolete| | --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41564 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41564&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. A check for the right apache version is introduced, in the for of an IfVersion block: <IfVersion >= 2.4> --- Plack configuration here --- </IfVersion> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41510|0 |1 is obsolete| | --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41565 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41565&action=edit Bug 13791: koha-plack documentation -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41511|0 |1 is obsolete| | --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41566 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41566&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41512|0 |1 is obsolete| | --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41567 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41567&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. It also introduces a plack_status function to check the status of the Plack daemon when called: $ servive koha-common status Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41513|0 |1 is obsolete| | --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41568 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41568&action=edit Bug 13791: tab-completion for koha-plack in bash This patch adds tab-completion in bash for the koha-plack command. After the --start, --stop, --restart and --disable switches it only offers plack-enabled instances. And disabled instances to --enable. --help and -h just finish end the completion. --quiet and -q are trickier to implement. They will work (be offered) only before the action switches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41563|0 |1 is obsolete| | --- Comment #27 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41571 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41571&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi and is installed by the package. It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file To test this patches you will need to install - starman - libplack-middleware-reverseproxy-perl [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41564|0 |1 is obsolete| | --- Comment #28 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41572 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41572&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. A check for the right apache version is introduced, in the for of an IfVersion block: <IfVersion >= 2.4> --- Plack configuration here --- </IfVersion> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41565|0 |1 is obsolete| | --- Comment #29 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41573&action=edit Bug 13791: koha-plack documentation Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41566|0 |1 is obsolete| | --- Comment #30 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41574 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41574&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41567|0 |1 is obsolete| | --- Comment #31 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41575 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41575&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. It also introduces a plack_status function to check the status of the Plack daemon when called: $ servive koha-common status Regards Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41568|0 |1 is obsolete| | --- Comment #32 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 41576 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41576&action=edit Bug 13791: tab-completion for koha-plack in bash This patch adds tab-completion in bash for the koha-plack command. After the --start, --stop, --restart and --disable switches it only offers plack-enabled instances. And disabled instances to --enable. --help and -h just finish end the completion. --quiet and -q are trickier to implement. They will work (be offered) only before the action switches. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #33 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- root@koha-deb:/usr/sbin# koha-plack --disable library Plack disabled for library root@koha-deb:/usr/sbin# koha-plack --enable library Plack already enabled for library hum? Not sure I have tested correctly, back on this one tomorrow. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #33)
root@koha-deb:/usr/sbin# koha-plack --disable library Plack disabled for library root@koha-deb:/usr/sbin# koha-plack --enable library Plack already enabled for library
hum?
Not sure I have tested correctly, back on this one tomorrow.
Hi Jonathan! 1) It seems to me that the script is not catching the absense of the relevant line on your site's virtualhosts definition. This could be a bug in koha-functions.sh (is_plack_enabled). Probably not using the right koha-functions.sh (look at (4). 2) You should be looking at /var/log/koha/<instance>/plack-output.log to know if you are on plack. But you should notice, you know... it is slightly super faster. When you have plack enabled a line like this is uncommented in /etc/apache2/sites-enabled/<instance>.conf: OPAC: # Include /etc/koha/apache-shared-opac-plack.conf Intranet: # Include /etc/koha/apache-shared-intranet-plack.conf Those files need to be present in those dirs (look at (4) for details). 3) You need to know that koha-plack --enable <instance> is not starting the daemon for now, so you need to issue koha-plack --start <instance> to have it running. This is independent from the Apache conf hook, so Plack might be running but not being used. You can ps waux | grep starman (there should be a master process with two workers). 4) Where the files are put is really important because they are picked to generate a suitable apache configuration, otherwise it won't work.: debian/templates/apache-shared-*-plack.conf -> /etc/koha debian/templates/apache-site.conf.in -> /etc/koha debian/koha-common.bash-completion -> /etc/bash_completion.d/koha-common debian/scripts/koha-functions.sh -> /usr/share/koha/bin debian/scripts/koha-* -> /usr/sbin The template files need to be put in place BEFORE the instance is created. I think I'll build the packages for this so testing is pretty easier. Also note that you need to install - starman - libplack-middleware-reverseproxy-perl Thanks for your time testing this! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #35 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Thanks a lot for this additional information, it's very useful. I had to restart apache2 to take into account the change (I suppose it's intended). But... I got an error on the mainpage: ==> /var/log/koha/library-plack/plack-error.log <== Could not compile /usr/share/koha/intranet/cgi-bin/mainpage.pl: Attempt to reload C4/Auth.pm aborted. Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25. BEGIN failed--compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25. I successfully access to / but got this error on /cgi-bin/koha/mainpage.pl Not caused by this patch. Marked as Passed QA, great job Tomás! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41571|0 |1 is obsolete| | Attachment #41572|0 |1 is obsolete| | Attachment #41573|0 |1 is obsolete| | Attachment #41574|0 |1 is obsolete| | Attachment #41575|0 |1 is obsolete| | Attachment #41576|0 |1 is obsolete| | --- Comment #36 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41748 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41748&action=edit Bug 13791: Plack out-of-the-box support on packages This patch introduces a koha-plack script that controls running Plack processes for each instance. They are run using 'starman', listening on a Unix Domain Socket (UDS): /var/run/koha/<instancename>/plack.sock The plack configuration file[1] is expected to be on: /etc/koha/plack.psgi and is installed by the package. It also adds the following helper functions to koha-functions.sh: - is_plack_enabled - is_plack_running Done: - koha-plack script - suitable psgi file To test this patches you will need to install - starman - libplack-middleware-reverseproxy-perl [1] Yeah, a single file. Because we will be relying on multiple mount points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) ) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #37 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41749 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41749&action=edit Bug 13791: Apache configuration files This patch adds an include to each VirtualHost definition (OPAC and Intranet) and a variable definition, taking advantage of Apache 2.4.x features. The instance name is reused inside the includes providing a simple way of dealing with the apache <-> plack configuration. A check for the right apache version is introduced, in the for of an IfVersion block: <IfVersion >= 2.4> --- Plack configuration here --- </IfVersion> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #38 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41750 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41750&action=edit Bug 13791: koha-plack documentation Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #39 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41751 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41751&action=edit Bug 13791: make koha-list aware of plack This patch adds the --plack and --noplack option switches to koha-list for filtering instances to be listed. This is particularly important for init scripts and cronjobs. To test: - Play with koha-list --plack and koha-plack --enable/--disable and verify that koha-list returns the expected results. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #40 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41752 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41752&action=edit Bug 13791: make koha-common init script aware of plack This patch makes the packages' koha-common script aware of plack. It does so by relying on koha-list --plack to know which instances have Plack configured, and uses the koha-plack script to manage the running daemons. It also introduces a plack_status function to check the status of the Plack daemon when called: $ servive koha-common status Regards Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #41 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41753 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41753&action=edit Bug 13791: tab-completion for koha-plack in bash This patch adds tab-completion in bash for the koha-plack command. After the --start, --stop, --restart and --disable switches it only offers plack-enabled instances. And disabled instances to --enable. --help and -h just finish end the completion. --quiet and -q are trickier to implement. They will work (be offered) only before the action switches. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #42 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I would be really useful to have the ability to enable plack for the OPAC or staff side only (since the staff is not stable yet...) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #43 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #35)
Thanks a lot for this additional information, it's very useful.
I had to restart apache2 to take into account the change (I suppose it's intended). But... I got an error on the mainpage:
==> /var/log/koha/library-plack/plack-error.log <== Could not compile /usr/share/koha/intranet/cgi-bin/mainpage.pl: Attempt to reload C4/Auth.pm aborted. Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25. BEGIN failed--compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25.
I successfully access to / but got this error on /cgi-bin/koha/mainpage.pl
Not caused by this patch.
And actually all other pages -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #44 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- So, the install where I have tried this page is 3.2002000. I have tried with a git install, checkouted 3.20.02, and I don't get the error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #45 from Mike <black23@gmail.com> --- (In reply to Jonathan Druart from comment #43) Helo, I want to confirm same problem in staff side. Mike
Thanks a lot for this additional information, it's very useful.
I had to restart apache2 to take into account the change (I suppose it's intended). But... I got an error on the mainpage:
==> /var/log/koha/library-plack/plack-error.log <== Could not compile /usr/share/koha/intranet/cgi-bin/mainpage.pl: Attempt to reload C4/Auth.pm aborted. Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25. BEGIN failed--compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 25.
I successfully access to / but got this error on /cgi-bin/koha/mainpage.pl
Not caused by this patch.
And actually all other pages -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14706 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14706 [Bug 14706] Allow enabling/disabled Plack for OPAC and Intranet individually -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #46 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41866 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41866&action=edit Bug 13791: (QA followup) Plack support requires Apache 2.4.8+ The Apache 2.4 documentation says UDS support for ProxyPass has been introduced in Apache 2.4.7. That's what is shipped by Koha's supported Debian / Ubuntu versions. But it is not true, empiric tests and even the changelog for the apache project says the feature got introduced in 2.4.8. So to avoid breakages I raised the version number test on the apache files to 2.4.8. New bugs will be filled for dealing with this if we find it necessary. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #47 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Farewell, CGI. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #48 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 42038 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42038&action=edit Bug 13791: (RM followup) Add new dependencies for packaging Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14775 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14775 [Bug 14775] Plack::Middleware::ReverseProxy should not be required -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14938 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14938 [Bug 14938] Dependency updates from bug 13791 prevent installation on jessie -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #49 from Magnus Enger <magnus@libriotech.no> --- Traditionally, changes to the koha-*scripts have been backported to stable releases, so that the tools around package installations are the same, no matter what version they are running. Could/should this be considered for the present bug too, or is it too big a leap to incorporate it into the stable branches? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14743 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14743 [Bug 14743] addorder.pl redirect problems under plack behind apache 2.4.10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13791 --- Comment #50 from Mirko Tietgen <mirko@abunchofthings.net> --- Applies cleanly to 3.20.5. Needs tiny fix for 3.18.12 in debian/control. Adds new dependencies (not mandatory if koha-plack is not used). Needs Apache 2.4 (Debian Jessie, Ubuntu ?). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org