Merge remote-tracking branch 'origin/main' into workshop-angaben-tls-windows

# Conflicts:
#	README.md
This commit is contained in:
hkoeck
2026-05-31 22:47:17 +02:00
3 changed files with 50 additions and 29 deletions
+3
View File
@@ -0,0 +1,3 @@
*.sh text eol=lf
*.bash text eol=lf
*.ps1 text eol=crlf
+45 -28
View File
@@ -28,68 +28,85 @@ Basisrouten nach dem Start:
- `http://localhost:8080/hints.html` -> Hint Cheatsheet - `http://localhost:8080/hints.html` -> Hint Cheatsheet
- `http://localhost:8080/solutions.html` -> Musterloesungen - `http://localhost:8080/solutions.html` -> Musterloesungen
## Voraussetzungen (Linux / macOS / Windows WSL) ## Voraussetzungen
1. Docker + Compose (`docker compose` oder `docker-compose`) ### Windows (empfohlen)
2. Optional fuer TLS-Challenges: `easy-rsa`, `openssl`, `wireshark`
Plattformhinweise: Installiere die erforderlichen Tools mit winget:
- Linux: Docker Engine oder Docker Desktop ```powershell
- macOS: Docker Desktop winget install --id Microsoft.VisualStudioCode -e
- Windows: Docker Desktop + WSL Integration aktiv winget install --id Git.Git -e
winget install --id Docker.DockerDesktop -e
```
## Schnellstart Optional fuer TLS-Challenges:
```powershell
winget install --id OpenSSL.OpenSSL -e
winget install --id WiresharkFoundation.Wireshark -e
```
Nach der Installation von Docker Desktop die WSL-Integration in den Einstellungen aktivieren.
### Linux / macOS ### Linux / macOS
```bash Docker Engine oder Docker Desktop installieren.
./scripts/bootstrap.sh
```
### Windows (WSL) Optional fuer TLS-Challenges:
Option A (im WSL-Terminal): #### Ubuntu/Debian (apt)
```bash ```bash
./scripts/bootstrap.sh sudo apt update
sudo apt install easy-rsa openssl wireshark
``` ```
Option B (PowerShell Wrapper): #### Fedora/RHEL (dnf)
```bash
sudo dnf install easy-rsa openssl wireshark
```
## Schnellstart
### Windows
```powershell ```powershell
./scripts/workshop.ps1 -Action bootstrap ./scripts/workshop.ps1 -Action bootstrap
``` ```
Der PowerShell-Wrapper ruft intern `./scripts/lab.sh` in WSL auf - die gleiche Steuer-Oberflaeche wie unter Linux/WSL.
Falls PowerShell das Script blockiert: Falls PowerShell das Script blockiert:
```powershell ```powershell
Set-ExecutionPolicy -Scope Process Bypass Set-ExecutionPolicy -Scope Process Bypass
``` ```
Weitere Aktionen in PowerShell: Wenn mehrere WSL-Distros installiert sind:
```powershell
./scripts/workshop.ps1 -Action redeploy
./scripts/workshop.ps1 -Action proxy-reload
./scripts/workshop.ps1 -Action reset
./scripts/workshop.ps1 -Action reset-hard
./scripts/workshop.ps1 -Action reset-origin
```
Wenn mehrere Distros installiert sind:
```powershell ```powershell
./scripts/workshop.ps1 -Action bootstrap -Distro Ubuntu-24.04 ./scripts/workshop.ps1 -Action bootstrap -Distro Ubuntu-24.04
``` ```
Alternativ direkt im WSL-Terminal:
```bash
./scripts/bootstrap.sh
```
### Linux / macOS
```bash
./scripts/bootstrap.sh
```
Das Skript: Das Skript:
- prueft Docker + Compose - prueft Docker + Compose
- startet den Stack - startet den Stack
Der PowerShell-Wrapper ruft intern `./scripts/lab.sh` in WSL auf - dieselbe Steuer-Oberflaeche wie unter Linux/WSL.
## Neu deployen / resetten ## Neu deployen / resetten
Alle Aktionen laufen ueber `./scripts/lab.sh <aktion>` (in WSL/Linux). Windows-PowerShell-Nutzer nehmen `./scripts/workshop.ps1 -Action <aktion>` - dahinter steckt dasselbe Skript. Alle Aktionen laufen ueber `./scripts/lab.sh <aktion>` (in WSL/Linux). Windows-PowerShell-Nutzer nehmen `./scripts/workshop.ps1 -Action <aktion>` - dahinter steckt dasselbe Skript.
+2 -1
View File
@@ -10,7 +10,8 @@ if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) {
} }
$repoWinPath = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path $repoWinPath = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$repoWslPath = (& wsl.exe wslpath -a "$repoWinPath").Trim() $drive = $repoWinPath[0].ToString().ToLower()
$repoWslPath = "/mnt/$drive/" + $repoWinPath.Substring(3) -replace '\\', '/'
if (-not $repoWslPath) { if (-not $repoWslPath) {
Write-Error "Konnte den WSL Pfad fuer das Repo nicht ermitteln." Write-Error "Konnte den WSL Pfad fuer das Repo nicht ermitteln."