diff --git a/readme.md b/readme.md index 90377ae..4f70114 100644 --- a/readme.md +++ b/readme.md @@ -44,23 +44,14 @@ graph TD ### 1.1. CLIs installieren - * **Cloud Foundry CLI:** Das primäre Werkzeug zur Interaktion mit der Cloud Foundry Plattform. - - * **Download:** `https://github.com/cloudfoundry/cli/releases` - - * **STACKIT CLI:** Wird benötigt, um STACKIT-spezifische Services wie DNS, Object Storage und CDN zu verwalten. - - * **Installationsanleitung:** `https://docs.stackit.cloud/stackit/de/automatisieren/cli/cli-installieren-200720436.html` + * **Cloud Foundry CLI:** `https://github.com/cloudfoundry/cli/releases` + * **STACKIT CLI:** `https://docs.stackit.cloud/stackit/de/automatisieren/cli/cli-installieren-200720436.html` ### 1.2. Bei STACKIT Cloud Foundry anmelden - * **API-Endpunkt:** `https://api.cf.eu01.stackit.cloud` - - * **Login-Befehl:** - - ```bash - cf login -a https://api.cf.eu01.stackit.cloud --sso - ``` +```bash +cf login -a https://api.cf.eu01.stackit.cloud --sso +``` ### 1.3. Organisation und Space erstellen @@ -75,16 +66,16 @@ cf target -o -s ### 2.1. Moodle und Plugins herunterladen ```bash -# Moodle 5.0.1 herunterladen und entpacken +# Moodle 5.0.1 wget https://packaging.moodle.org/stable500/moodle-5.0.1.tgz tar -xzf moodle-5.0.1.tgz -# Redis-Plugin für Moodle installieren (Version passend zu Moodle 5.x) +# Redis-Plugin wget https://moodle.org/plugins/download.php/30019/cachestore_redis_moodle44_2024051300.zip unzip cachestore_redis_moodle44_2024051300.zip mv redis moodle/cache/stores/ -# S3 Object File System Plugin installieren +# S3 Object File System Plugin cd moodle git clone https://github.com/catalyst/moodle-tool_objectfs.git admin/tool/objectfs cd .. @@ -128,55 +119,51 @@ stackit object-storage credential create --project-id #### 3.2. CDN-Distribution erstellen (STACKIT CLI, Optional) +Die Erstellung und Konfiguration des CDN erfolgt in mehreren Schritten. + 1. **CDN-Distribution erstellen:** ```bash - # Ersetzen Sie , und . stackit curl -X POST --body '{ "name": "", - "origin": { - "path": "/", - "hostname": "", - "port": 443 - }, - "originRequestHeaders": [ - { - "name": "Host", - "values": [ - "" - ] - }, - { - "name": "Cache-Control", - "values": [ - "no-cache, no-store, must-revalidate" - ] - } - ], + "origin": { "path": "/", "hostname": "", "port": 443 }, + "originRequestHeaders": [ { "name": "Host", "values": [ "" ] } ], "enabled": true }' /cdn/v1beta/projects//distributions ``` **Notieren Sie sich die `id` der Distribution aus der Antwort.** -2. **CDN-Standard-Domain auslesen:** +2. **Benutzerdefinierte Domain hinzufügen:** ```bash - # Ersetzen Sie und . - stackit curl -X GET /cdn/v1beta/projects//distributions/ - ``` - - **Notieren Sie sich den Wert des `domain`-Feldes aus der Antwort. Dies ist Ihr CNAME-Ziel.** - -3. **Benutzerdefinierte Domain hinzufügen:** - - ```bash - # Ersetzen Sie und . stackit curl -X POST --body '{ "domain": "" }' /cdn/v1beta/projects//distributions//domains ``` +3. **Wichtige CDN-Einstellungen per Support-Ticket anfordern:** + Damit Moodle hinter dem CDN korrekt funktioniert, müssen spezielle Caching- und Cookie-Regeln gesetzt werden, die aktuell nicht als Self-Service verfügbar sind. Erstellen Sie ein Ticket im STACKIT Support-Portal. + + * **Support-Portal:** `https://support.stackit.cloud/servicedesk/customer/portal/3` + + * **Anfrage-Vorlage:** + + > Hallo STACKIT-Team, + > für unsere CDN-Distribution mit der ID `` benötigen wir bitte die folgenden Einstellungen: + + > 1. **"Strip Response Cookies" muss deaktiviert sein.** Moodle benötigt dies, um Session-Cookies an den Browser zu senden. + > 2. **Edge Rule zum Umgehen des Caches:** Bitte erstellen Sie eine Edge Rule, die das Caching für alle dynamischen Moodle-Inhalte deaktiviert: + > * **Action:** Bypass Cache + > * **Conditions (Match Any):** + > * Request URL (Match Wildcard): `*/*` + > * Request URL (Match Wildcard): `*/*index.php*` + > * Request URL (Match Wildcard): `*/*javascript.php*` + > * Request URL (Match Wildcard): `*/*styles.php*` + > * Request URL (Match Wildcard): `*/*yui_combo.php*` + + > Vielen Dank. + #### 3.3. DNS-Einträge konfigurieren (STACKIT CLI) 1. **Zone-ID ermitteln:** @@ -185,14 +172,19 @@ stackit object-storage credential create --project-id stackit dns zone list ``` - Notieren Sie sich die `ID` Ihrer Domain-Zone. +2. **CDN-Standard-Domain auslesen (nur für CDN-Setup):** -2. **CNAME-Eintrag erstellen:** + ```bash + stackit curl -X GET /cdn/v1beta/projects//distributions/ + ``` + + **Notieren Sie sich den Wert des `domain`-Feldes. Dies ist Ihr CNAME-Ziel für das CDN.** + +3. **CNAME-Eintrag erstellen:** ```bash # Für den Betrieb MIT CDN - # ist die Standard-Domain, die Sie in Schritt 3.2 ausgelesen haben. - stackit dns record-set create --zone-id --name --type CNAME --ttl 300 --records "." + stackit dns record-set create --zone-id --name --type CNAME --ttl 300 --records "." # Für den Betrieb OHNE CDN (falls benötigt) stackit dns record-set create --zone-id --name --type CNAME --ttl 300 --records "console.apps.01.cf.eu01.stackit.cloud."