Deployment Checklist
Pre-Deployment Checklist
System Requirements Verification
Hardware
Software
Verification Commands
Linux:
# Check Docker
docker --version
# Check disk space
df -h /
# Check shell
echo $SHELLWindows (PowerShell):
# Check Docker
docker --version
# Check disk space
Get-PSDrive C | Select-Object Used,FreePort Availability Check
Verification Commands
Linux:
# Check if ports are in use
sudo lsof -i :8000
sudo lsof -i :8002
sudo lsof -i :3306
sudo lsof -i :8200
# No output = ports are free ✓
# Alternative using netstat:
netstat -an | grep :8000Windows (PowerShell):
# Check if ports are in use
netstat -ano | findstr :8000
netstat -ano | findstr :8002
netstat -ano | findstr :3306
netstat -ano | findstr :8200
# No output = ports are free ✓API Keys Obtained
Get API Key
Visit: https://makersuite.google.com/app/apikey
Sign in with Google account
Click "Create API Key"
Copy and save the key
Test API Key
Linux:
# Test API key
API_KEY="YOUR_API_KEY_HERE"
curl "https://generativelanguage.googleapis.com/v1beta/models?key=$API_KEY"
# Should return list of modelsWindows (PowerShell):
$apiKey = "YOUR_API_KEY_HERE"
$uri = "https://generativelanguage.googleapis.com/v1beta/models?key=$apiKey"
Invoke-RestMethod -Uri $uri
# Should return list of modelsProject Files Verification
Required Files for Ubuntu Docker Deployment
├── rag-in-a-box_1.0_amd64.deb
├── Dockerfile
├── docker-compose.yml
├── start-services.sh
├── config.env.secure.local
├── config.env.vault.local
├── config.env.template
└── Localvault/
├── docker-compose.vault.yml
└── setup_vault_local.ps1Verification Commands
Linux:
# Navigate to download location
cd /path/to/download/location
# List files
ls -lhWindows (PowerShell):
# Navigate to download location
cd "C:\path\to\download\location"
# List files
Get-ChildItem | Select-Object Name, LengthConfiguration File Setup
Critical Settings to Verify
# API Key (MUST UPDATE)
GEMINI_API_KEY=YOUR_ACTUAL_API_KEY_HERE
# Database (default values OK)
DB_HOST=mysql-db
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_secure_database_password
DB_NAME=kb_chunks
# Security Keys (MUST BE IDENTICAL)
SECRET_KEY=your_generated_secret_key_must_be_same_for_all_three
JWT_SECRET_KEY=your_generated_secret_key_must_be_same_for_all_three
MCP_AUTH_SECRET_KEY=your_generated_secret_key_must_be_same_for_all_three
# Server Configuration (default values OK)
APP_HOST=0.0.0.0
APP_PORT=8000
MCP_HOST=0.0.0.0
MCP_PORT=8002Deployment Checklist - Standalone Mode
Step 1: Build Docker Image
Commands
cd "c:\Users\YourUsername\OneDrive\WIP\MariaDB AI RAG Binaries\Ubuntu"
cd "c:\Users\YourUsername\OneDrive\WIP\AI Nexus Binaries\Ubuntu"
cd "c:\DOWNLOAD-LOCATION"
docker build -t ai-nexus-image .Verification
docker images | Select-String "ai-nexus-image"
# Should show: ai-nexus-image latest <image-id> <time> ~1.2GBStep 2: Start Services
Commands
docker compose up -dExpected Output
[+] Running 3/3
✔ Network ai-nexus-network Created
✔ Container mysql-db Started
✔ Container ai-nexus StartedStep 3: Monitor Startup
Commands
docker logs ai-nexus -f
# Press Ctrl+C to exit (containers keep running)Expected Log Messages
Starting RAG server...
RAG server started with PID: 15
Waiting for RAG API to be ready...
✓ RAG API is ready! (took ~30 seconds)
Starting MCP server...
Adaptive MCP Server ready on 0.0.0.0:8002
INFO: Uvicorn running on http://0.0.0.0:8000Step 4: Verify Container Status
Commands
docker-compose psExpected Output
NAME STATUS PORTS
ai-nexus Up X minutes 0.0.0.0:8000->8000/tcp, 0.0.0.0:8002->8002/tcp
mysql-db Up X minutes (healthy) 0.0.0.0:3306->3306/tcpStep 5: Test API Accessibility
Commands
Linux:
# Test RAG API
curl http://localhost:8000/health
# Open Swagger UI in browser
xdg-open http://localhost:8000/docs # Linux
# Test MCP Server
curl http://localhost:8002/healthWindows (PowerShell):
# Test RAG API
Invoke-RestMethod -Uri "http://localhost:8000/health"
# Open Swagger UI
Start-Process "http://localhost:8000/docs"
# Test MCP Server
Invoke-RestMethod -Uri "http://localhost:8002/health"Deployment Checklist - Vault Mode
Step 1: Build Docker Image
Commands
cd "c:\Users\YourUsername\OneDrive\WIP\MariaDB AI RAG Binaries\Ubuntu"
cd "c:\Users\YourUsername\OneDrive\WIP\AI Nexus Binaries\Ubuntu"
cd "c:\DOWNLOAD-LOCATION"
docker build -t ai-nexus-image .Step 2: Run Vault Setup Script
Commands
.\Localvault\setup_vault_local.ps1Expected Output
[SUCCESS] Vault Setup Complete!
Vault Details:
URL: http://127.0.0.1:8200
Token: rag-root-token
Path: secret/rag-in-a-boxStep 3: Verify Vault Status
Commands
# Check Vault container
docker ps --filter "name=rag-vault"
# View secrets
docker exec -e VAULT_TOKEN=rag-root-token rag-vault vault kv get secret/rag-in-a-boxStep 4: Update Gemini API Key in Vault
Commands
docker exec -e VAULT_TOKEN=rag-root-token rag-vault vault kv patch secret/rag-in-a-box GEMINI_API_KEY="YOUR_ACTUAL_API_KEY"Step 5: Start MariaDB AI RAG with Vault Config
Step 5: Start AI Nexus with Vault Config
Step 5: Start MariaDB AI RAG with Vault Config
Commands
docker-compose --env-file config.env.vault.local up -dStep 6: Verify Deployment
Commands
Linux:
docker compose ps
docker logs ai-nexus -f
curl http://localhost:8000/healthWindows (PowerShell):
docker compose ps
docker logs ai-nexus -f
Invoke-RestMethod -Uri "http://localhost:8000/health"Post-Deployment Checklist
Authentication Setup
Steps
Open: http://localhost:8000/docs
Click on
POST /tokenClick "Try it out"
Enter credentials:
{ "username": "admin", "password": "your_password" }Click "Execute"
Copy
access_tokenfrom response
Authorize in Swagger UI
Test Document Ingestion
Test Files
Use files from test_documents/ directory or upload your own:
PDF files
TXT files
DOCX files
MD files
Test RAG Query
Example Query
{
"query": "What is the main topic of the document?"
}Test MCP Server (Optional)
MCP Configuration
{
"mcpServers": {
"ai-nexus": {
"url": "http://localhost:8002/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
}
}
}
}Verification Checklist
System Health Checks
Commands
Linux:
# Check all services
docker compose ps
# Check RAG API health
curl http://localhost:8000/health
# Check MCP Server health
curl http://localhost:8002/health
# Check logs
docker logs ai-nexus --tail 50
docker logs mysql-db --tail 50Windows (PowerShell):
# Check all services
docker compose ps
# Check RAG API health
Invoke-RestMethod -Uri "http://localhost:8000/health"
# Check MCP Server health
Invoke-RestMethod -Uri "http://localhost:8002/health"
# Check logs
docker logs ai-nexus --tail 50
docker logs mysql-db --tail 50Functional Tests
Performance Checks
Commands
# Monitor resource usage
docker stats ai-nexus mysql-db
# Check disk space
docker system dfTroubleshooting Checklist
If Services Won't Start
If Database Connection Fails
Commands
docker logs mysql-db --tail 20
docker-compose ps
docker exec ai-nexus ping mysql-dbIf Authentication Fails
Commands
# Check secret keys
docker exec ai-nexus env | Select-String "SECRET"
# Restart if needed
docker-compose restartIf API Key Invalid
Test API Key
$apiKey = "YOUR_API_KEY"
$uri = "https://generativelanguage.googleapis.com/v1beta/models?key=$apiKey"
Invoke-RestMethod -Uri $uriIf Ports Already in Use
Commands
# Find process on port 8000
netstat -ano | findstr :8000
# Stop process (replace <PID>)
Stop-Process -Id <PID> -ForceMaintenance Checklist
Daily Operations
Weekly Operations
Stopping Services
Starting Services
Quick Reference Commands
Essential Commands
# Navigate to project
cd "c:\Users\YourUsername\OneDrive\WIP\MariaDB AI RAG Binaries\Ubuntu"
cd "c:\Users\YourUsername\OneDrive\WIP\AI Nexus Binaries\Ubuntu"
cd "c:\DOWNLOAD-LOCATION"
# Build image
docker build -t ai-nexus-image .
# Start (Standalone)
docker-compose up -d
# Start (Vault)
docker-compose --env-file config.env.vault.local up -d
# Stop
docker-compose down
# View logs
docker logs ai-nexus -f
# Check status
docker-compose ps
# Restart
docker-compose restart
# Clean restart
docker-compose down -v && docker-compose up -dDeployment Sign-Off
Final Verification
Deployment Details
Deployment Date: _______________
Deployment Mode:
Deployed By: _______________
Access URLs:
RAG API: http://localhost:8000/docs
MCP Server: http://localhost:8002/mcp
Notes:
✅ Deployment Complete!
This page is: Copyright © 2025 MariaDB. All rights reserved.
Last updated
Was this helpful?

