Bug 12750 - koha-create should be able to configure SRU server for the created instance
Summary: koha-create should be able to configure SRU server for the created instance
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Robin Sheat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 13:19 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2016-01-20 08:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 12750: koha-create should be able to configure SRU server for the created instance (7.81 KB, patch)
2014-08-12 14:19 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 12750: koha-create should be able to configure the Z39.50/SRU server (7.83 KB, patch)
2014-11-10 17:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
[Signed OFF] Bug 12750: koha-create should be able to configure the Z39.50/SRU server (7.90 KB, patch)
2014-11-18 23:37 UTC, Jesse Maseto
Details | Diff | Splinter Review
Bug 12750: koha-create should be able to configure the Z39.50/SRU server (7.95 KB, patch)
2014-11-18 23:45 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 12750: koha-create should be able to configure the Z39.50/SRU server (8.00 KB, patch)
2014-11-20 22:02 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2014-08-12 13:19:32 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2014-08-12 14:19:17 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2014-08-25 08:21:17 UTC
A couple of thoughts:

- This will also enable the public Z39.50, I think? Does it make sense to just use the SRU name because that is the more modern of the two protocols? I think at least the documentation should point out that Z39.50 will also be enabled. 

- Would it be possible to have a separate koha-start/stop-sru script, like we do for e.g. SIP? If I read things correctly, with the proposed enhancement, SRU can only be turned on when an instance is created. Some libraries might want to enable SRU after some time.
Comment 3 Tomás Cohen Arazi (tcohen) 2014-11-10 17:52:52 UTC Comment hidden (obsolete)
Comment 4 Jesse Maseto 2014-11-18 23:37:05 UTC Comment hidden (obsolete)
Comment 5 Brendan Gallagher 2014-11-18 23:45:10 UTC Comment hidden (obsolete)
Comment 6 Robin Sheat 2014-11-20 22:02:37 UTC
Created attachment 33769 [details] [review]
Bug 12750: koha-create should be able to configure the Z39.50/SRU server

This patch adds two parameters to the koha-create command:

 --enable-sru: makes the koha-create script enabled the SRU server for
               the created instance

 --sru-port:   lets the user specify a desired port for the SRU server
               to listen at. It defaults to 7090

To test:
- Apply the patch on top of master
- Build your own package and install / can be tested just using the koha-create
  command on a 3.16+ packages install
- Create an instance as usual (i.e. without --enable-sru and --sru-port)
=> SUCCESS: The instance is created, the publicserver sections are
            both commented out. The first publicserver section has 7090 set as the
            listening port.
- Create an instance as usual, passing --sru-port 456
=> SUCCESS: The instance is created, the port is set but the publicserver sections
            are commented out
- Create an instance with --enable-sru (with and without --sru-port)
=> SUCCESS: Verify the instance is created as expected, with the SRU server enabled
            (port 7090 if no --sru-port passed, the one we chose otherwise).
- Verify that the docs also talk about this new parameters addition.
- Sign off :-D

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Comment 7 Tomás Cohen Arazi (tcohen) 2014-11-20 22:08:00 UTC
Patch pushed to master.
Comment 8 Katrin Fischer 2016-01-20 08:35:32 UTC
We just tried this on a new 3.22 server - but the variables in the koha-conf.xml file were not replaced correctly:

koha-create --create-db --enable-sru 

    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
                xmlns:xi="http://www.w3.org/2001/XInclude">
      <xi:fallback>
      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
          <serverInfo>
            <host>__ZEBRA_SRU_HOST__</host>
            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
            <database>biblios</database>
          </serverInfo>
...