mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 06:44:42 +02:00
ajout de linterface hermes + route
This commit is contained in:
parent
5615ead566
commit
572e949ce4
5 changed files with 60 additions and 1 deletions
|
|
@ -34,6 +34,9 @@ table inet filter {
|
|||
# Hermes gateway (accès LAN domestique + cluster)
|
||||
tcp dport 8080 ip saddr { 192.168.1.0/24, 192.168.10.0/24 } accept
|
||||
|
||||
# Hermes dashboard (poste admin uniquement)
|
||||
tcp dport 9119 ip saddr {{ hermes_dashboard_allowed_ip }} accept
|
||||
|
||||
# LiteLLM (localhost uniquement — pas d'accès réseau direct)
|
||||
# Port 4000 non exposé ici intentionnellement
|
||||
|
||||
|
|
@ -43,8 +46,13 @@ table inet filter {
|
|||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
|
||||
# Forwarding LAN cluster → WAN
|
||||
# Forwarding LAN cluster → WAN (NAT sortant)
|
||||
iif {{ lan_interface }} oif {{ wan_interface }} ct state new,established,related accept
|
||||
|
||||
# Forwarding LAN domestique → LAN cluster (accès admin depuis le poste perso)
|
||||
iif {{ wan_interface }} oif {{ lan_interface }} ip saddr 192.168.1.0/24 ct state new,established,related accept
|
||||
|
||||
# Réponses WAN → cluster (connexions initiées depuis le cluster)
|
||||
iif {{ wan_interface }} oif {{ lan_interface }} ct state established,related accept
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,3 +10,7 @@ hermes_context_length: 65536
|
|||
|
||||
hermes_gateway_port: 8080
|
||||
hermes_gateway_host: "0.0.0.0"
|
||||
|
||||
# Dashboard web
|
||||
hermes_dashboard_port: 9119
|
||||
hermes_dashboard_allowed_ip: "192.168.1.10"
|
||||
|
|
|
|||
|
|
@ -7,3 +7,8 @@
|
|||
ansible.builtin.systemd:
|
||||
name: hermes-agent
|
||||
state: restarted
|
||||
|
||||
- name: Restart hermes-dashboard
|
||||
ansible.builtin.systemd:
|
||||
name: hermes-dashboard
|
||||
state: restarted
|
||||
|
|
|
|||
|
|
@ -132,6 +132,24 @@
|
|||
daemon_reload: true
|
||||
state: started
|
||||
|
||||
# --- Dashboard systemd ---
|
||||
|
||||
- name: Deploy hermes-dashboard systemd service
|
||||
ansible.builtin.template:
|
||||
src: hermes-dashboard.service.j2
|
||||
dest: /etc/systemd/system/hermes-dashboard.service
|
||||
mode: '0644'
|
||||
notify:
|
||||
- Reload systemd
|
||||
- Restart hermes-dashboard
|
||||
|
||||
- name: Enable and start hermes-dashboard
|
||||
ansible.builtin.systemd:
|
||||
name: hermes-dashboard
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
state: started
|
||||
|
||||
# --- Wrapper global ---
|
||||
|
||||
- name: Deploy hermes global wrapper (/usr/local/bin/hermes)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Hermes Agent Web Dashboard
|
||||
After=hermes-agent.service
|
||||
Wants=hermes-agent.service
|
||||
|
||||
[Service]
|
||||
User={{ hermes_user }}
|
||||
Group={{ hermes_user }}
|
||||
|
||||
Environment=HOME={{ hermes_home }}
|
||||
Environment=HERMES_HOME={{ hermes_data_dir }}
|
||||
Environment=PATH={{ hermes_data_dir }}/node/bin:{{ hermes_data_dir }}/hermes-agent/venv/bin:/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
ExecStart={{ hermes_home }}/.local/bin/hermes dashboard --no-open --tui --insecure --host {{ ansible_host }} --port {{ hermes_dashboard_port }}
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=hermes-dashboard
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue