[Koha-devel] koha-testing-docker - a couple of questions

David Cook dcook at prosentient.com.au
Mon Oct 8 02:41:00 CEST 2018


Hi David,

 

I’m going to leave most of these questions for Kyle and Tomas, since they relate directly to koha-testing-docker, and I don’t have enough experience with it yet.

 

However, I have been using Docker more and more, and my advice would be to just practice and try things out. 

 

For instance, the other day I wanted to try out https://github.com/UniversalViewer/uv-hello-world, so I just started a Docker container using a small generic Ubuntu image and did my work in there. I didn’t even bother making a Dockerfile in order to make my own image. I just created a container as a sort of workspace. Once I’d tried out the software, I exited and let the container destroy itself. I had to play with the options a bit (like --rm and -p) to get what I wanted, but it was such a basic use case that it was really easy to see  what was going on. 

 

Jessie Frazelle used to maintain the Docker core and I love this blog post of hers: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/. It inspired me to use a Docker container for running the Arduino IDE on my Debian desktop at home. I haven’t shared my Dockerfile and scripts yet for that, but you can find something similar at https://github.com/tombenke/darduino. Btw, Jessie Frazelle is funny, nice, and really smart. Worth reading her blog in general as she focuses a lot on containers, although it tends to be more intermediate/advanced level I reckon. 

 

More recently, I’ve been making my own Docker images for other work projects and I’ve been thinking about Dockerizing a lot of the apps I’ve made at home for my own purposes. I just haven’t gotten to it yet. But really the world is your oyster! 

 

Hope that’s a bit inspiring at least… heh.

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Direct: 02 8005 0595

 

From: koha-devel-bounces at lists.koha-community.org [mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of David Nind
Sent: Sunday, 7 October 2018 8:02 AM
To: koha-devel at lists.koha-community.org
Subject: [Koha-devel] koha-testing-docker - a couple of questions

 

I've been getting to grips with using koha-testing-docker (https://gitlab.com/koha-community/koha-testing-docker) since KohaCon 18. Thanks Kyle and Tomás for having a session on it at the HackFest!

 

A couple of questions - apologies if the answers to these are obvious, I've not really used docker until now...

 

I'm using docker on a Ubuntu 18.04 desktop.

 

env/defaults.env and .env

====================

 

Is the copy you make of defaults.env only required because docker requires it (as instructed under Setup in the README.md file)?

 

Anything I've updated in .env seems to be ignored in favour of what is in the env/defaults.env file, for example your Git user name and email.

 

However, if you don't have the .env file you get this error when running docker-compose -p koha up :

 

> WARNING: The KOHA_INTRANET_PREFIX variable is not set. Defaulting to a blank string.
> WARNING: The KOHA_INSTANCE variable is not set. Defaulting to a blank string.
> WARNING: The KOHA_INTRANET_SUFFIX variable is not set. Defaulting to a blank string.
> WARNING: The KOHA_DOMAIN variable is not set. Defaulting to a blank string.
> WARNING: The KOHA_OPAC_PREFIX variable is not set. Defaulting to a blank string.
> WARNING: The KOHA_OPAC_SUFFIX variable is not set. Defaulting to a blank string.
> WARNING: The RUN_TESTS_AND_EXIT variable is not set. Defaulting to a blank string.
> WARNING: The COVERAGE variable is not set. Defaulting to a blank string.
> ERROR: The Compose file './docker-compose.yml' is invalid because:
> services.koha.networks.kohanet contains non-unique items, please remove duplicates from [u'', u'']

 

For the moment I just make changes in env/defaults.env and copy this to .env

 

UNIMARC support

==============

 

Does koha-testing-docker support UNIMARC at this stage?

 

Adding either UNIMARC or unimarc to the env/defaults.env file didn't seem to make any difference.

 

Normally I would use MARC21, but I was trying to test a UNIMARC patch - the UNIMARC specific script said it only works on UNIMARC (surprisingly enough!).

 

If I try reset_all_unimarc in the container it hangs at the last line:

 

> Inserting /kohadevbox/koha/installer/data/mysql/en/marcflavour/unimarc/mandatory/authorities_normal_unimarc.sql...
> Inserting /kohadevbox/koha/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql...
> Setting the MARC flavour on the sysprefs...
> Setting Koha version to 18.0600035...
> Running [sudo koha-shell kohadev -p -c 'PERL5LIB=/kohadevbox/koha:/kohadevbox/qa-test-tools perl /kohadevbox/misc4dev/create_superlibrarian.pl <http://create_superlibrarian.pl>  --userid koha --password koha ']...
> Running [sudo koha-shell kohadev -c 'PERL5LIB=/kohadevbox/koha:/kohadevbox/qa-test-tools perl /kohadevbox/misc4dev/insert_data.pl <http://insert_data.pl>  --marcflavour UNIMARC']...
> There is no records data for UNIMARC yet at /kohadevbox/misc4dev/insert_data.pl <http://insert_data.pl>  line 50.

 

Also, is there an easy way to tell if Koha is using UNIMARC? I assume you can tell by looking at the default cataloguing framework (if you know what you are looking for, which I don't).

 

Rebuilding search indexes

=====================

 

After docker is running you don't get any search reults when searching the catalogue.

 

Is having to rebuild the search index manually once docker has started the normal behaviour?

 

Is it possible to have the indexes created as part of docker starting up?

 

Or is there a reason why this isn't done? (Depending on whether you want to use Zebra or Elastic.) 

 

Getting my head around docker

=========================

 

I found this quick guide useful to get the concepts of docker https://vsupalov.com/6-docker-basics/

 

As well, the docker documentation is helpful after that https://docs.docker.com/get-started/

 

Are there any other useful guides or tutorials that you would recommend to people new to docker?

 

Thanks for everyone's work that has made koha-testing-docker possible!

 

David Nind | david.nind at gmail.com <mailto:david.nind at gmail.com> 
PO Box 12367, Thorndon, Wellington, New Zealand 6144
m. +64 21 0537 847

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20181008/81910290/attachment.html>


More information about the Koha-devel mailing list