Skip to content

Fresh Deployment

Terminal window
# 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 Maven
sudo 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 CLI
type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "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/null
sudo apt update && sudo apt install gh
# Authenticate GitHub CLI
gh auth login
Terminal window
gh repo clone Deployd-io/LogriteMasterControl /root/logrite
cd /root/logrite
npm install # Install CLI dependencies (cd cli && npm install && cd ..)
Terminal window
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/main
mkdir -p /root/logrite/services/ai-service/main
mkdir -p /root/logrite/services/mcp/main
mkdir -p /root/logrite/services/webhook
Terminal window
cd /root/logrite
# Frontend (main + dev branches)
gh repo clone Deployd-io/Logrite-UI services/frontend/main/Logrite-UI
cd services/frontend/main/Logrite-UI && git checkout main && cd /root/logrite
gh repo clone Deployd-io/Logrite-UI services/frontend/dev/Logrite-UI
cd 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-AI
cd services/backend/main/Logrite-AI && git checkout main && cd /root/logrite
gh repo clone Deployd-io/Logrite-AI services/backend/dev/Logrite-AI
cd 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-analyzer
cd services/analyzer/main/logrite-analyzer && git checkout main && cd /root/logrite
gh repo clone Deployd-io/logrite-analyzer services/analyzer/dev/logrite-analyzer
cd 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 Server
gh repo clone Deployd-io/logrite-webhook services/webhook
Terminal window
# Frontend (main)
cd /root/logrite/services/frontend/main/Logrite-UI
npm install && npm run build
# Frontend (dev)
cd /root/logrite/services/frontend/dev/Logrite-UI
npm install && npm run build
# Backend (main) — requires Java 17
cd /root/logrite/services/backend/main/Logrite-AI
mvn clean package -DskipTests
# Backend (dev)
cd /root/logrite/services/backend/dev/Logrite-AI
mvn clean package -DskipTests
# Analyzer (main) — TypeScript build
cd /root/logrite/services/analyzer/main/logrite-analyzer
npm install && npm run build
# Analyzer (dev)
cd /root/logrite/services/analyzer/dev/logrite-analyzer
npm install && npm run build
# Semantic Search
cd /root/logrite/services/semantic-search/main/logrite-semantic-api
npm install && npm run build
# AI Service
cd /root/logrite/services/ai-service/main/logrite-ai-service
npm install && npm run build
# MCP Server
cd /root/logrite/services/mcp/main/logrite-mcp-server
pip install -r requirements.txt

Each service needs a .env file. Copy the example and fill in secrets:

Terminal window
# AI Service
cp /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 secret

See Environment Variables for full reference.

Terminal window
mkdir -p /root/opensearch
gh repo clone Deployd-io/LogriteOpenSearch /root/opensearch/cli/../
# Clone OpenSearch forks
gh repo clone Deployd-io/OpenSearch /root/opensearch/OpenSearch
gh 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-amd64
opensearch-mgr build opensearch
opensearch-mgr deploy
# Build Dashboards (takes 5-15 minutes)
opensearch-mgr build dashboards
# Create opensearch user
sudo useradd -r -s /bin/false opensearch
sudo chown -R opensearch:opensearch /opt/opensearch
# Start OpenSearch
opensearch-mgr start all
Terminal window
# Wait for OpenSearch to be green
curl -s http://localhost:9200/_cluster/health | jq .status
# Set up ML model and semantic indexes
opensearch-mgr semantic-setup
Terminal window
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 status
Terminal window
curl http://localhost:3000 # Frontend (HTTP 200)
curl http://localhost:8080/health # Backend
curl http://localhost:9000/health # Analyzer
curl http://localhost:9100/health # Semantic Search
curl http://localhost:9300/health # AI Service
curl http://localhost:9500/health # MCP Server
curl http://localhost:9200/_cluster/health # OpenSearch

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

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:

Terminal window
systemctl is-enabled logrite-deploy-watcher logrite-management
docker ps --format '{{.Names}}\t{{.Status}}'
# Follow the command it outputs