SuiteCRM App Migration

From Univention Wiki

Revision as of 09:51, 16 January 2017 by Botner (talk | contribs) (→‎Check if docker works on the host)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Work in Progress

Starting with version 7.6.3-2 the SuiteCRM App for UCS is available as Docker App. New installations automatically using this Docker App.

To update an existing non-Docker SuiteCRM App to the new Docker SuiteCRM App a manual migration has to be done. Basically, SuiteCRM on the server (Docker host) is removed and installed in a new Docker container. Directories with SuiteCRM 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 SuiteCRM 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 prepare SuiteCRM App removal

mkdir -p /var/lib/suitecrm
mv /var/www/suitecrm /var/lib/suitecrm/
cp /etc/suitecrm/db.secret /etc/mysql-digitec-suitecrm.secret
rm /usr/share/suitecrm/
rm /usr/lib/univention-uninstall/79suitecrm-web-uninstall.uinst

Remove SuiteCRM App

univention-app remove digitec-suitecrm
a2dissite suitecrm
invoke-rc.d apache2 restart
. /usr/share/univention-join/joinscripthelper.lib
joinscript_remove_script_from_status_file suitecrm-web

Install SuiteCRM Docker App

echo "digitec-suitecrm v2 successful" >> /usr/lib/univention-install/.index.txt
ucr unset  appcenter/prudence/docker/digitec-suitecrm
univention-app install digitec-suitecrm
univention-app shell digitec-suitecrm ucr commit /etc/apache2/sites-available/suitecrm
univention-app shell digitec-suitecrm a2ensite suitecrm
univention-app shell digitec-suitecrm invoke-rc.d apache2 restart

Modify database settings to reuse SuiteCRM database from Docker host

mysql --no-defaults -u root -h localhost --password="$(< /etc/mysql.secret)"<<EOF
GRANT ALL PRIVILEGES ON suitecrm.* TO 'suitecrm'@'%' IDENTIFIED BY '$(</etc/mysql-digitec-suitecrm.secret)';
univention-app shell digitec-suitecrm bash -c \
'sed -i "s/\(.*db_host_name.*\)localhost\(.*\)/\1$DB_HOST\2/" \

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 SuiteCRM App container:

univention-app shell digitec-suitecrm
Personal tools