IPT - gbif-norway/documentation GitHub Wiki

The Integrated Publishing Toolkit is an open source tool used to publish biodiversity datasets to the GBIF network.

We host images for the https://www.gbif.org/dataset/88d6237c-fbce-4135-b509-0aeed1e4222e dataset at /gbif/www/static-images/klaus_hoiland.

We host our IPT instances (test, production, various biodata IPTs) on nhm-ala01.uio.no. They are in /nhm-ala/docker-www/ and are also git repositories on https://github.com/gbif-norway. Each has a docker-compose.yml and a /data-directory which is mounted as a volume (i.e. the contents in the directory are also available and synchronised in the docker container).

IPT upgrades

  • Make sure to back up the data directories – ./data-directory. Note that we don't sync user details (i.e. users.xml) and the resources folder on git, so these should always be backed up.

  • Stop the docker container with docker container ls to view a list of the running containers and docker stop [container-name]

  • Change the IPT image version in docker-compose.yml (e.g. image: gbif/ipt:2.4.0 to image: gbif/ipt:2.4.1)

  • Rebuild the image with docker-compose build and run with docker-compose up -d

  • Go to the IPT url (e.g. https://ipt.gbif.no) and follow any instructions

  • If the IPT instance needs to grab data from SQLite or Oracle https://www.oracle.com/database/technologies/jdbc-ucp-122-downloads.html, add the JDBC driver as explained here. This should be automated in ./data-directory/docker-entrypoint.sh

  • The biodata IPTs have a slightly different set up, and are at e.g. https://ipt-biodata.gbif.no/armenia/. To update, stop the container, change the IPT version number in the Dockerfile, and build + run the container (with -d). Sometimes when updating these you are unable to log in for a while at first. I am not sure why, but this seems to resolve itself. To add new users in bulk, edit the srv/datadir-[country]/config/users.xml file and touch /webapps/[country]/WEB-INF/web.xml, or restart the docker container.

Troubleshooting

Help, the IPT is down!

  • Check the docker container is running with docker container ls. You can ssh into the container with docker exec -it [container-name] /bin/bash and check things look correct, view logs etc. You can also view logs with e.g.docker logs [container-name] --tail 10, see [here] (https://docs.docker.com/engine/reference/commandline/logs/) for more information.

IPT/Tomcat is not allowed to write to the IPT data directory

Probably an SELinux thing - try the following:

  • grep docker /var/log/audit/audit.log | audit2allow -M ipt
  • semodule -i ipt.pp

To view audit log results in a human readable format with dates use ausearch: grep -i tomcat /var/log/audit/audit.log | ausearch -i

More information about SELinux from the university IT department USIT.

IPT/Tomcat can no longer access MariaDB/MySQL or Postgres (jdbc connection error)

The database server is data.gbif.uio.no, so first ssh to there and make sure the databases are up and running and accepting connections as they should.

Might be SELinux

  • sealert -a /var/log/audit/audit.log Will display a list of apps that selinux is blocking, and provide instructions on how to give the apps permissions/access

A good guide to troubleshooting is here: https://www.serverlab.ca/tutorials/linux/administration-linux/troubleshooting-selinux-centos-red-hat/