This patch makes the koha-create script adjust the koha-conf.xml file
with the proper string substitutions to enable the use of memcached
for the created Koha instance.
It adds three option switches that control this:
--use-memcached (defaults to "no")
--memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211')
--memcached-prefix "desired_namespace prefix" (defaults to 'koha_')
It respects the current schema configuration schema, where configuration
values are pondered like this:
hardcoded < koha-sites.conf < koha-create option switches
koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and
MEMCACHED_PREFIX.
Note: the docs discourage setting user's own namespace prefix.
Using memcached is off as the default. The relevant configuration
variables will remain empty if the user doesn't pass --use-memcached
to the command. It matches the current behaviour.
To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
$ koha-create --create-db memctest
- Check that /etc/koha/sites/memctest/koha-conf.xml contains:
* Empty <memcached_servers> tag.
* Empty <memcached_namespace> tag.
b) Play with the possible combination of option switches
(Note that the code defaults to empty and will remain like that if
--use-memcached is not used, so less tests...)
$ koha-create --create-db --use-memcached memctest
$ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest
$ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest
$ koha-create --create-db --use-memcached --memcached-prefix "something" memctest
- Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest
file reflect the chosen options.
c) Run
$ koha-create --help
- It should advertise this addition accordingly.
d) Run
$ man koha-create
- Man page for koha-create should provide good information on the new
switches behaviour
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
There were some missing zebra language options in the man page for koha-create.
Trivial string change.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested using the following commands:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
debian/docs/koha-list.xml
$ man -l koha-list.8
Also:
prove -v xt/verify-debian-docbook.t
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes the koha-create script install the file zebra-biblios-dom.cfg
with the proper string substitutions inside on the new instance koha-conf.xml file.
It also adds two option switches that control the indexing mode for the instance:
--biblio-idx {dom|grs1}
--auth-idx {dom|grs1}
DOM indexing is set as the default for both authorities and bibliographic records.
Following drojf (thanks!) advice I arranged stuff like explained here:
http://wiki.koha-community.org/wiki/Switching_to_dom_indexing
To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
$ koha-create --create-db domtest
- Check there's a file /etc/koha/sites/domtest/zebra-biblios-dom.cfg
- Check that /etc/koha/sites/domtest/koha-conf.xml points to:
* zebra-biblios-dom.cfg (biblioserver section)
* zebra-biblios-dom.cfg (publicserver section)
* zebra-authorities-dom.cfg (authorityserver section)
- Success means the new default is DOM
b) Play with the 4 possible combination of option switches
$ koha-create --create-db --auth-idx grs1 --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx grs1 --biblio-idx dom domtest
$ koha-create --create-db --auth-idx dom --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx dom --biblio-idx dom domtest
- Check the koha-conf.xml file reflects the chosen options.
c) Run
$ koha-create --help
- It should advertise this addition accordingly.
d) Run
$ man koha-create
- Man page for koha-create should provide good information on the new switches behaviour
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch add the option to choose 'ru' and 'uk' during install for Zebra.
Should work for a tarball install, and make 'ru' and 'uk' available for using
with koha-create too.
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran Makefile.pl and made sure the language options show up now.
Patch extends existing language code lists addings nb, ru and uk
where missing.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
VERY trivial string patch. Couldn't help sending it.
To+
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Thanks for fixing my typo! I did not test by building packages
etc, but by grepping for "Communnity". The patch removes
all occurences of the typo.
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Line 121 had "/etc/koha/koha-site.conf" instead of "/etc/koha/koha-sites.conf"
To test:
I don't think this needs any actual testing, just read the patch and check
that it looks sensible...
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit makes koha-create more flexible by adding a number of command-line
and configuration options.
The biggest change is to add support for pre-determined MySQL credentials using
a file in /etc/koha/passwd (for security reasons, if you use this feature, make
sure the file is not world-readable). The configuration file has the following
format:
instance:user:password:database
The database is optional, but the other two are both required if you want to
specify MySQL credentials. If no credentials are specified for a given instance,
the standard koha_instance username and an auto-generated password are used.
The following additional command line options are now available:
* --use-db - use a pre-existing database, see also --database
* --database - specify the name of the mysql database (still defaults to
koha_instance)
* --passwdfile - specify a custom (Koha) passwd file for MySQL credentials
The following additional variables are now available (for use in
koha-sites.conf or a custom config file):
* OPACPORT (previously added but not documented) - port on which the OPAC
should be served
* OPACPREFIX - prefix for the OPAC's virtual host
* OPACSUFFIX - suffix for the OPAC's virtual host
This commit also adds the --keep-mysql option to koha-remove, which, if
specified, will prevent koha-remove from deleting the database or MySQL user
when removing an instance.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Also fix the example so that it is there.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch
- deletes debian/scripts/koha-create.8
- adds debian/docs/koha-create.xml and koha-remove.xml
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>