Operational Scripts
Overview
The scripts/ directory contains professional, self-sufficient automation scripts for managing, deploying, monitoring, and maintaining all NeuronDB components. All scripts are completely self-sufficient with no external dependencies.
✨ Script Features
- Self-sufficient: No external dependencies
- Standard CLI:
--help,--verbose,--version,--dry-run - Modular: Commands organized by functionality
- Professional: Consistent naming and structure
- Well-documented: Comprehensive help and examples
Location: All scripts are located in the scripts/ directory of the NeuronDB repository.
Quick Reference
All scripts follow a unified command structure:
Script command format
./scripts/neurondb-<category>.sh COMMAND [OPTIONS]Common Options (available in all scripts):
-h, --help- Show detailed help message-v, --verbose- Enable verbose output-V, --version- Show version information--dry-run- Preview changes without applying (where applicable)
| Script | Purpose | Quick Example |
|---|---|---|
neurondb-docker.sh | All Docker operations | ./neurondb-docker.sh run --component neurondb |
neurondb-database.sh | Database backup/restore/setup | ./neurondb-database.sh backup --format custom |
neurondb-setup.sh | Installation and setup | ./neurondb-setup.sh install --mode docker |
neurondb-healthcheck.sh | Health checks and testing | ./neurondb-healthcheck.sh quick |
neurondb-monitor.sh | Monitoring and logs | ./neurondb-monitor.sh status |
neurondb-workflows.sh | Release and git operations | ./neurondb-workflows.sh release --version 2.0.0 |
neurondb-pkgs.sh | Package management | ./neurondb-pkgs.sh verify --os ubuntu |
neurondb-blogs.sh | Blog maintenance | ./neurondb-blogs.sh fix-markdown |
neurondb-cleanup.sh | Cleanup operations | ./neurondb-cleanup.sh --all --dry-run |
Docker Management: neurondb-docker.sh
Complete Docker container management for all NeuronDB components.
Run Docker Containers
Start NeuronDB CPU variant
./scripts/neurondb-docker.sh run --component neurondb --variant cpu
# Start with CUDA support
./scripts/neurondb-docker.sh run --component neurondb --variant cuda
# Start NeuronAgent
./scripts/neurondb-docker.sh run --component neuronagent
# Start NeuronMCP
./scripts/neurondb-docker.sh run --component neuronmcpTest Docker Setup
Run Docker tests
# Basic connectivity tests
./scripts/neurondb-docker.sh test --type basic --variant cpu
# Integration tests
./scripts/neurondb-docker.sh test --type integration
# Comprehensive test suite
./scripts/neurondb-docker.sh test --type comprehensive --variant cudaVerify Docker Setup
Verify Docker dependencies and ecosystem
# Verify Docker installation
./scripts/neurondb-docker.sh verify --dependencies
# Verify entire Docker ecosystem
./scripts/neurondb-docker.sh verify --ecosystemView Logs
Monitor container logs
# View NeuronDB logs
./scripts/neurondb-docker.sh logs --component neurondb
# Follow logs in real-time
./scripts/neurondb-docker.sh logs --component neuronagent --follow
# View last 100 lines
./scripts/neurondb-docker.sh logs --component neurondb --lines 100Database Management: neurondb-database.sh
Complete database operations including backup, restore, setup, and maintenance.
Create Database Backup
Backup database (custom format recommended)
# Custom format (compressed, supports parallel restore)
./scripts/neurondb-database.sh backup --format custom
# SQL format with compression
./scripts/neurondb-database.sh backup --format sql --compress
# Directory format (parallel dump for large databases)
./scripts/neurondb-database.sh backup --format directory --output /backups/neurondb
# Custom retention policy (keep backups for 7 days)
./scripts/neurondb-database.sh backup --format custom --retention 7Restore Database
Restore from backup
# Restore from custom format (auto-detected)
./scripts/neurondb-database.sh restore --backup neurondb_backup_20250101_120000.dump
# Restore from SQL backup
./scripts/neurondb-database.sh restore --backup neurondb_backup_20250101_120000.sql
# Restore from directory format with 8 parallel jobs
./scripts/neurondb-database.sh restore --backup neurondb_backup_20250101_120000_dir --jobs 8Database Setup
Setup database and extensions
# Setup database with extensions
./scripts/neurondb-database.sh setup
# Check database status
./scripts/neurondb-database.sh status
# Run VACUUM ANALYZE
./scripts/neurondb-database.sh vacuumList and Verify Backups
Manage backups
# List all available backups
./scripts/neurondb-database.sh list-backups
# Verify database integrity
./scripts/neurondb-database.sh verifySetup & Installation: neurondb-setup.sh
Complete setup and installation of the NeuronDB ecosystem.
Install NeuronDB Ecosystem
Install with Docker (recommended)
# Install with Docker
./scripts/neurondb-setup.sh install --mode docker
# Install specific components
./scripts/neurondb-setup.sh install --mode docker --components neurondb,neuronagent
# Install with DEB packages
./scripts/neurondb-setup.sh install --mode deb
# Install with RPM packages
./scripts/neurondb-setup.sh install --mode rpmOne-Command Ecosystem Setup
Complete ecosystem setup
# Setup complete ecosystem (checks prerequisites, installs all components)
./scripts/neurondb-setup.sh ecosystem
# Verify installation
./scripts/neurondb-setup.sh verify
# Generate secure passwords
./scripts/neurondb-setup.sh generate-passwords > .env.secureHealth Checking: neurondb-healthcheck.sh
Health checks and integration testing for all NeuronDB components.
Run health checks
# Quick health check (30 seconds)
./scripts/neurondb-healthcheck.sh quick
# Full health check
./scripts/neurondb-healthcheck.sh health
# Integration tests
./scripts/neurondb-healthcheck.sh integration
# Smoke tests
./scripts/neurondb-healthcheck.sh smokeMonitoring: neurondb-monitor.sh
Real-time monitoring, log viewing, and metrics collection.
Monitor components
# Show component status
./scripts/neurondb-monitor.sh status
# View logs
./scripts/neurondb-monitor.sh logs --component neurondb --follow
# Watch status continuously (updates every 5 seconds)
./scripts/neurondb-monitor.sh watch
# Show metrics and statistics
./scripts/neurondb-monitor.sh metricsWorkflows: neurondb-workflows.sh
Release management, version synchronization, and git operations.
Release and version management
# Create new release
./scripts/neurondb-workflows.sh release --version 2.0.0
# Sync version branches (main -> REL1_STABLE)
./scripts/neurondb-workflows.sh sync
# Update markdown references after file renames
./scripts/neurondb-workflows.sh update-refs
# Safe git pull (with rebase)
./scripts/neurondb-workflows.sh pullCommon Workflows
Complete Fresh Installation
Full setup workflow
# 1. Setup complete ecosystem
./scripts/neurondb-setup.sh ecosystem
# 2. Verify installation
./scripts/neurondb-setup.sh verify
# 3. Quick health check
./scripts/neurondb-healthcheck.sh quick
# 4. Monitor status
./scripts/neurondb-monitor.sh statusDocker Deployment
Docker deployment workflow
# 1. Start all services
./scripts/neurondb-docker.sh run --component neurondb --variant cpu
./scripts/neurondb-docker.sh run --component neuronagent
# 2. Verify Docker setup
./scripts/neurondb-docker.sh verify --dependencies --ecosystem
# 3. Run tests
./scripts/neurondb-docker.sh test --type basic
# 4. Monitor
./scripts/neurondb-monitor.sh watchDatabase Backup & Restore
Backup workflow
# 1. Create backup
./scripts/neurondb-database.sh backup --format custom --retention 30
# 2. List backups
./scripts/neurondb-database.sh list-backups
# 3. Restore if needed
./scripts/neurondb-database.sh restore --backup backups/neurondb_backup_20250101_120000.dump
# 4. Verify restore
./scripts/neurondb-database.sh verifyAdditional Resources
- Scripts README - Complete scripts documentation with all commands and examples
- Scripts Directory - All scripts source code
- Ansible Infrastructure Provisioning - Infrastructure automation and deployment
- Kubernetes Deployment - Cloud-native deployment guide
- Observability Stack - Monitoring setup
💡 Tip: All scripts support --help for detailed usage information. For example: ./scripts/neurondb-docker.sh --help