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 $SHELL

Windows (PowerShell):

# Check Docker
docker --version

# Check disk space
Get-PSDrive C | Select-Object Used,Free

Port 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 :8000

Windows (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

  1. Visit: https://makersuite.google.com/app/apikey

  2. Sign in with Google account

  3. Click "Create API Key"

  4. 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 models

Windows (PowerShell):

$apiKey = "YOUR_API_KEY_HERE"
$uri = "https://generativelanguage.googleapis.com/v1beta/models?key=$apiKey"
Invoke-RestMethod -Uri $uri
# Should return list of models

Project 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.ps1

Verification Commands

Linux:

# Navigate to download location
cd /path/to/download/location

# List files
ls -lh

Windows (PowerShell):

# Navigate to download location
cd "C:\path\to\download\location"

# List files
Get-ChildItem | Select-Object Name, Length

Configuration 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=8002

Deployment 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.2GB

Step 2: Start Services

Commands

docker compose up -d

Expected Output

[+] Running 3/3
 ✔ Network ai-nexus-network    Created
 ✔ Container mysql-db          Started
 ✔ Container ai-nexus          Started

Step 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:8000

Step 4: Verify Container Status

Commands

docker-compose ps

Expected 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/tcp

Step 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/health

Windows (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.ps1

Expected Output

[SUCCESS] Vault Setup Complete!

Vault Details:
  URL:    http://127.0.0.1:8200
  Token:  rag-root-token
  Path:   secret/rag-in-a-box

Step 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-box

Step 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 -d

Step 6: Verify Deployment

Commands

Linux:

docker compose ps
docker logs ai-nexus -f
curl http://localhost:8000/health

Windows (PowerShell):

docker compose ps
docker logs ai-nexus -f
Invoke-RestMethod -Uri "http://localhost:8000/health"

Post-Deployment Checklist

Authentication Setup

Steps

  1. Open: http://localhost:8000/docs

  2. Click on POST /token

  3. Click "Try it out"

  4. Enter credentials:

    {
      "username": "admin",
      "password": "your_password"
    }
  5. Click "Execute"

  6. Copy access_token from 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 50

Windows (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 50

Functional Tests


Performance Checks

Commands

# Monitor resource usage
docker stats ai-nexus mysql-db

# Check disk space
docker system df

Troubleshooting 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-db

If Authentication Fails

Commands

# Check secret keys
docker exec ai-nexus env | Select-String "SECRET"

# Restart if needed
docker-compose restart

If API Key Invalid

Test API Key

$apiKey = "YOUR_API_KEY"
$uri = "https://generativelanguage.googleapis.com/v1beta/models?key=$apiKey"
Invoke-RestMethod -Uri $uri

If Ports Already in Use

Commands

# Find process on port 8000
netstat -ano | findstr :8000

# Stop process (replace <PID>)
Stop-Process -Id <PID> -Force

Maintenance 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 -d

Deployment 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?