From 4998a614807c866e57c06a0311889d282d7e238d Mon Sep 17 00:00:00 2001 From: Tarik Moussa Date: Fri, 31 Jul 2026 00:35:23 +0200 Subject: [PATCH] chore: interne Host-Adresse durch generischen Hostnamen ersetzt Ersetzt die private LAN-IP des Jetson durch jetson.local in Doku, Beispiel-Workflows und als Default in scripts/llm.py. Betrifft nur Fallback-Werte -- die Org-Variable JETSON_OLLAMA_URL bzw. AI_BASE_URL hat weiterhin Vorrang. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/cd.yml | 2 +- .gitea/workflows/reusable-ai-review.yml | 2 +- .gitea/workflows/reusable-commands.yml | 2 +- .gitea/workflows/reusable-security.yml | 2 +- README.md | 6 +++--- scripts/llm.py | 4 ++-- workflows/ai-review.example.yml | 2 +- workflows/ci-failure.example.yml | 2 +- workflows/security.example.yml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/cd.yml b/.gitea/workflows/cd.yml index 13f2423..f18bab4 100644 --- a/.gitea/workflows/cd.yml +++ b/.gitea/workflows/cd.yml @@ -11,7 +11,7 @@ # - Runner config must list /var/run/docker.sock and /mnt/external in valid_volumes # (set in ansible-eulernest roles/gitea_runner/templates/config.yaml.j2). # - Set org variable JETSON_OLLAMA_URL in conformallab → Actions → Variables: -# value = http://192.168.178.103:11434/v1 +# value = http://jetson.local:11434/v1 name: CD — ci-ai-bot on: diff --git a/.gitea/workflows/reusable-ai-review.yml b/.gitea/workflows/reusable-ai-review.yml index 1618d6e..3f2761e 100644 --- a/.gitea/workflows/reusable-ai-review.yml +++ b/.gitea/workflows/reusable-ai-review.yml @@ -31,7 +31,7 @@ jobs: AI_PROVIDER: ollama AI_MODEL: coder # JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables - AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }} + AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }} GITEA_TOKEN: ${{ github.token }} GITEA_API: https://git.eulernest.eu/api/v1 run: python /opt/ci-ai/scripts/ai_review.py diff --git a/.gitea/workflows/reusable-commands.yml b/.gitea/workflows/reusable-commands.yml index aebb10e..e37dbe5 100644 --- a/.gitea/workflows/reusable-commands.yml +++ b/.gitea/workflows/reusable-commands.yml @@ -23,7 +23,7 @@ jobs: AI_PROVIDER: ollama AI_MODEL: coder # JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables - AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }} + AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }} GITEA_TOKEN: ${{ github.token }} GITEA_API: https://git.eulernest.eu/api/v1 steps: diff --git a/.gitea/workflows/reusable-security.yml b/.gitea/workflows/reusable-security.yml index bfd354a..c8d833a 100644 --- a/.gitea/workflows/reusable-security.yml +++ b/.gitea/workflows/reusable-security.yml @@ -74,7 +74,7 @@ jobs: AI_PROVIDER: ollama AI_MODEL: coder # JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables - AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }} + AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }} GITEA_TOKEN: ${{ github.token }} GITEA_API: https://git.eulernest.eu/api/v1 run: | diff --git a/README.md b/README.md index a0be065..2b7b437 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ IPs — `[webhook] ALLOWED_HOST_LIST` muss den Bot-Host (`ci-ai-bot`) erlauben. | `WEBHOOK_SECRET` | — | HMAC-Secret, muss zum Gitea-Webhook passen (leer = Check aus) | | `GITEA_TOKEN` | — | Token fürs Kommentieren (`write:issue`) | | `GITEA_API` | `http://gitea:3000/api/v1` | Gitea-API (intern, kein Hairpin) | -| `AI_PROVIDER` / `AI_MODEL` / `AI_BASE_URL` | `ollama` / `coder` / `http://192.168.178.103:11434/v1` | KI-Backend (Jetson) | +| `AI_PROVIDER` / `AI_MODEL` / `AI_BASE_URL` | `ollama` / `coder` / `http://jetson.local:11434/v1` | KI-Backend (Jetson) | ## In ein Repo einbauen (CI-Workflows) @@ -117,7 +117,7 @@ Kosten, kein Datenabfluss. In Workflows **und** Bot per Env gesetzt: ```yaml AI_PROVIDER: ollama AI_MODEL: coder # qwen2.5-coder:7b -AI_BASE_URL: http://192.168.178.103:11434/v1 +AI_BASE_URL: http://jetson.local:11434/v1 ``` Provider-Wechsel = **nur Env**, kein Code-Change (`scripts/llm.py`). Anthropic-Variante: @@ -134,7 +134,7 @@ Provider-Wechsel = **nur Env**, kein Code-Change (`scripts/llm.py`). Anthropic-V |---|---|---| | `AI_PROVIDER` | `ollama` | `ollama` | | `AI_MODEL` | `coder` (ollama) / `claude-3-5-haiku-latest` (anthropic) | `coder` | -| `AI_BASE_URL` | `http://192.168.178.103:11434/v1` | `…178.103…` | +| `AI_BASE_URL` | `http://jetson.local:11434/v1` | `…178.103…` | | `JETSON_API_KEY` | — | Bearer für Ollama (optional) | | `ANTHROPIC_API_KEY` | — | nur bei provider=anthropic | | `GITEA_API` | `https://git.eulernest.eu/api/v1` | Bot: intern `http://gitea:3000/api/v1` | diff --git a/scripts/llm.py b/scripts/llm.py index a3ea0dd..876c498 100644 --- a/scripts/llm.py +++ b/scripts/llm.py @@ -10,7 +10,7 @@ Umschalten zwischen Backends über Env-Vars: Weitere Env-Vars: AI_MODEL Modellname (Default je nach Provider; ollama: "coder" = qwen2.5-coder:7b) AI_BASE_URL OpenAI-kompatible Basis-URL (für ollama), - Default http://192.168.178.103:11434/v1 + Default http://jetson.local:11434/v1 JETSON_API_KEY Bearer-Token (für ollama, optional) ANTHROPIC_API_KEY (für anthropic) @@ -88,7 +88,7 @@ def _anthropic(system: str, user: str, model: str, max_tokens: int) -> str: def _ollama_openai(system: str, user: str, model: str, max_tokens: int) -> str: - base = os.environ.get("AI_BASE_URL", "http://192.168.178.103:11434/v1").rstrip("/") + base = os.environ.get("AI_BASE_URL", "http://jetson.local:11434/v1").rstrip("/") headers = {"content-type": "application/json"} key = os.environ.get("JETSON_API_KEY", "") if key: diff --git a/workflows/ai-review.example.yml b/workflows/ai-review.example.yml index 2956056..02b0c0c 100644 --- a/workflows/ai-review.example.yml +++ b/workflows/ai-review.example.yml @@ -28,7 +28,7 @@ jobs: env: AI_PROVIDER: ollama AI_MODEL: coder - AI_BASE_URL: http://192.168.178.103:11434/v1 + AI_BASE_URL: http://jetson.local:11434/v1 GITEA_TOKEN: ${{ github.token }} GITEA_API: https://git.eulernest.eu/api/v1 run: python /opt/ci-ai/scripts/ai_review.py diff --git a/workflows/ci-failure.example.yml b/workflows/ci-failure.example.yml index dbaa6b4..1263747 100644 --- a/workflows/ci-failure.example.yml +++ b/workflows/ci-failure.example.yml @@ -28,7 +28,7 @@ # env: # AI_PROVIDER: ollama # AI_MODEL: coder -# AI_BASE_URL: http://192.168.178.103:11434/v1 +# AI_BASE_URL: http://jetson.local:11434/v1 # GITEA_TOKEN: ${{ github.token }} # GITEA_API: https://git.eulernest.eu/api/v1 # run: | diff --git a/workflows/security.example.yml b/workflows/security.example.yml index 3bb9f0f..f127fb0 100644 --- a/workflows/security.example.yml +++ b/workflows/security.example.yml @@ -55,7 +55,7 @@ jobs: env: AI_PROVIDER: ollama AI_MODEL: coder - AI_BASE_URL: http://192.168.178.103:11434/v1 + AI_BASE_URL: http://jetson.local:11434/v1 GITEA_TOKEN: ${{ github.token }} GITEA_API: https://git.eulernest.eu/api/v1 run: |