Egroupware App Migration

From Univention Wiki

Jump to: navigation, search

Starting with version 16.1.20170415 the EGroupware App for UCS is available as Docker App. New installations automatically using this Docker App.

To update an existing non-Docker EGroupware App to the new Docker EGroupware App a manual migration has to be done. Basically, EGroupware on the server (Docker host) is removed and installed in a new Docker container. Directories with EGroupware data are mapped into the container and the container continues to use the database on the Docker host.

EGroupware GmbH offers support [1], if you need help migrating your EGroupware installation to the Docker version or in any other EGroupware related matter.

The following steps are necessary to migrate the non-Docker EGroupware App to Docker:

Check if docker works on the host

Run the following command to verify docker works, before starting the migration:

docker run hello-world

If this test fails, please contact the Univention Support or check the Univention Forum [2] for more information.

Save settings and remove non-Docker EGroupware App

# save db_pass from EGroupware config
touch /etc/mysql-egroupware.secret
chmod 600 /etc/mysql-egroupware.secret
grep db_pass /var/lib/egroupware/ \
   | awk -F "'" '{print $4}' > /etc/mysql-egroupware.secret
# remove app
univention-app remove egroupware
apt-get remove egroupware-epl-core
ucr unset appcenter/prudence/docker/egroupware
apt-mark manual mysql-server
# set database permissions
mysql --no-defaults -u root -h localhost --password="$(< /etc/mysql.secret)"<<EOF
GRANT ALL PRIVILEGES ON egroupware.* TO 'egroupware'@'%%' IDENTIFIED BY '$(</etc/mysql-egroupware.secret)';

Install EGroupware Docker App

echo "egroupware v1 successful" >> /usr/lib/univention-install/.index.txt 
univention-app update
univention-app register
univention-app install egroupware
# change the ''db_host'' parameter in ''/var/lib/egroupware/'' 
# to the ip if the EGroupware docker container
univention-app shell egroupware bash -c \
  'sed -i "s/\(.*db_host.*\)localhost\(.*\)/\1$DB_HOST\2/" \
univention-app shell egroupware /usr/share/egroupware/doc/rpm-build/post_install.php

Verify mail settings in EGroupware setup

Open the egroupware/setup URL on the Docker host (username: admin, password: see file /etc/egroupware-admin.secret on Docker host) and verify the mail settings (IMAP, SMTP, Sieve).

Further configurations or modifications of UCR settings have to be done in the container from now on. Use the following command to change into the new EGroupware App container:

univention-app shell egroupware
Personal tools