Created attachment 30735 [details] [review] Bug 12750: koha-create should be able to configure SRU server for the created instance 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
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.
Created attachment 33438 [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+ Edit: added references to the Z39.50 as asked by Magnus. Sponsored-by: Universidad Nacional de Cordoba
Created attachment 33668 [details] [review] [Signed OFF] 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>
Created attachment 33669 [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>
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>
Patch pushed to master.
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> ...