Bug 47807 - Create demo school and portal when installing UCS@School
Create demo school and portal when installing UCS@School
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.3
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v6
Assigned To: Ole Schwiegert
Jürn Brodersen
Depends on: 47243 48135
  Show dependency treegraph
Reported: 2018-09-13 08:51 CEST by Ole Schwiegert
Modified: 2018-11-16 11:48 CET (History)
3 users (show)

See Also:
What kind of report is it?: Feature Request
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:
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2018-09-13 08:51:34 CEST
When installing UCS@School we want to create a demo school (including portal and some test users) for testing and demonstration purposes.
Comment 1 Ole Schwiegert univentionstaff 2018-09-13 12:04:31 CEST
Content of linked Trello card:

Beispiel Implementierung findet sich hier: schule-univention.de

Heute in der Besprechung festgehalten:
- Erstellung eines zusätzlichen Portals
- Titel "Demoportal"
- Standardmäßige Verknüpfung an Master-Server
- Vier Kategorien (Kommunikation, Kollaboration, Kreativität, Verwaltung)
- Folgende Kacheln je Kategorie:
Kommunikation (Mail, Chat, Kalender)
Kollaboration (Ressourcen buchen (nur Lehrergruppe), Vertretungsplan, Pädagogische Funktionen (nur Lehrergruppe))
Kreativität (Eigene Dateien, Tauschverzeichnis, Online Arbeiten)
Verwaltung (Passwort zurücksetzen, Schuladministration (nur Schuladmingruppe), Benutzerverwaltung (nur Schuladmingruppe), Plattformverwaltung  (nur Domänenadmingruppe))
- Die Kacheln verlinken zunächst auf eine erklärende Seite
Comment 2 Ole Schwiegert univentionstaff 2018-10-24 11:02:28 CEST
Package: ucs-school-metapackage
Version: 11.0.2-1A~

A Demo school including test users for student, teacher and admin is installed on a system (only master or singlemaster), if the ucr variable ucsschool/join/create_demo is set to yes.

Also a portal will be installed and activated on the master.

The easiest way to test this is to set the variable to true, before installing the new package. The joinscript will then create the demo school/portal
Comment 3 Jürn Brodersen univentionstaff 2018-11-06 17:12:55 CET
Reopen as discussed
Comment 4 Ole Schwiegert univentionstaff 2018-11-07 10:18:48 CET
Package: ucs-school-metapackage
Version: 11.0.2-2A~
Branch: ucs_4.3-0
Scope: ucs-school-4.3

- Background image shrinked from 4MB to ~250KB
- Tiles have their names as description
- Merged Collaboration and Communication category
- Passwort reset is now self service password reset for everyone
- ucsschool/join/create_demo is now set to no if the demo school was created
- use makepasswd to create password
Comment 5 Ole Schwiegert univentionstaff 2018-11-07 10:55:53 CET
Package: ucs-school-umc-installer
Version: 6.0.0-4A~
Branch: ucs_4.3-0
Scope: ucs-school-4.3

Add info text to UCS@school installer
Comment 6 Ole Schwiegert univentionstaff 2018-11-08 13:41:24 CET
Package: ucs-school-metapackage
Version: 11.0.2-3A~
Branch: ucs_4.3-0
Scope: ucs-school-4.3

Add demo class and add student to it
Comment 7 Jürn Brodersen univentionstaff 2018-11-08 23:59:43 CET
No demo school was created in multi server environments and the demo class had no school prefix. I also set the password length to 16, 8 seemed a little bit small.

[4.3 606e35b2d] Bug #47807: Fix multiserver demo portal installation
[4.3 72ba8e2b0] Bug #47807: Fix school class creation

If you're ok with these changes please update the yaml.
Otherwise it looks good
Comment 8 Ole Schwiegert univentionstaff 2018-11-09 08:19:13 CET
Thanks for the fixes.
Tried out with the changes and looks good to me.
Updated advisory
Comment 9 Jürn Brodersen univentionstaff 2018-11-09 15:08:51 CET
I don't think we can store the password for the demo users in ucr :(
See bug 48127

I guess the password needs to be stored under /etc/demoschool.secret
Or maybe it shouldn't be stored at all and we tell the admin to reset it?

Sorry for not catching that sooner
Comment 10 Ole Schwiegert univentionstaff 2018-11-12 08:05:18 CET
Aye, but I think that should not be a problem in that case. The demo school is supposed to be configured when UCS@school is first installed. There should be no users around in the system to take advantage of that.

First the password was supposed to be 'ucsschool' and exposed publicly on the tile placeholder page. The UCRV is just a convienient way to store the password less public but still easily accessible for the admin (especially over UMC).

If theoretical access to the demo school would be a problem we could of course put the password in a more secure, but less accessible place.
Comment 11 Ole Schwiegert univentionstaff 2018-11-12 13:29:49 CET
Package: ucs-school-metapackage
Version: 11.0.2-6A~
Branch: ucs_4.3-0
Scope: ucs-school-4.3

Password now in /etc/demoschool.secret
Admin tile now visible for everyone
Comment 12 Daniel Tröder univentionstaff 2018-11-13 07:57:49 CET

Test failed (Checking for *.secret files in /etc that are read- or writeable by group "other")

[2018-11-12 23:37:38.251804] -rw-r--r-- 1 root root 17 Nov 12 23:28 /etc/demoschool.secret
Comment 13 Ole Schwiegert univentionstaff 2018-11-13 09:40:50 CET
Package: ucs-school-metapackage
Version: 11.0.2-7A~
Branch: ucs_4.3-0
Scope: ucs-school-4.3

Set file permission of demoschool.secret to 640
Comment 14 Jürn Brodersen univentionstaff 2018-11-14 09:55:39 CET
Demoschool is installed on new installations: OK
Demoschool is not installed on new installations if deactivated: OK
Demoschool is not installed during update: OK
Demoschool is mentioned in installer: OK
Demo Protal works: OK, Looks good :)
Demouser work: OK
Comment 15 Sönke Schwardt-Krummrich univentionstaff 2018-11-16 10:19:16 CET
The name of the demo OU is "DEMOSCHOOL".
Comment 16 Sönke Schwardt-Krummrich univentionstaff 2018-11-16 11:48:22 CET
UCS@school 4.3 v6 has been released.


If this error occurs again, please clone this bug.