Update readme.md
This commit is contained in:
parent
3bdd79c416
commit
dd557bd360
1 changed files with 44 additions and 52 deletions
96
readme.md
96
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 <DEINE_ORGANISATION> -s <DEIN_SPACE>
|
|||
### 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 <DEINE_PROJEKT_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 <DEINE_PROJEKT_ID>, <DEINE_INTERNE_CF_ROUTE> und <DEINE_MOODLE_DOMAIN>.
|
||||
stackit curl -X POST --body '{
|
||||
"name": "<DEIN_CDN_DISTRIBUTION_NAME>",
|
||||
"origin": {
|
||||
"path": "/",
|
||||
"hostname": "<DEINE_INTERNE_CF_ROUTE>",
|
||||
"port": 443
|
||||
},
|
||||
"originRequestHeaders": [
|
||||
{
|
||||
"name": "Host",
|
||||
"values": [
|
||||
"<DEINE_MOODLE_DOMAIN>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Cache-Control",
|
||||
"values": [
|
||||
"no-cache, no-store, must-revalidate"
|
||||
]
|
||||
}
|
||||
],
|
||||
"origin": { "path": "/", "hostname": "<DEINE_INTERNE_CF_ROUTE>", "port": 443 },
|
||||
"originRequestHeaders": [ { "name": "Host", "values": [ "<DEINE_MOODLE_DOMAIN>" ] } ],
|
||||
"enabled": true
|
||||
}' /cdn/v1beta/projects/<DEINE_PROJEKT_ID>/distributions
|
||||
```
|
||||
|
||||
**Notieren Sie sich die `id` der Distribution aus der Antwort.**
|
||||
|
||||
2. **CDN-Standard-Domain auslesen:**
|
||||
2. **Benutzerdefinierte Domain hinzufügen:**
|
||||
|
||||
```bash
|
||||
# Ersetzen Sie <DEINE_PROJEKT_ID> und <DISTRIBUTION_ID>.
|
||||
stackit curl -X GET /cdn/v1beta/projects/<DEINE_PROJEKT_ID>/distributions/<DISTRIBUTION_ID>
|
||||
```
|
||||
|
||||
**Notieren Sie sich den Wert des `domain`-Feldes aus der Antwort. Dies ist Ihr CNAME-Ziel.**
|
||||
|
||||
3. **Benutzerdefinierte Domain hinzufügen:**
|
||||
|
||||
```bash
|
||||
# Ersetzen Sie <DEINE_PROJEKT_ID> und <DISTRIBUTION_ID>.
|
||||
stackit curl -X POST --body '{
|
||||
"domain": "<DEINE_MOODLE_DOMAIN>"
|
||||
}' /cdn/v1beta/projects/<DEINE_PROJEKT_ID>/distributions/<DISTRIBUTION_ID>/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 `<DISTRIBUTION_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): `*<DEINE_MOODLE_DOMAIN>/*`
|
||||
> * Request URL (Match Wildcard): `*<DEINE_MOODLE_DOMAIN>/*index.php*`
|
||||
> * Request URL (Match Wildcard): `*<DEINE_MOODLE_DOMAIN>/*javascript.php*`
|
||||
> * Request URL (Match Wildcard): `*<DEINE_MOODLE_DOMAIN>/*styles.php*`
|
||||
> * Request URL (Match Wildcard): `*<DEINE_MOODLE_DOMAIN>/*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 <DEINE_PROJEKT_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/<DEINE_PROJEKT_ID>/distributions/<DISTRIBUTION_ID>
|
||||
```
|
||||
|
||||
**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
|
||||
# <DEIN_CDN_ENDPOINT> ist die Standard-Domain, die Sie in Schritt 3.2 ausgelesen haben.
|
||||
stackit dns record-set create --zone-id <DEINE_ZONE_ID> --name <DEINE_MOODLE_DOMAIN> --type CNAME --ttl 300 --records "<DEIN_CDN_ENDPOINT>."
|
||||
stackit dns record-set create --zone-id <DEINE_ZONE_ID> --name <DEINE_MOODLE_DOMAIN> --type CNAME --ttl 300 --records "<DEIN_CDN_ZIEL_AUS_SCHRITT_2>."
|
||||
|
||||
# Für den Betrieb OHNE CDN (falls benötigt)
|
||||
stackit dns record-set create --zone-id <DEINE_ZONE_ID> --name <DEINE_INTERNE_CF_ROUTE> --type CNAME --ttl 300 --records "console.apps.01.cf.eu01.stackit.cloud."
|
||||
|
|
|
|||
Loading…
Reference in a new issue