From 7cdaf5a0c52219af8096be89c0696e7ea42620fb Mon Sep 17 00:00:00 2001 From: izapata Date: Mon, 16 Feb 2026 14:50:55 +0100 Subject: [PATCH] feat: update README and add start-tunnels.sh script for infrastructure setup --- README.md | 6 ++--- scripts/start-tunnels.sh | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100755 scripts/start-tunnels.sh diff --git a/README.md b/README.md index d246749..88d39c7 100644 --- a/README.md +++ b/README.md @@ -115,13 +115,13 @@ Open a terminal and establish the connection to the Devaron Cluster: ```bash # 1. AI Model Tunnel (Ollama) -kubectl port-forward svc/ollama-light-service 11434:11434 -n brunix --kubeconfig ./ivar.yaml & +kubectl port-forward --address 0.0.0.0 svc/ollama-light-service 11434:11434 -n brunix --kubeconfig ./kubernetes/ivar.yaml & # 2. Knowledge Base Tunnel (Elasticsearch) -kubectl port-forward svc/brunix-vector-db 9200:9200 -n brunix --kubeconfig ./ivar.yaml & +kubectl port-forward --address 0.0.0.0 svc/brunix-vector-db 9200:9200 -n brunix --kubeconfig ./kubernetes/ivar.yaml & # 3. Observability DB Tunnel (PostgreSQL) -kubectl port-forward svc/brunix-postgres 5432:5432 -n brunix --kubeconfig ./ivar.yaml & +kubectl port-forward --address 0.0.0.0 svc/brunix-postgres 5432:5432 -n brunix --kubeconfig ./kubernetes/ivar.yaml & ``` ### 4. Launch the Engine diff --git a/scripts/start-tunnels.sh b/scripts/start-tunnels.sh new file mode 100755 index 0000000..12593b4 --- /dev/null +++ b/scripts/start-tunnels.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Start Infrastructure Tunnels for Brunix Assistance Engine +# Connects to the Devaron Cluster in Vultr Cloud + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +KUBECONFIG_PATH="$PROJECT_ROOT/$(grep KUBECONFIG_PATH "$PROJECT_ROOT/.env" | cut -d '=' -f2)" + +# Colors for output +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${GREEN}Starting Brunix Infrastructure Tunnels...${NC}" +echo "" + +# Check if kubeconfig exists +if [ ! -f "$KUBECONFIG_PATH" ]; then + echo "Error: Kubeconfig not found at $KUBECONFIG_PATH" + exit 1 +fi + +# 1. AI Model Tunnel (Ollama) +echo -e "${YELLOW}[1/3]${NC} Starting Ollama Light Service tunnel (localhost:11434)..." +kubectl port-forward --address 0.0.0.0 svc/ollama-light-service 11434:11434 -n brunix --kubeconfig "$KUBECONFIG_PATH" & +OLLAMA_PID=$! + +# 2. Knowledge Base Tunnel (Elasticsearch) +echo -e "${YELLOW}[2/3]${NC} Starting Elasticsearch Vector DB tunnel (localhost:9200)..." +kubectl port-forward --address 0.0.0.0 svc/brunix-vector-db 9200:9200 -n brunix --kubeconfig "$KUBECONFIG_PATH" & +ES_PID=$! + +# 3. Observability DB Tunnel (PostgreSQL) +echo -e "${YELLOW}[3/3]${NC} Starting PostgreSQL tunnel (localhost:5432)..." +kubectl port-forward --address 0.0.0.0 svc/brunix-postgres 5432:5432 -n brunix --kubeconfig "$KUBECONFIG_PATH" & +PG_PID=$! + +echo "" +echo -e "${GREEN}✓ All tunnels started successfully${NC}" +echo "" +echo "Process IDs:" +echo " Ollama: $OLLAMA_PID" +echo " Elasticsearch: $ES_PID" +echo " PostgreSQL: $PG_PID" +echo "" +echo "To stop all tunnels, run:" +echo " kill $OLLAMA_PID $ES_PID $PG_PID" +echo "" +echo "Press Ctrl+C to stop all tunnels and exit..." + +# Wait for all background processes +wait