M6: OpenWebUI + Egress-Netz fuer OIDC (Engine-Netz bleibt internal) (#10)
ci-static / secret-scan (push) Successful in 21s
ci-static / yamllint (push) Successful in 32s
ci-static / ansible-syntax (push) Successful in 36s
ci-static / markdown-links (push) Successful in 20s

Co-authored-by: vibe-agent <vibe-agent@ghostnet.local>
This commit was merged in pull request #10.
This commit is contained in:
2026-11-11 20:04:44 +01:00
committed by spektr
parent d2c701a195
commit 3618e73dd8
4 changed files with 26 additions and 2 deletions
@@ -18,6 +18,11 @@ open_webui_home: /var/lib/ghostnet-ai/production
open_webui_quadlet_dir: /etc/containers/systemd/users/980
open_webui_unit_prefix: gnai-production-openwebui
open_webui_network_name: gnai-production-llama
# The engine network is Internal=true (no egress). OpenWebUI additionally
# joins this egress network so it can reach the public OIDC discovery
# (auth.ghostnet.selfhost.eu) while llama.cpp stays reachable via the
# internal network only.
open_webui_egress_network_name: gnai-production-egress
# Engine endpoint inside the shared Production network. llama.cpp itself
# has no auth; OpenWebUI just needs a non-empty key value, supplied via a
@@ -152,6 +152,17 @@
- open_webui_oidc_enabled | bool
- open_webui_oidc_secret_exists.rc != 0
- name: Render the egress network quadlet
ansible.builtin.template:
src: egress.network.j2
dest: "{{ open_webui_quadlet_dir }}/{{ open_webui_egress_network_name }}.network"
owner: root
group: "{{ open_webui_user }}"
mode: "0640"
notify:
- Reload workload user manager
- Restart OpenWebUI unit
- name: Render the OpenWebUI quadlet
ansible.builtin.template:
src: open-webui.container.j2
@@ -0,0 +1,7 @@
[Network]
NetworkName={{ open_webui_egress_network_name }}
Driver=bridge
# Egress allowed: OpenWebUI must reach the public OIDC discovery endpoint.
# The engine network stays Internal=true; llama.cpp remains unreachable
# from outside via this path (no publish on the engine container).
Internal=false
@@ -1,13 +1,14 @@
[Unit]
Description=OpenWebUI chat frontend for the Production LLM engine ({{ open_webui_image_tag }})
Wants={{ open_webui_network_name }}-network.service
After={{ open_webui_network_name }}-network.service
Wants={{ open_webui_network_name }}-network.service {{ open_webui_egress_network_name }}-network.service
After={{ open_webui_network_name }}-network.service {{ open_webui_egress_network_name }}-network.service
[Container]
Image={{ open_webui_image_ref }}
Pull=never
ContainerName={{ open_webui_unit_prefix }}
Network={{ open_webui_network_name }}
Network={{ open_webui_egress_network_name }}
PublishPort={{ open_webui_host_addr }}:{{ open_webui_host_port }}:{{ open_webui_container_port }}
Volume={{ open_webui_data_dir }}:/app/backend/data:rw
# Secrets are injected as environment variables, never written to disk or git.