Fresh Deployment
Step 1: System Prerequisites
Section titled “Step 1: System Prerequisites”# Install Node.js 20+curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -sudo apt-get install -y nodejs
# Install Java 17 (Spring Boot) and Java 21 (OpenSearch)sudo apt-get install -y openjdk-17-jdk openjdk-21-jdk
# Install Mavensudo apt-get install -y maven
# Install Python 3.10+sudo apt-get install -y python3 python3-pip
# Docker — every service on both VMs is a container. Nothing runs on the host.docker --version
# Install GitHub CLItype -p curl >/dev/null || sudo apt install curl -ycurl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpgecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/nullsudo apt update && sudo apt install gh
# Authenticate GitHub CLIgh auth loginStep 2: Clone LogriteMasterControl
Section titled “Step 2: Clone LogriteMasterControl”gh repo clone Deployd-io/LogriteMasterControl /root/logritecd /root/logritenpm install # Install CLI dependencies (cd cli && npm install && cd ..)Step 3: Create Directory Structure
Section titled “Step 3: Create Directory Structure”mkdir -p /root/logrite/services/frontend/{main,dev}mkdir -p /root/logrite/services/backend/{main,dev}mkdir -p /root/logrite/services/analyzer/{main,dev}mkdir -p /root/logrite/services/semantic-search/mainmkdir -p /root/logrite/services/ai-service/mainmkdir -p /root/logrite/services/mcp/mainmkdir -p /root/logrite/services/webhookStep 4: Clone All Service Repos
Section titled “Step 4: Clone All Service Repos”cd /root/logrite
# Frontend (main + dev branches)gh repo clone Deployd-io/Logrite-UI services/frontend/main/Logrite-UIcd services/frontend/main/Logrite-UI && git checkout main && cd /root/logritegh repo clone Deployd-io/Logrite-UI services/frontend/dev/Logrite-UIcd services/frontend/dev/Logrite-UI && git checkout main && cd /root/logrite
# Backend (main + dev branches)gh repo clone Deployd-io/Logrite-AI services/backend/main/Logrite-AIcd services/backend/main/Logrite-AI && git checkout main && cd /root/logritegh repo clone Deployd-io/Logrite-AI services/backend/dev/Logrite-AIcd services/backend/dev/Logrite-AI && git checkout main && cd /root/logrite
# Analyzer (main + dev branches)gh repo clone Deployd-io/logrite-analyzer services/analyzer/main/logrite-analyzercd services/analyzer/main/logrite-analyzer && git checkout main && cd /root/logritegh repo clone Deployd-io/logrite-analyzer services/analyzer/dev/logrite-analyzercd services/analyzer/dev/logrite-analyzer && git checkout main && cd /root/logrite
# Semantic Search (main only)gh repo clone Deployd-io/logrite-semantic-api services/semantic-search/main/logrite-semantic-api
# AI Service (main only)gh repo clone Deployd-io/logrite-ai-service services/ai-service/main/logrite-ai-service
# MCP Server (main only)gh repo clone Deployd-io/logrite-mcp-server services/mcp/main/logrite-mcp-server
# Webhook Servergh repo clone Deployd-io/logrite-webhook services/webhookStep 5: Install Dependencies & Build
Section titled “Step 5: Install Dependencies & Build”# Frontend (main)cd /root/logrite/services/frontend/main/Logrite-UInpm install && npm run build
# Frontend (dev)cd /root/logrite/services/frontend/dev/Logrite-UInpm install && npm run build
# Backend (main) — requires Java 17cd /root/logrite/services/backend/main/Logrite-AImvn clean package -DskipTests
# Backend (dev)cd /root/logrite/services/backend/dev/Logrite-AImvn clean package -DskipTests
# Analyzer (main) — TypeScript buildcd /root/logrite/services/analyzer/main/logrite-analyzernpm install && npm run build
# Analyzer (dev)cd /root/logrite/services/analyzer/dev/logrite-analyzernpm install && npm run build
# Semantic Searchcd /root/logrite/services/semantic-search/main/logrite-semantic-apinpm install && npm run build
# AI Servicecd /root/logrite/services/ai-service/main/logrite-ai-servicenpm install && npm run build
# MCP Servercd /root/logrite/services/mcp/main/logrite-mcp-serverpip install -r requirements.txtStep 6: Configure Environment Variables
Section titled “Step 6: Configure Environment Variables”Each service needs a .env file. Copy the example and fill in secrets:
# AI Servicecp /root/logrite/services/ai-service/main/logrite-ai-service/.env.example \ /root/logrite/services/ai-service/main/logrite-ai-service/.env# Edit .env: set GROQ_API_KEY
# Analyzer (main)cp /root/logrite/services/analyzer/main/logrite-analyzer/.env.example \ /root/logrite/services/analyzer/main/logrite-analyzer/.env# Edit .env: set GROQ_API_KEY, PORT=9000
# Analyzer (dev)cp /root/logrite/services/analyzer/dev/logrite-analyzer/.env.example \ /root/logrite/services/analyzer/dev/logrite-analyzer/.env# Edit .env: set PORT=9001
# Webhook server config# Edit /root/logrite/config/webhook.json: set GitHub webhook secretSee Environment Variables for full reference.
Step 7: Deploy OpenSearch
Section titled “Step 7: Deploy OpenSearch”mkdir -p /root/opensearchgh repo clone Deployd-io/LogriteOpenSearch /root/opensearch/cli/../
# Clone OpenSearch forksgh repo clone Deployd-io/OpenSearch /root/opensearch/OpenSearchgh repo clone Deployd-io/OpenSearch-Dashboards /root/opensearch/OpenSearch-Dashboards
# Build and deploy OpenSearch (requires Java 21)export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64opensearch-mgr build opensearchopensearch-mgr deploy
# Build Dashboards (takes 5-15 minutes)opensearch-mgr build dashboards
# Create opensearch usersudo useradd -r -s /bin/false opensearchsudo chown -R opensearch:opensearch /opt/opensearch
# Start OpenSearchopensearch-mgr start allStep 8: Set Up Semantic Search
Section titled “Step 8: Set Up Semantic Search”# Wait for OpenSearch to be greencurl -s http://localhost:9200/_cluster/health | jq .status
# Set up ML model and semantic indexesopensearch-mgr semantic-setupStep 9: Start All Logrite Services
Section titled “Step 9: Start All Logrite Services”cd /root/logrite
# Start all services (waits for OpenSearch health check)./cli/logrite-manager.js start-all
# Verify everything is running./cli/logrite-manager.js statusStep 10: Verify Health
Section titled “Step 10: Verify Health”curl http://localhost:3000 # Frontend (HTTP 200)curl http://localhost:8080/health # Backendcurl http://localhost:9000/health # Analyzercurl http://localhost:9100/health # Semantic Searchcurl http://localhost:9300/health # AI Servicecurl http://localhost:9500/health # MCP Servercurl http://localhost:9200/_cluster/health # OpenSearchStep 11: Set Up GitHub Webhooks
Section titled “Step 11: Set Up GitHub Webhooks”In each GitHub repo (Settings → Webhooks):
- Payload URL:
http://your-server:9999/webhook - Content type:
application/json - Secret: matches
config/webhook.json - Events: Push events
Step 12: Survive a reboot
Section titled “Step 12: Survive a reboot”Nothing to save. Containers carry restart: unless-stopped from the compose
stack, and the platform’s own pieces are systemd units that are already
enabled:
systemctl is-enabled logrite-deploy-watcher logrite-managementdocker ps --format '{{.Names}}\t{{.Status}}'# Follow the command it outputs