Containerize MCP tool services

This commit is contained in:
Mikei386
2026-08-20 23:54:02 +02:00
parent 3ab9628088
commit f0d552ef58
28 changed files with 858 additions and 305 deletions
+16 -20
View File
@@ -10,30 +10,26 @@ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PLATFORM="$REPO_ROOT/platform"
PROFILE_TARGET=/opt/mike-ai/platform/profiles
DROPIN=/etc/systemd/system/mike-ai-llama-ui.service.d
WEB_TARGET=/opt/mike-ai/web-search
MCP_ROOT=/opt/mike-ai/mcp-containers
MCP_TARGET=$MCP_ROOT/platform/mcp
MCP_SEARCH_TARGET=$MCP_ROOT/platform/web-search
install -d -m 0755 "$PROFILE_TARGET" "$DROPIN" "$WEB_TARGET" /etc/mike-ai
install -d -m 0755 "$PROFILE_TARGET" "$DROPIN" \
"$MCP_TARGET" "$MCP_ROOT/platform/web-search" /etc/mike-ai
install -m 0644 "$PLATFORM/systemd/mike-ai-llama-ui.service" \
/etc/systemd/system/mike-ai-llama-ui.service
install -m 0644 "$PLATFORM/systemd/mike-ai-web-search.service" \
/etc/systemd/system/mike-ai-web-search.service
install -m 0755 "$PLATFORM/scripts/llama-profile" /usr/local/bin/llama-profile
install -m 0644 "$PLATFORM/profiles/profile-fast.conf" "$PROFILE_TARGET/profile-fast.conf"
install -m 0644 "$PLATFORM/profiles/profile-medium.conf" "$PROFILE_TARGET/profile-medium.conf"
install -m 0644 "$PLATFORM/profiles/profile-long.conf" "$PROFILE_TARGET/profile-long.conf"
install -m 0644 "$PLATFORM/web-search/compose.yaml" "$WEB_TARGET/compose.yaml"
install -m 0644 "$PLATFORM/web-search/tinysearch_config.json" \
"$WEB_TARGET/tinysearch_config.json"
install -m 0755 "$PLATFORM/web-search/web_search_mcp.py" \
"$WEB_TARGET/web_search_mcp.py"
if [[ ! -e "$WEB_TARGET/searxng-settings.yml" ]]; then
install -m 0600 "$PLATFORM/web-search/searxng-settings.example.yml" \
"$WEB_TARGET/searxng-settings.yml.example"
fi
if [[ ! -e /etc/mike-ai/mcp-servers.json ]]; then
install -m 0600 "$PLATFORM/mcp/mcp-servers.example.json" \
/etc/mike-ai/mcp-servers.json.example
rsync -a --delete "$PLATFORM/mcp/" "$MCP_TARGET/"
rsync -a --delete --exclude searxng-settings.yml \
"$PLATFORM/web-search/" "$MCP_SEARCH_TARGET/"
if [[ ! -s $MCP_SEARCH_TARGET/searxng-settings.yml ]]; then
install -m 0640 "$PLATFORM/web-search/searxng-settings.example.yml" \
"$MCP_SEARCH_TARGET/searxng-settings.yml"
sed -i "s/CHANGE_ME_GENERATE_RANDOM_SECRET/$(openssl rand -hex 32)/" \
"$MCP_SEARCH_TARGET/searxng-settings.yml"
fi
systemctl daemon-reload
@@ -43,7 +39,7 @@ Kernkonfiguration installiert, aber noch nicht gestartet.
Vor dem Start:
1. Modellpfade und Hashes gegen manifest.local.yaml prüfen.
2. /etc/mike-ai/mcp-servers.json mit minimalen Servern erstellen.
3. llama.cpp bauen.
4. Danach: llama-profile fast
2. llama.cpp bauen und mit `llama-profile fast` starten.
3. Fach-Secrets unter /etc/mike-ai ablegen.
4. Danach: /opt/mike-ai/mcp-containers/platform/mcp/install-tools.sh
EOF