Difference between revisions of "Egroupware App Migration"

From Univention Wiki

Jump to: navigation, search
m
Line 28: Line 28:
 
univention-app remove egroupware
 
univention-app remove egroupware
 
apt-get remove egroupware-epl-core
 
apt-get remove egroupware-epl-core
ucr unset appcenter/prudence/docker/egroupware                            
+
ucr unset appcenter/prudence/docker/egroupware
 
apt-mark manual mysql-server
 
apt-mark manual mysql-server
 
# set database permissions
 
# set database permissions

Revision as of 09:27, 19 January 2017


Work in progress

Starting with version XXX 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.

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 [1] 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/header.inc.php \
   | 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)';
FLUSH PRIVILEGES;
EOF

Install EGroupware Docker App

echo "egroupware v1 successful" >> /usr/lib/univention-install/.index.txt 
univention-app update
univention-app register
univention-app install egroupware
univention-run-join-scripts

Now, change the db_host parameter in /var/lib/egroupware/header.inc.php to the ip if the EGroupware docker container (ucr get appcenter/apps/egroupware/ip).

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