Difference between revisions of "Egroupware App Migration"

From Univention Wiki

Jump to: navigation, search
(Created page with "Category:App Center Category:Docker App Migration '''Work in progress''' Starting with version XXX the EGroupware App for UCS is available as Docker App....")
 
m
Line 12: Line 12:
  
 
== Check if docker works on the host==
 
== Check if docker works on the host==
 
 
Run the following command to verify docker works, before starting the migration:
 
Run the following command to verify docker works, before starting the migration:
 
<pre>
 
<pre>
Line 18: Line 17:
 
</pre>
 
</pre>
 
If this test fails, please contact the Univention Support or check the Univention Forum [http://forum.univention.de/] for more information.
 
If this test fails, please contact the Univention Support or check the Univention Forum [http://forum.univention.de/] for more information.
 
== Prepare EGroupware Docker App database connection ===
 
save db_pass from EGroupware config
 
<pre>
 
touch etc/mysql-egroupware.secret
 
chmod 600 /mysql-egroupware.secret
 
grep db_pass /var/lib/egroupware/header.inc.php \
 
  | awk -F "'" '{print $4}' > /etc/mysql-egroupware.secret
 
 
</pre>
 
Change db_host in /var/lib/egroupware/header.inc.php to the ip if the EGroupware docker container (ucr get appcenter/apps/egroupware/ip).
 
<pre>
 
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
 
</pre>
 
 
-> echo "egroupware v1 successful" >> /usr/lib/univention-install/.index.txt
 
 
  
 
== Save settings and remove non-Docker EGroupware App ==
 
== Save settings and remove non-Docker EGroupware App ==
 
<pre>
 
<pre>
 
# save db_pass from EGroupware config
 
# save db_pass from EGroupware config
touch etc/mysql-egroupware.secret
+
touch /etc/mysql-egroupware.secret
chmod 600 /etc/postgres-tine20.secret
+
chmod 600 /etc/mysql-egroupware.secret
 
grep db_pass /var/lib/egroupware/header.inc.php \
 
grep db_pass /var/lib/egroupware/header.inc.php \
 
   | awk -F "'" '{print $4}' > /etc/mysql-egroupware.secret
 
   | awk -F "'" '{print $4}' > /etc/mysql-egroupware.secret
Line 51: Line 30:
 
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
 +
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
 
</pre>
 
</pre>
  
 
+
== Install EGroupware Docker App ==
== Install Tine20 Docker App ==
 
 
<pre>
 
<pre>
 +
echo "egroupware v1 successful" >> /usr/lib/univention-install/.index.txt
 
univention-app update
 
univention-app update
 
univention-app register
 
univention-app register
Line 61: Line 45:
 
univention-run-join-scripts
 
univention-run-join-scripts
 
</pre>
 
</pre>
 +
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 ==
 
== 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).
 
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).
  

Revision as of 09:25, 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