**Motivations:** - Manage ia-dev-gateway, tools-bridge and orchestrator as user services. - Provide a repeatable install path aligned with existing systemd patterns. **Root causes:** - N/A **Correctifs:** - N/A **Evolutions:** - Add systemd user unit templates for ia-dev-gateway, smart-ide-tools-bridge and smart-ide-orchestrator. - Add an install script and document it in docs/repo/systemd-units.md. **Pages affectées:** - N/A
3.8 KiB
Unités systemd (smart_ide)
Ollama
Installé par l’installateur officiel Ollama Linux. Unité : ollama.service.
Exposer l’API à Docker sur le même hôte (AnythingLLM) avec un drop-in :
# /etc/systemd/system/ollama.service.d/override.conf
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Puis : sudo systemctl daemon-reload && sudo systemctl restart ollama
Script d’aide dans le dépôt : setup/configure-ollama-for-docker.sh (écrit ce drop-in).
AnythingLLM
anythingllm.service— image Docker officielle au premier plan sous systemd (Type=simple).- Défauts :
/etc/default/anythingllm(copier depuissystemd/anythingllm.defaultsi absent). - Helper :
/usr/local/sbin/anythingllm-docker-exec.sh(installé depuisscripts/anythingllm-docker-exec.sh).
Installation / rafraîchissement :
sudo ./scripts/install-systemd-services.sh
Commandes :
sudo systemctl status anythingllm
sudo systemctl restart anythingllm
journalctl -u anythingllm -f
Nécessite docker.service, utilisateur autorisé à utiliser Docker, et chemins dans /etc/default/anythingllm si stockage non standard.
Git pull des clones projet (utilisateur, pas root)
Tirage périodique des dépôts listés dans projects/*/conf.json (voir cron-git-pull.md) :
- Unités :
systemd/user/git-pull-project-clones.service.in+systemd/user/git-pull-project-clones.timer - Installation :
scripts/install-git-pull-systemd-user.sh(écrit dans~/.config/systemd/user/, sanssudo) - Configuration :
cron/config.env
smart-ide-global-api et smart-ide-sso-gateway (utilisateur)
Unités user pour l’agrégateur HTTP interne puis la passerelle OIDC. L’unité SSO déclare Requires=smart-ide-global-api.service et After=smart-ide-global-api.service pour garantir l’ordre de démarrage.
- Gabarits :
systemd/user/smart-ide-global-api.service.in,systemd/user/smart-ide-sso-gateway.service.in - Variables :
config/services.local.env(copie deconfig/services.local.env.example, gitignoré) —GLOBAL_API_INTERNAL_TOKEN,OIDC_ISSUER, jetons micro-services, etc. - Prérequis :
npm ci && npm run builddanspackages/smart-ide-upstreams,services/smart-ide-global-api,services/smart-ide-sso-gateway
Installation :
./scripts/install-smart-ide-gateway-systemd-user.sh
systemctl --user start smart-ide-global-api smart-ide-sso-gateway
systemctl --user status smart-ide-global-api smart-ide-sso-gateway
ia-dev-gateway, smart-ide-tools-bridge, smart-ide-orchestrator (utilisateur)
Unités user pour :
ia-dev-gateway(catalogue agents, runs, SSE)smart-ide-tools-bridge(registry + jobs Carbonyl/PageIndex/Chandra)smart-ide-orchestrator(routage d’intentions)
Gabarits :
systemd/user/ia-dev-gateway.service.insystemd/user/smart-ide-tools-bridge.service.insystemd/user/smart-ide-orchestrator.service.in
Variables : config/services.local.env (copie de config/services.local.env.example, gitignoré) :
IA_DEV_GATEWAY_TOKENTOOLS_BRIDGE_TOKENORCHESTRATOR_TOKEN
Prérequis : npm ci && npm run build dans :
services/ia-dev-gatewayservices/smart-ide-tools-bridgeservices/smart-ide-orchestrator
Installation :
./scripts/install-smart-ide-core-services-systemd-user.sh
systemctl --user start ia-dev-gateway smart-ide-tools-bridge smart-ide-orchestrator
systemctl --user status ia-dev-gateway smart-ide-tools-bridge smart-ide-orchestrator
Linger (session fermée)
Les timers user ne tournent en général que lorsqu’une session utilisateur systemd est active. Pour exécuter les timers après déconnexion graphique complète, activer le linger pour l’utilisateur : loginctl enable-linger <user> (décision d’administration machine).