Updating a Docker-based Installation of OTOBO

For running OTOBO under Docker we need the OTOBO software itself and an environment in which OTOBO can run. The OTOBO Docker image provides the environment and a copy of the OTOBO software. The software itself is installed in the volume otobo_opt_otobo. A named volume is used because run time data, e.g. configuration files and installed packages, is stored in the same directory tree.

When updating to a new version of OTOBO several things have to happen.

  • The Docker Compose files have to be updated.
  • The Docker Compose config file .env has to be checked.
  • The new Docker image has to be fetched.
  • The volume otobo_opt_otobo must be updated.
  • Some maintainance tasks must be executed.

Note

In the sample commands below, the version 11.x.y, corresponding to the tag 11_x_y, is used as the example version. Please substitute it with the real version, e.g. 11.0.7.

Updating the Docker Compose files

The OTOBO Docker Compose files can change between releases. Therefore is must be made sure that the correct setup is used.

Note

See https://hub.docker.com/r/rotheross/otobo/tags for the available releases.

# Change to the otobo docker directory
docker_admin> cd /opt/otobo-docker

# Get the latest tags
docker-admin> git fetch --tags

# Update OTOBO docker-compose repository to version 11.x.y.
docker-admin> git checkout rel-11_x_y

Checking the Docker Compose .env file

The file .env controls the OTOBO Docker container. Within that file, the variables OTOBO_IMAGE_OTOBO, OTOBO_IMAGE_OTOBO_ELASTICSEARCH, and OTOBO_IMAGE_OTOBO_NGINX declare which images are used. The latest images are used when these variables are not set. If you want to use a specific version, then please set these variables accordingly.

Fetch the new Docker images

Docker compose can be used for fetching the wanted images from https://hub.docker.com/r/rotheross/otobo/.

# Change to the otobo docker directory
docker_admin> cd /opt/otobo-docker

# fetch the new images, either 'latest-11_0', 'latest-10_1', 'latest-10_0' or the specific version declared in .env
docker_admin> docker-compose pull

Update OTOBO

Warning

Please note that minor or major upgrades must always be carried out one after the other. If you would like to upgrade from version 10.0.* to the latest 11.0.*, please upgrade to 10.1 first and then to 11.0.

In this step the volume otobo_opt_otobo is updated and the following OTOBO console commands are performed:

  • Admin::Package::ReinstallAll
  • Admin::Package::UpgradeAll
  • Maint::Config::Rebuild
  • Maint::Cache::Delete
# stop and remove the containers, but keep the named volumes
docker_admin> docker-compose down

# copy the OTOBO software, while containers are still stopped
docker_admin> docker-compose run --no-deps --rm web copy_otobo_next

# start containers again, using the new version and the updated /opt/otobo
docker_admin> docker-compose up --detach

# a quick sanity check
docker_admin> docker-compose ps

# complete the update, with running database
docker_admin> docker-compose exec web /opt/otobo_install/entrypoint.sh do_update_tasks

# inspect the update log
docker_admin> docker-compose exec web cat /opt/otobo/var/log/update.log

**# For minor or major release upgrades, you also have to run the upgrade script (for example to upgrade from 10.1 to 11.0)**
root> docker exec -it otobo_web_1 perl scripts/DBUpdate-to-11.0.pl

Note

The above listed commands can be automated. For that purpose the script scripts/update.sh will be made available in OTOBO 10.0.8. This script runs the commands, starting with the docker-compose pull command.

docker_admin> ./scripts/update.sh --help
docker_admin> ./scripts/update.sh

** For minor or major release upgrades, you also have to run the upgrade script (for example to upgrade from 10.1 to 11.0)**
docker_admin> docker exec -it otobo_web_1 perl scripts/DBUpdate-to-11.0.pl