Bug 42793 - Provide egroupware App as Docker App
Provide egroupware App as Docker App
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: Felix Botner
Stefan Gohmann
:
Depends on:
Blocks: 42243
  Show dependency treegraph
 
Reported: 2016-10-31 10:44 CET by Felix Botner
Modified: 2017-05-02 06:25 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Release Management
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016110121000337
Bug group (optional):
Max CVSS v3 score:


Attachments
egroupware-epl.patch (908 bytes, patch)
2016-11-01 15:08 CET, Felix Botner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2016-10-31 10:44:26 CET
The egroupware App should be provided as Docker App.
Comment 1 Felix Botner univentionstaff 2016-11-01 15:08:00 CET
Created attachment 8178 [details]
egroupware-epl.patch
Comment 2 Felix Botner univentionstaff 2016-11-01 15:22:38 CET
first docker version online on appcenter.test

-> univention-install univention-appcenter-dev
-> univention-app dev-use-test-appcenter
-> univention-app install egroupware=1

egroupware-epl.patch:
 * disable egroupware initialization in UCS docker container

app.ini:
 * added
   DockerImage = docker.software-univention.de/ucs-appbox-amd64:4.1-3
   Database = mysql
   DatabaseName = egroupware
   DatabaseUser = egroupware
   RequiredUCSVersion = 4.1-3 errata312
   DockerVolumes = /var/lib/egroupware/:/var/lib/egroupware/

added appcenter join script:
 * add service EGroupware to docker host
 * enable ssl in container
 * create /Microsoft-Server-ActiveSync proxy config on docker host
 * cp /etc/ldap.secret to container
 * call /usr/share/egroupware/doc/rpm-build/post_install.php with
   docker host as db_host in container

added appcenter unjoin script:
 * remove service EGroupware from docker host
 * remove  /Microsoft-Server-ActiveSync proxy config from docker host

Persisent data:
 * docker host database is used in egroupware docker app
 * /var/lib/egroupware is mapped

Questions/Problems:
 * Besides database and filestore, is there more user data/configs that 
   should be stored persistently?
 * app uses cn=admin and ldap.secret, is this really necessary (maybe a member
   of Domain Admins is sufficient)?
 * App wants root access to the mysql database to create app database and user.
   Therefor the join script temporarily creates a  
   'root'@'$appcenter_apps_egroupware_ip' mysql privilege. But as the appcenter
   creates the database and user, this is not necessary. 
   Egroupware does not need to create a database/user in this scenario.
   Can this be turn off?

Migration:

(1) remove egroupware app

-> univention-app remove egroupware
-> apt-get remove egroupware-epl-core
-> ucr unset appcenter/prudence/docker/egroupware
-> apt-mark manual mysql-server

(2) configure egroupware database connection

db_pass from /var/lib/egroupware/header.inc.php to /etc/mysql-egroupware.secret
-> grep db_pass /var/lib/egroupware/header.inc.php | awk -F "'" '{print $4}' > /etc/mysql-egroupware.secret

Edit db_host in /var/lib/egroupware/header.inc.php to docker0 ip.

-> 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

-> echo "egroupware v1 successful" >> /usr/lib/univention-install/.index.txt 

(2b) switch to appcenter.test
-> univention-install univention-appcenter-dev
-> univention-app dev-use-test-appcenter

(3) install egroupware docker app

 univention-app install egroupware=1
Comment 3 Felix Botner univentionstaff 2017-04-27 19:28:49 CEST
Docker App liegt im Testappcenter 4.1 4.2

http://wiki.univention.de/index.php?title=Egroupware_App_Migration#Install_EGroupware_Docker_App

ISV hat Freigabe erteilt, meine Tests waren OK, geht morgen raus.
Comment 4 Stefan Gohmann univentionstaff 2017-05-02 06:25:04 CEST
No QA required.
Comment 5 Stefan Gohmann univentionstaff 2017-05-02 06:25:17 CEST
Done