rename: homelab-gateway → telegram-gateway
All checks were successful
Docker Build / build-and-push-image (push) Successful in 44s
All checks were successful
Docker Build / build-and-push-image (push) Successful in 44s
Aligns the project name with the public URL (tg.arcodange.fr) and the Arcodange organization conventions. The 'homelab-gateway' name was too generic. Touches: chart name + helpers, image registry path, Go module path, secret/configmap names, deployment mountPath, all docs.
This commit is contained in:
32
DEPLOY.md
32
DEPLOY.md
@@ -1,10 +1,10 @@
|
||||
# Deploy `homelab-gateway` — Phase 1 (echo bot)
|
||||
# Deploy `telegram-gateway` — Phase 1 (echo bot)
|
||||
|
||||
Procédure end-to-end pour mettre le gateway en ligne avec un bot
|
||||
`arcodange_factory_bot` (slug interne `factory`).
|
||||
|
||||
> Phase 1 simplifiée : **pas de Vault**. Le `Secret` k8s
|
||||
> `homelab-gateway-bots` est créé manuellement avec `kubectl create secret`.
|
||||
> `telegram-gateway-bots` est créé manuellement avec `kubectl create secret`.
|
||||
> La migration vers Vault Secrets Operator se fait plus tard (Phase 2+) via
|
||||
> `vault.enabled: true` dans `chart/values.yaml`.
|
||||
|
||||
@@ -12,7 +12,7 @@ Procédure end-to-end pour mettre le gateway en ligne avec un bot
|
||||
|
||||
## 1. Pré-requis
|
||||
|
||||
- Repo Gitea déjà créé : `arcodange/homelab-gateway`
|
||||
- Repo Gitea déjà créé : `arcodange/telegram-gateway`
|
||||
- Bot Telegram déjà créé via @BotFather : `@arcodange_factory_bot`
|
||||
- Token : `8737289837:…` (en variable d'env, jamais committé)
|
||||
- chat_id : récupéré via [@userinfobot](https://t.me/userinfobot)
|
||||
@@ -23,17 +23,17 @@ Procédure end-to-end pour mettre le gateway en ligne avec un bot
|
||||
## 2. Push du repo (déclenche le build Docker)
|
||||
|
||||
```bash
|
||||
cd /Users/gabrielradureau/Work/Vibe/homelab_gateway
|
||||
cd /Users/gabrielradureau/Work/Vibe/telegram-gateway
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Phase 1 MVP — echo bot factory"
|
||||
git branch -M main
|
||||
git remote add origin ssh://git@192.168.1.202:2222/arcodange/homelab-gateway.git
|
||||
git remote add origin ssh://git@192.168.1.202:2222/arcodange/telegram-gateway.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
Gitea Actions build l'image et la pousse :
|
||||
`gitea.arcodange.lab/arcodange/homelab-gateway:latest`.
|
||||
`gitea.arcodange.lab/arcodange/telegram-gateway:latest`.
|
||||
|
||||
## 3. Créer le `Secret` k8s avec le token + secret_token
|
||||
|
||||
@@ -43,9 +43,9 @@ SECRET=$(openssl rand -hex 32)
|
||||
|
||||
# Le namespace est créé par ArgoCD si absent — on le crée explicitement avant
|
||||
# pour pouvoir y poser le Secret tout de suite.
|
||||
kubectl create namespace homelab-gateway --dry-run=client -o yaml | kubectl apply -f -
|
||||
kubectl create namespace telegram-gateway --dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
kubectl -n homelab-gateway create secret generic homelab-gateway-bots \
|
||||
kubectl -n telegram-gateway create secret generic telegram-gateway-bots \
|
||||
--from-literal=BOT_FACTORY_TOKEN='8737289837:AAEVIygazfxgqJTxaxOh3X-mEoKaV7Rw1Gw' \
|
||||
--from-literal=BOT_FACTORY_SECRET="$SECRET"
|
||||
|
||||
@@ -60,15 +60,15 @@ echo "secret_token = $SECRET"
|
||||
|
||||
## 4. Activer l'Application ArgoCD
|
||||
|
||||
L'entrée `homelab-gateway` est ajoutée dans
|
||||
L'entrée `telegram-gateway` est ajoutée dans
|
||||
`/Users/gabrielradureau/Work/Arcodange/factory/argocd/values.yaml` (PR
|
||||
ouverte). Une fois la PR mergée :
|
||||
|
||||
```bash
|
||||
kubectl -n argocd get app homelab-gateway -w
|
||||
kubectl -n argocd get app telegram-gateway -w
|
||||
# attends Healthy + Synced
|
||||
kubectl -n homelab-gateway logs deploy/homelab-gateway -f
|
||||
# attends "homelab-gateway listening on :8080 (1 bot(s) loaded)"
|
||||
kubectl -n telegram-gateway logs deploy/telegram-gateway -f
|
||||
# attends "telegram-gateway listening on :8080 (1 bot(s) loaded)"
|
||||
|
||||
# Smoke
|
||||
curl -I https://tg.arcodange.fr/healthz # → 200
|
||||
@@ -79,7 +79,7 @@ curl -I https://tg.arcodange.fr/healthz # → 200
|
||||
```bash
|
||||
export BOT_FACTORY_TOKEN='8737289837:AAEVIygazfxgqJTxaxOh3X-mEoKaV7Rw1Gw'
|
||||
export BOT_FACTORY_SECRET="$SECRET" # même valeur qu'à l'étape 3
|
||||
cd /Users/gabrielradureau/Work/Vibe/homelab_gateway
|
||||
cd /Users/gabrielradureau/Work/Vibe/telegram-gateway
|
||||
make setwebhook SLUG=factory BASE_URL=https://tg.arcodange.fr
|
||||
# → "webhook set: url=https://tg.arcodange.fr/bot/factory pending=0 last_err=\"\""
|
||||
```
|
||||
@@ -100,8 +100,8 @@ Pour le test `/echo coucou` répond `coucou`.
|
||||
|
||||
| Symptôme | Action |
|
||||
|---|---|
|
||||
| Pod `CreateContainerConfigError` | Le Secret `homelab-gateway-bots` manque. Le créer (étape 3). |
|
||||
| Pod `CrashLoopBackOff` "no bots in /etc/…/bots.yaml" | ConfigMap pas généré ou mal monté. `kubectl get cm -n homelab-gateway -o yaml`. |
|
||||
| Pod `CreateContainerConfigError` | Le Secret `telegram-gateway-bots` manque. Le créer (étape 3). |
|
||||
| Pod `CrashLoopBackOff` "no bots in /etc/…/bots.yaml" | ConfigMap pas généré ou mal monté. `kubectl get cm -n telegram-gateway -o yaml`. |
|
||||
| `curl https://tg.arcodange.fr/healthz` → 502/504 | Ingress pas encore propagé OU le pod n'est pas Ready. `kubectl describe ingress` + `kubectl describe pod`. |
|
||||
| `setWebhook` → `Wrong response from the webhook: 401` | `BOT_FACTORY_SECRET` côté Secret ≠ celui passé à setWebhook. Régénérer + recréer le Secret avec `kubectl delete && create`. |
|
||||
| Webhook accepté mais pas de réponse Telegram | `kubectl logs` côté gateway → erreur sendMessage. Token bot invalide (révoqué via @BotFather ?) ou rate-limit Telegram. |
|
||||
@@ -112,6 +112,6 @@ Pour le test `/echo coucou` répond `coucou`.
|
||||
- Phase 3 : handlers `shell` / `script` / `ollama` async, retry quand le
|
||||
Macbook Ollama est endormi.
|
||||
- Phase 4 : passage à Vault (toggle `vault.enabled: true` + provisionner
|
||||
`kvv2/homelab-gateway/config`), Wake-on-LAN, multi-provider.
|
||||
`kvv2/telegram-gateway/config`), Wake-on-LAN, multi-provider.
|
||||
|
||||
Plan complet : `~/.claude/plans/pour-les-notifications-on-inherited-seal.md`.
|
||||
|
||||
Reference in New Issue
Block a user