diff --git a/readme.md b/readme.md index 4f70114..cf2e3e1 100644 --- a/readme.md +++ b/readme.md @@ -46,14 +46,34 @@ graph TD * **Cloud Foundry CLI:** `https://github.com/cloudfoundry/cli/releases` * **STACKIT CLI:** `https://docs.stackit.cloud/stackit/de/automatisieren/cli/cli-installieren-200720436.html` + * **Terraform CLI:** Optional: Wenn IaC gewünscht ist, muss terraform installiert und im Systempfad verfügbar sein. -### 1.2. Bei STACKIT Cloud Foundry anmelden +## 2\. Terraform / Infrastruktur as Code + +### 2.1. Variablen +Passen sie die Variablen in der Datei terraform.tfvars an + +### 2.2. Quellcode einmalig vorbereiten: + +```bash +chmod +x prepare_source.sh +./prepare_source.sh +``` + +### 2.3. Terraform initialisieren und ausführen: +```bash +terraform init +terraform apply +``` + +## 3\. Installation ohne Terraform +### 3.1. Bei STACKIT Cloud Foundry anmelden ```bash cf login -a https://api.cf.eu01.stackit.cloud --sso ``` -### 1.3. Organisation und Space erstellen +### 3.2. Organisation und Space erstellen ```bash cf create-org @@ -61,9 +81,9 @@ cf create-space -o cf target -o -s ``` -## 2\. Moodle-Projekt lokal vorbereiten +## 3.3. Moodle-Projekt lokal vorbereiten -### 2.1. Moodle und Plugins herunterladen +### 3.3.1. Moodle und Plugins herunterladen ```bash # Moodle 5.0.1 @@ -81,7 +101,7 @@ git clone https://github.com/catalyst/moodle-tool_objectfs.git admin/tool/object cd .. ``` -### 2.2. Buildpack- & System-Workarounds einrichten +### 3.3.2. Buildpack- & System-Workarounds einrichten ```bash # Web-Verzeichnis festlegen und PHP-Version auf 8.2 erzwingen @@ -103,9 +123,9 @@ ln -s /tmp/httpd.pid moodle/httpd/logs/httpd.pid ln -s /tmp/php-fpm.pid moodle/php/var/run/php-fpm.pid ``` -## 3\. Cloud Foundry & STACKIT Services erstellen +## 3.4. Cloud Foundry & STACKIT Services erstellen -#### 3.1. Object Storage Bucket erstellen (STACKIT CLI) +#### 3.4.1. Object Storage Bucket erstellen (STACKIT CLI) ```bash stackit object-storage bucket create --name @@ -117,7 +137,7 @@ stackit object-storage credential create --project-id **Notieren Sie sich den ausgegebenen `accessKey` und `secretAccessKey`.** -#### 3.2. CDN-Distribution erstellen (STACKIT CLI, Optional) +#### 3.4.2. CDN-Distribution erstellen (STACKIT CLI, Optional) Die Erstellung und Konfiguration des CDN erfolgt in mehreren Schritten. @@ -164,7 +184,7 @@ Die Erstellung und Konfiguration des CDN erfolgt in mehreren Schritten. > Vielen Dank. -#### 3.3. DNS-Einträge konfigurieren (STACKIT CLI) +#### 3.4.3. DNS-Einträge konfigurieren (STACKIT CLI) 1. **Zone-ID ermitteln:** @@ -190,7 +210,7 @@ Die Erstellung und Konfiguration des CDN erfolgt in mehreren Schritten. stackit dns record-set create --zone-id --name --type CNAME --ttl 300 --records "console.apps.01.cf.eu01.stackit.cloud." ``` -#### 3.4. Cloud Foundry Services erstellen (CF CLI) +#### 3.4.4. Cloud Foundry Services erstellen (CF CLI) ```bash # Datenbank-Service @@ -211,7 +231,7 @@ cf create-user-provided-service -p '{ }' ``` -## 4\. Konfigurationsdateien erstellen +## 3.5. Konfigurationsdateien erstellen #### a) Manifest-Dateien @@ -378,7 +398,7 @@ if ($useCdn) { require_once(__DIR__ . '/lib/setup.php'); ``` -## 5\. Deployment auf Cloud Foundry +## 3.6. Deployment auf Cloud Foundry Wählen Sie das gewünschte Manifest für Ihr Deployment aus.