[Bug 43725] New: Add `--config-only` option to `koha-create`
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Bug ID: 43725 Summary: Add `--config-only` option to `koha-create` Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: mtj@kohaaloha.com Target Milestone: --- Working on the `koha-docker` project, I found the need for a way to get `koha-create` just initialize the configurations, but not start any services. While I understand the value of `koha-create` launching all the pieces, I believe it is mixing a lot of concerns, and we should have a way to limit its reach. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |martin.renvoize@openfifth.c | |o.uk, tomascohen@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 207286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207286&action=edit Bug 43725: Add --config-only option to koha-create In some deployments (notably containerised ones) service management is handled externally to the instance creation step. In those cases we want koha-create to generate the instance configuration and database, but not attempt to enable the Apache site or start/enable any related services. This patch adds a --config-only switch that keeps all configuration generation untouched (the Apache vhost, koha-conf.xml, log4perl and Zebra config files are still written) while skipping the service actions: * enabling the Apache site and restarting Apache * enabling/starting Zebra, the workers and the indexer daemon * enabling/starting the systemd instance target * requesting letsencrypt certificates (which restarts Apache) Without the flag koha-create behaves exactly as before. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 207287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207287&action=edit Bug 43725: Document the --config-only option This patch adds the --config-only switch to the koha-create(8) manual page, both in the synopsis and in the options description. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |domm@plix.at --- Comment #3 from Thomas Klausner <domm@plix.at> --- The lack of this feature tripped my up a lot when I first tried to use Koha (in an ad-hoc container, before I learned of KTD). I can QA this after signoff :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #4 from David Cook <dcook@prosentient.com.au> --- This would be awesome for testing in general as well. So many times I want other instances but don't need all the other automagic with the services and what not -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #5 from Robin Sheat <robin@kallisti.net.nz> --- Created attachment 207345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207345&action=edit Bug 43725: Add config-only to getopts, fix the chown This patch has two things: 1. Add `config-only` to the getopts so that the command line is correctly parsed. 2. Given no services are started, no logs are generated, so the `chown` on the logs fails. This lets it fail without aborting everything. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Robin Sheat <robin@kallisti.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207286|0 |1 is obsolete| | Attachment #207287|0 |1 is obsolete| | Attachment #207345|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #6 from Robin Sheat <robin@kallisti.net.nz> --- Created attachment 207347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207347&action=edit Bug 43725: Add --config-only option to koha-create In some deployments (notably containerised ones) service management is handled externally to the instance creation step. In those cases we want koha-create to generate the instance configuration and database, but not attempt to enable the Apache site or start/enable any related services. This patch adds a --config-only switch that keeps all configuration generation untouched (the Apache vhost, koha-conf.xml, log4perl and Zebra config files are still written) while skipping the service actions: * enabling the Apache site and restarting Apache * enabling/starting Zebra, the workers and the indexer daemon * enabling/starting the systemd instance target * requesting letsencrypt certificates (which restarts Apache) Without the flag koha-create behaves exactly as before. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Robin Sheat <robin@kallisti.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #7 from Robin Sheat <robin@kallisti.net.nz> --- Created attachment 207348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207348&action=edit Bug 43725: Document the --config-only option This patch adds the --config-only switch to the koha-create(8) manual page, both in the synopsis and in the options description. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Robin Sheat <robin@kallisti.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 --- Comment #8 from Robin Sheat <robin@kallisti.net.nz> --- Created attachment 207349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207349&action=edit Bug 43725: Add config-only to getopts, fix the chown This patch has two things: 1. Add `config-only` to the getopts so that the command line is correctly parsed. 2. Given no services are started, no logs are generated, so the `chown` on the logs fails. This lets it fail without aborting everything. Signed-off-by: Robin Sheat <robin@kallisti.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43725 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #9 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Thank you, Robin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org