Merge gitea/main, preserving release v0.2.2 stability and CLI documentation

This commit is contained in:
AITBC System
2026-03-25 12:58:02 +01:00
230 changed files with 2370 additions and 369 deletions

View File

@@ -26,12 +26,12 @@ Successfully deployed two independent AITBC blockchain nodes on the same server
### Systemd Services
```bash
# Node 1
sudo systemctl status blockchain-node # Consensus node
sudo systemctl status blockchain-rpc # RPC API
systemctl status blockchain-node # Consensus node
systemctl status blockchain-rpc # RPC API
# Node 2
sudo systemctl status blockchain-node-2 # Consensus node
sudo systemctl status blockchain-rpc-2 # RPC API
systemctl status blockchain-node-2 # Consensus node
systemctl status blockchain-rpc-2 # RPC API
```
### API Endpoints

View File

@@ -36,7 +36,7 @@ These services already had the `aitbc-` prefix:
### Check Service Status
```bash
# Site A (via SSH)
ssh aitbc-cascade "systemctl status aitbc-blockchain-node-1.service"
ssh aitbc "systemctl status aitbc-blockchain-node-1.service"
# Site B (via SSH)
ssh ns3-root "incus exec aitbc -- systemctl status aitbc-blockchain-node-3.service"
@@ -45,16 +45,16 @@ ssh ns3-root "incus exec aitbc -- systemctl status aitbc-blockchain-node-3.servi
### Restart Services
```bash
# Site A
ssh aitbc-cascade "sudo systemctl restart aitbc-blockchain-node-1.service"
ssh aitbc "systemctl restart aitbc-blockchain-node-1.service"
# Site B
ssh ns3-root "incus exec aitbc -- sudo systemctl restart aitbc-blockchain-node-3.service"
ssh ns3-root "incus exec aitbc -- systemctl restart aitbc-blockchain-node-3.service"
```
### View Logs
```bash
# Site A
ssh aitbc-cascade "journalctl -u aitbc-blockchain-node-1.service -f"
ssh aitbc "journalctl -u aitbc-blockchain-node-1.service -f"
# Site B
ssh ns3-root "incus exec aitbc -- journalctl -u aitbc-blockchain-node-3.service -f"

View File

@@ -11,7 +11,7 @@
- `pyproject.toml` - Python project configuration
- `poetry.lock` - Dependency lock file
- `pytest.ini` - Test configuration
- `run_all_tests.sh` - Main test runner
- `scripts/testing/run_all_tests.sh` - Main test runner
### Development Scripts → `dev/scripts/`
```bash

View File

@@ -35,11 +35,11 @@ This document provides comprehensive technical documentation for aitbc enhanced
**🔧 Service Scripts Created:**
```bash
/opt/aitbc/scripts/multimodal_gpu_service.py # Port 8010
/opt/aitbc/scripts/gpu_multimodal_service.py # Port 8011
/opt/aitbc/scripts/modality_optimization_service.py # Port 8012
/opt/aitbc/scripts/adaptive_learning_service.py # Port 8013
/opt/aitbc/scripts/web_ui_service.py # Port 8016
/opt/aitbc/scripts/services/multimodal_gpu_service.py # Port 8010
/opt/aitbc/scripts/services/gpu_multimodal_service.py # Port 8011
/opt/aitbc/scripts/services/modality_optimization_service.py # Port 8012
/opt/aitbc/scripts/services/adaptive_learning_service.py # Port 8013
/opt/aitbc/scripts/services/web_ui_service.py # Port 8016
```
**🔧 Systemd Services Updated:**

View File

@@ -77,10 +77,10 @@ MEMPOOL_BACKEND=database
## Systemd Services (Production)
```bash
sudo cp systemd/aitbc-*.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now aitbc-coordinator-api
sudo systemctl enable --now aitbc-blockchain-node-1
cp systemd/aitbc-*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now aitbc-coordinator-api
systemctl enable --now aitbc-blockchain-node-1
```
## Verify

View File

@@ -286,7 +286,7 @@ free -h
systemctl status aitbc-adaptive-learning.service --no-pager
# Adjust memory limits
sudo systemctl edit aitbc-adaptive-learning.service
systemctl edit aitbc-adaptive-learning.service
```
### Performance Optimization
@@ -304,7 +304,7 @@ export CUDA_LAUNCH_BLOCKING=1
#### 2. Service Tuning
```bash
# Adjust service resources
sudo systemctl edit aitbc-multimodal.service
systemctl edit aitbc-multimodal.service
# Add:
# [Service]
# MemoryMax=4G
@@ -372,7 +372,7 @@ sudo -u postgres psql aitbc < aitbc-db-backup.sql
./manage_services.sh stop
# Emergency restart
sudo systemctl daemon-reload
systemctl daemon-reload
./manage_services.sh start
# Check system status

View File

@@ -2,7 +2,7 @@
This document describes the current organization and status of files and folders in the repository.
Last updated: 2026-03-06
Last updated: 2026-03-25
---
@@ -21,7 +21,18 @@ Last updated: 2026-03-06
| `apps/coordinator-api/tests/test_gpu_marketplace.py` | ✅ Active | 22 GPU marketplace tests (Feb 2026) |
| `apps/coordinator-api/tests/test_billing.py` | ✅ Active | 21 billing/usage-tracking tests (Feb 2026) |
| `apps/coordinator-api/tests/conftest.py` | ✅ Active | App namespace isolation for coordinator tests |
| `tests/cli/test_cli_integration.py` | ✅ Active | 24 CLI → live coordinator integration tests (Feb 2026) |
| `tests/` | ✅ Active | Test suites (reorganized Mar 2026) |
| `tests/cli/` | ✅ Active | CLI tests (28 files, organized Mar 2026) |
| `tests/integration/` | ✅ Active | Integration tests (28 files, organized Mar 2026) |
| `tests/security/` | ✅ Active | Security tests (5 files, organized Mar 2026) |
| `tests/explorer/` | ✅ Active | Explorer tests (2 files, organized Mar 2026) |
| `tests/websocket/` | ✅ Active | WebSocket tests (2 files, organized Mar 2026) |
| `tests/testing/` | ✅ Active | Performance/testing utilities (25 files, organized Mar 2026) |
| `tests/unit/` | ✅ Active | Unit tests (9 files, organized Mar 2026) |
| `tests/e2e/` | ✅ Active | End-to-end tests (26 files, organized Mar 2026) |
| `tests/docs/` | ✅ Active | Test documentation (5 files, organized Mar 2026) |
| `tests/conftest.py` | ✅ Active | Test configuration (root level) |
| `tests/test_runner.py` | ✅ Active | Test runner (root level) |
### Scripts (`scripts/`)
@@ -29,12 +40,16 @@ Last updated: 2026-03-06
|------|--------|-------|
| `scripts/aitbc-cli.sh` | ✅ Active | Main CLI tool, heavily used |
| `scripts/dev/gpu/gpu_miner_host.py` | ✅ Active | Production GPU miner, standardized (Mar 2026) |
| `scripts/deploy/` | ✅ Active | Deployment scripts (35 files) |
| `scripts/deploy/deploy-multimodal-services.sh` | ✅ Active | Environment-aware multimodal deployment (Mar 2026) |
| `scripts/verify-codebase-update.sh` | ✅ Active | Automated codebase verification (Mar 2026) |
| `scripts/service/` | ✅ Active | Service management |
| `scripts/dev_services.sh` | ✅ Active | Local development |
| `scripts/testing/` | ✅ Active | Test scripts (moved from root, 13 files) |
| `scripts/services/` | ✅ Active | Service files (5 FastAPI services, moved Mar 2026) |
| `scripts/deployment/` | ✅ Active | Deployment scripts (35 files, organized Mar 2026) |
| `scripts/testing/` | ✅ Active | Test scripts (20 files, organized Mar 2026) |
| `scripts/monitoring/` | ✅ Active | Monitoring scripts (3 files, organized Mar 2026) |
| `scripts/development/` | ✅ Active | Development scripts (6 files, organized Mar 2026) |
| `scripts/utils/` | ✅ Active | Utility scripts (40 files, organized Mar 2026) |
| `scripts/manage-services.sh` | ✅ Active | Main service management script (updated Mar 2026) |
| `scripts/README.md` | ✅ Active | Scripts documentation |
| `scripts/deploy/` | ✅ Active | Legacy deployment scripts (27 files) |
| `scripts/gpu/` | ✅ Active | GPU service scripts (9 files, moved to services/) |
### Infrastructure (`infra/`, `systemd/`)
@@ -65,7 +80,10 @@ Last updated: 2026-03-06
| Path | Status | Notes |
|------|--------|-------|
| `docs/1_project/` | ✅ Active | Project management docs (restructured) |
| `docs/1_project/` | ✅ Active | Project management docs (updated Mar 2026) |
| `docs/1_project/aitbc.md` | ✅ Active | Secondary server deployment guide (updated Mar 2026) |
| `docs/1_project/aitbc1.md` | ✅ Active | Primary server deployment guide (updated Mar 2026) |
| `docs/1_project/3_infrastructure.md` | ✅ Active | Infrastructure documentation (updated Mar 2026) |
| `docs/infrastructure/` | ✅ Active | Infrastructure documentation (Mar 2026) |
| `docs/infrastructure/codebase-update-summary.md` | ✅ Active | Comprehensive standardization summary (Mar 2026) |
| `docs/DOCS_WORKFLOW_COMPLETION_SUMMARY.md` | ✅ Active | Documentation updates completion (Mar 2026) |
@@ -259,11 +277,26 @@ These empty folders are intentional scaffolding for planned future work per the
- **Workflows documented** for repeatable processes
- **File organization prevention** system implemented
### ✅ CLI Development Environment Optimization (March 6, 2026)
- **CLI development tools** moved from `cli-dev` to `dev/cli`
- **Centralized development** environment in unified `/dev/` structure
- **Improved project organization** with reduced root-level clutter
- **Backup system** implemented with proper git exclusion
### ✅ Complete Scripts and Tests Organization (March 25, 2026)
- **Scripts organized** by purpose into 6 categories (services, deployment, testing, monitoring, development, utils)
- **Test files organized** by function into 9 categories (cli, integration, security, explorer, websocket, testing, unit, e2e, docs)
- **Service scripts** moved to dedicated `scripts/services/` folder
- **Documentation updated** to reflect new file locations
- **No codebase rewrites** needed - all paths already properly configured
### ✅ Server Architecture Updates (March 25, 2026)
- **aitbc1** established as primary server (https://aitbc1.bubuit.net) with reverse proxy role
- **aitbc** established as secondary server (https://aitbc.bubuit.net) with application services
- **SSH access** simplified to `ssh aitbc` and `ssh aitbc1` (root login, no sudo needed)
- **Deployment guides** updated to reflect new primary/secondary architecture
- **Infrastructure documentation** updated for two-server setup
### ✅ Documentation Standardization (March 25, 2026)
- **All sudo references** removed from systemctl commands (root access)
- **SSH references** updated to use new server names
- **Service paths** updated in documentation to reflect new organization
- **12 documentation files** updated across the codebase
- **Consistent command patterns** applied throughout
### ✅ Explorer Architecture Simplification (March 6, 2026)
- **TypeScript explorer** merged into Python blockchain-explorer
@@ -319,12 +352,30 @@ aitbc/
│ ├── py/aitbc-sdk/ # Python SDK
│ └── solidity/aitbc-token/# ERC-20 token contract
├── plugins/ # ✅ Keep (ollama)
├── scripts/ # ✅ Keep - organized by purpose
│ ├── deploy/ # ✅ Deployment scripts (35 files)
│ ├── dev/ # ✅ Development scripts
── testing/ # ✅ Test scripts
├── scripts/ # ✅ Scripts organized by purpose (Mar 2026)
│ ├── services/ # ✅ Service files (5 FastAPI services)
│ ├── deployment/ # ✅ Deployment scripts (35 files)
── testing/ # ✅ Test scripts (20 files)
│ ├── monitoring/ # ✅ Monitoring scripts (3 files)
│ ├── development/ # ✅ Development scripts (6 files)
│ ├── utils/ # ✅ Utility scripts (40 files)
│ ├── deploy/ # ✅ Legacy deployment scripts (27 files)
│ ├── gpu/ # ✅ GPU service scripts (9 files)
│ ├── manage-services.sh # ✅ Main service management script
│ └── README.md # ✅ Scripts documentation
├── systemd/ # ✅ Systemd service units (19+ files)
├── tests/ # ✅ Test suites
├── tests/ # ✅ Test suites organized by function (Mar 2026)
│ ├── cli/ # ✅ CLI tests (28 files)
│ ├── integration/ # ✅ Integration tests (28 files)
│ ├── security/ # ✅ Security tests (5 files)
│ ├── explorer/ # ✅ Explorer tests (2 files)
│ ├── websocket/ # ✅ WebSocket tests (2 files)
│ ├── testing/ # ✅ Performance/testing utilities (25 files)
│ ├── unit/ # ✅ Unit tests (9 files)
│ ├── e2e/ # ✅ End-to-end tests (26 files)
│ ├── docs/ # ✅ Test documentation (5 files)
│ ├── conftest.py # ✅ Test configuration
│ └── test_runner.py # ✅ Test runner
├── website/ # ✅ Public website and HTML docs
├── dev-utils/ # ✅ Development utilities (legacy)
├── data/ # ✅ Runtime data (gitignored)
@@ -335,12 +386,14 @@ aitbc/
This structure represents the current clean state of the AITBC repository with all essential components organized for optimal development and deployment workflows. The March 2026 standardization effort has resulted in:
- **100% service standardization** across all systemd services
- **Improved file organization** with proper dev/ structure
- **Complete scripts and tests organization** by purpose and function
- **Updated server architecture** with primary/secondary server setup
- **Enhanced documentation** with comprehensive infrastructure guides
- **Automated verification tools** for maintaining standards
- **Production-ready infrastructure** with all services operational
- **Optimized CLI development** with centralized dev/cli environment
- **Agent-first architecture** with simplified explorer service
- **Comprehensive backup system** with proper git exclusion
- **Standardized SSH access** with root privileges and no sudo requirements
**Note**: Redundant `apps/logs/` directory removed - central `logs/` directory at root level is used for all logging. Redundant `assets/` directory removed - Firefox extension assets are properly organized in `extensions/aitbc-wallet-firefox/`. CLI development environment moved from `cli-dev` to `dev/cli` for better organization. Explorer TypeScript source merged into Python service and backed up.

View File

@@ -110,6 +110,26 @@ This roadmap aggregates high-priority tasks derived from the bootstrap specifica
- ✅ Performance validation against deployment report targets
- ✅ Complete documentation and usage guides
## Stage 28 — Project File Organization & Documentation Updates [COMPLETED: 2026-03-25]
- **Root Directory Cleanup**
- ✅ Move 60+ loose files from root to proper subdirectories
- ✅ Organize development scripts into `dev/review/`, `dev/fixes/`, `scripts/testing/`
- ✅ Organize configuration files into `config/genesis/`, `config/networks/`, `config/templates/`
- ✅ Move documentation to `docs/development/`, `docs/deployment/`, `docs/project/`
- ✅ Organize temporary files into `temp/backups/`, `temp/patches/`, `logs/qa/`
- **File Organization Workflow**
- ✅ Create `/organize-project-files` workflow for systematic file management
- ✅ Implement dependency analysis to prevent codebreak from file moves
- ✅ Establish categorization rules for different file types
- ✅ Verify essential root files remain (configuration, documentation, system files)
- **Documentation Updates**
- ✅ Update project completion status in `docs/1_project/5_done.md`
- ✅ Reflect file organization milestone in roadmap documentation
- ✅ Ensure all documentation references point to correct file locations
## Current Status: Agent-First Transformation Complete
**Milestone Achievement**: Successfully transformed AITBC to agent-first architecture with comprehensive CLI tools, enhanced services deployment, and complete end-to-end testing framework. All 22 commands from README are fully implemented with complete test coverage and documentation.

View File

@@ -4,21 +4,21 @@
## Overview
Two-tier architecture: **incus host (at1)** runs the reverse proxy with SSL termination, forwarding all `aitbc.bubuit.net` traffic to the **aitbc container** which runs nginx + all services. **Updated for port logic 8000+ implementation with unified numbering scheme and production-ready codebase.**
Two-tier architecture: **aitbc1 primary server** (https://aitbc1.bubuit.net) and **aitbc secondary server** (https://aitbc.bubuit.net) with **aitbc1 as reverse proxy** forwarding all traffic to aitbc container services. **Updated for port logic 8000+ implementation with unified numbering scheme and production-ready codebase.**
```
Internet → aitbc.bubuit.net (HTTPS :443)
Internet → aitbc1.bubuit.net (HTTPS :443) → aitbc.bubuit.net
┌──────────────────────────────────────────────┐
Incus Host (at1 / localhost)
aitbc1 Primary Server (Reverse Proxy)
│ Nginx reverse proxy (:443 SSL → :80) │
│ Config: /etc/nginx/sites-available/ │
│ aitbc-proxy.conf │
│ │
│ ┌────────────────────────────────────────┐ │
│ │ Container: aitbc (10.1.223.1) │ │
│ │ Access: ssh aitbc-cascade │ │
│ │ Container: aitbc (aitbc server) │ │
│ │ Access: ssh aitbc │ │
│ │ OS: Debian 13 Trixie │ │
│ │ Node.js: 24+ │ │
│ │ Python: 3.13.5+ │ │
@@ -170,8 +170,8 @@ On at1, `/opt/aitbc` uses individual symlinks to the Windsurf project directorie
sc-status aitbc-blockchain-node.service aitbc-blockchain-rpc.service aitbc-gpu-miner.service aitbc-mock-coordinator.service
# Start services
sudo systemctl start aitbc-mock-coordinator.service
sudo systemctl start aitbc-blockchain-node.service
systemctl start aitbc-mock-coordinator.service
systemctl start aitbc-blockchain-node.service
# Check logs
journalctl -u aitbc-mock-coordinator --no-pager -n 20
@@ -260,7 +260,7 @@ server {
### Access
```bash
ssh aitbc-cascade # Direct SSH to container
ssh aitbc # Direct SSH to aitbc server
```
**GPU Access**: No GPU passthrough. All GPU workloads must run on **at1** (Windsurf development host), not inside incus containers.
@@ -378,16 +378,26 @@ All Python services in the AITBC container run on **Python 3.13.5** with isolate
# Note: Standardized /opt/aitbc structure for all services
```
**Verification Commands:**
**Minimum Default Verification Commands:**
```bash
ssh aitbc-cascade "python3 --version" # Should show Python 3.13.5
ssh aitbc-cascade "node --version" # Should show v24.14.x
ssh aitbc-cascade "npm --version" # Should show compatible version
ssh aitbc-cascade "ls -la /opt/*/.venv/bin/python" # Check venv symlinks
ssh aitbc-cascade "curl -s http://127.0.0.1:8000/v1/health" # Coordinator API health
# From aitbc1 primary server
ssh aitbc "python3 --version" # Should show Python 3.13.5
ssh aitbc "node --version" # Should show v24.14.x
ssh aitbc "npm --version" # Should show compatible version
ssh aitbc "ls -la /opt/*/.venv/bin/python" # Check venv symlinks
ssh aitbc "curl -s http://127.0.0.1:8000/v1/health" # Coordinator API health
curl -s https://aitbc.bubuit.net/api/v1/health # External API access
```
**SSH Access:**
```bash
# From aitbc1 to aitbc (secondary server)
ssh aitbc
# From aitbc to aitbc1 (primary server)
ssh aitbc1
```
### Nginx Routes (container)
Config: `/etc/nginx/sites-enabled/aitbc`
@@ -549,25 +559,25 @@ curl http://aitbc.keisanki.net/rpc/head # Node 3 RPC (port 8003)
### Deploying to Container
```bash
# Push website files
scp -r website/* aitbc-cascade:/var/www/aitbc.bubuit.net/
scp -r website/* aitbc:/var/www/aitbc.bubuit.net/
# Push app updates (blockchain-explorer serves its own interface)
# No separate deployment needed - blockchain-explorer handles both API and UI
# Restart a service
ssh aitbc-cascade "systemctl restart coordinator-api"
ssh aitbc "systemctl restart coordinator-api"
```
## Health Checks
```bash
# From at1 (via container)
ssh aitbc-cascade "curl -s http://localhost:8000/v1/health"
ssh aitbc-cascade "curl -s http://localhost:8003/rpc/head | jq .height"
# From aitbc1 (via aitbc server)
ssh aitbc "curl -s http://localhost:8000/v1/health"
ssh aitbc "curl -s http://localhost:8003/rpc/head | jq .height"
# Test enhanced services
ssh aitbc-cascade "curl -s http://localhost:8010/health" # Multimodal GPU (CPU-only)
ssh aitbc-cascade "curl -s http://localhost:8017/health" # Geographic Load Balancer
ssh aitbc "curl -s http://localhost:8010/health" # Multimodal GPU (CPU-only)
ssh aitbc "curl -s http://localhost:8017/health" # Geographic Load Balancer
# From internet (Python 3.13.5 upgraded services)
curl -s https://aitbc.bubuit.net/health
@@ -582,25 +592,25 @@ curl -s https://aitbc.bubuit.net/api/loadbalancer/health
ssh ns3-root "curl -s http://192.168.100.10:8003/rpc/head | jq .height"
# Python version verification
ssh aitbc-cascade "python3 --version" # Python 3.13.5
ssh aitbc "python3 --version" # Python 3.13.5
```
## Monitoring and Logging
```bash
# Container systemd logs
ssh aitbc-cascade "journalctl -u aitbc-coordinator-api --no-pager -n 20"
ssh aitbc-cascade "journalctl -u aitbc-blockchain-node --no-pager -n 20"
ssh aitbc "journalctl -u aitbc-coordinator-api --no-pager -n 20"
ssh aitbc "journalctl -u aitbc-blockchain-node --no-pager -n 20"
# Enhanced services logs
ssh aitbc-cascade "journalctl -u aitbc-multimodal-gpu --no-pager -n 20"
ssh aitbc-cascade "journalctl -u aitbc-loadbalancer-geo --no-pager -n 20"
ssh aitbc "journalctl -u aitbc-multimodal-gpu --no-pager -n 20"
ssh aitbc "journalctl -u aitbc-loadbalancer-geo --no-pager -n 20"
# Container nginx logs
ssh aitbc-cascade "tail -20 /var/log/nginx/aitbc.bubuit.net.error.log"
ssh aitbc "tail -20 /var/log/nginx/aitbc.bubuit.net.error.log"
# Host nginx logs
sudo tail -20 /var/log/nginx/error.log
tail -20 /var/log/nginx/error.log
```
## Security
@@ -645,21 +655,19 @@ PORT=8010-8017 # Enhanced services port range
### Container Access & Port Logic (Updated March 6, 2026)
#### **SSH-Based Container Access**
#### **SSH-Based Server Access**
```bash
# Access aitbc container
ssh aitbc-cascade
# Access aitbc server
ssh aitbc
# Access aitbc1 container
# Access aitbc1 server (from incus host only)
ssh aitbc1-cascade
# Check services in containers
ssh aitbc-cascade 'systemctl list-units | grep aitbc-'
ssh aitbc1-cascade 'systemctl list-units | grep aitbc-'
# Check services in servers
ssh aitbc 'systemctl list-units | grep aitbc-'
# Debug specific services
ssh aitbc-cascade 'systemctl status aitbc-coordinator-api'
ssh aitbc1-cascade 'systemctl status aitbc-wallet'
ssh aitbc 'systemctl status aitbc-coordinator-api'
```
#### **Port Distribution Strategy - NEW STANDARD**
@@ -731,28 +739,22 @@ ssh aitbc1-cascade 'systemctl status aitbc-wallet'
# Check port usage
netstat -tlnp | grep -E ":(800[0-5]|801[0-7]|802[0-9])"
ssh aitbc-cascade 'netstat -tlnp | grep -E ":(800[0-5]|801[0-7]|802[0-9])"
ssh aitbc1-cascade 'netstat -tlnp | grep -E ":(800[0-5]|801[0-7]|802[0-9])"
ssh aitbc 'netstat -tlnp | grep -E ":(800[0-5]|801[0-7]|802[0-9])'
# Service Management Commands:
# Primary services:
systemctl status aitbc-blockchain-node.service # localhost
systemctl status aitbc-blockchain-rpc.service # localhost (port 8006)
systemctl status aitbc-wallet.service # localhost (port 8002)
ssh aitbc-cascade 'systemctl status aitbc-blockchain-node.service' # aitbc container
ssh aitbc1-cascade 'systemctl status aitbc-blockchain-node.service' # aitbc1 container
ssh aitbc 'systemctl status aitbc-blockchain-node.service' # aitbc server
# Wallet services:
ssh aitbc-cascade 'systemctl status aitbc-wallet.service' # port 8002
ssh aitbc1-cascade 'systemctl status aitbc-wallet.service' # port 8002
ssh aitbc 'systemctl status aitbc-wallet.service' # port 8002
# RPC services:
ssh aitbc-cascade 'systemctl status aitbc-blockchain-rpc.service' # port 8006
ssh aitbc1-cascade 'systemctl status aitbc-blockchain-rpc.service' # port 8006
ssh aitbc-cascade 'systemctl status aitbc-blockchain-rpc-dev.service' # port 8026
ssh aitbc1-cascade 'systemctl status aitbc-blockchain-rpc-dev.service' # port 8026
ssh aitbc 'systemctl status aitbc-blockchain-rpc.service' # port 8006
ssh aitbc 'systemctl status aitbc-blockchain-rpc-dev.service' # port 8026
# Development services:
ssh aitbc-cascade 'systemctl status aitbc-blockchain-node-dev.service'
ssh aitbc1-cascade 'systemctl status aitbc-blockchain-node-dev.service'
ssh aitbc 'systemctl status aitbc-blockchain-node-dev.service'
```

View File

@@ -549,6 +549,16 @@ This document tracks components that have been successfully deployed and are ope
- Updated `docs/files.md` with new structure
- Fixed systemd service path for GPU miner
-**Project File Organization** - Completed March 25, 2026
- **Root Directory Cleanup**: Moved 60+ loose files to proper subdirectories
- **Development Scripts**: Organized into `dev/review/`, `dev/fixes/`, `scripts/testing/`
- **Configuration Files**: Genesis configs to `config/genesis/`, network configs to `config/networks/`
- **Documentation**: Moved to `docs/development/`, `docs/deployment/`, `docs/project/`
- **Temporary Files**: Organized into `temp/backups/`, `temp/patches/`, `logs/qa/`
- **Essential Root Files**: Only configuration, documentation, and system files remain
- **Dependency Analysis**: Verified no codebreak from file moves
- **Workflow Creation**: Established `/organize-project-files` workflow for future maintenance
## Recent Updates (2026-02-12)
### Persistent GPU Marketplace ✅

View File

@@ -2,9 +2,9 @@
## Overview
This guide provides comprehensive deployment instructions for the **aitbc server** (primary container), including infrastructure requirements, service configurations, and troubleshooting procedures. **Updated March 7, 2026: Unified port logic deployed, codebase committed to git, enhanced services operational.**
This guide provides comprehensive deployment instructions for the **aitbc server** (secondary development server), including infrastructure requirements, service configurations, and troubleshooting procedures. **Updated March 25, 2026: Updated architecture with aitbc1 as primary server and aitbc as secondary server.**
**Note**: This documentation is specific to the aitbc server. For aitbc1 server documentation, see [aitbc1.md](./aitbc1.md).
**Note**: This documentation is specific to the aitbc secondary server. For aitbc1 primary server documentation, see [aitbc1.md](./aitbc1.md).
## System Requirements
@@ -57,38 +57,38 @@ This guide provides comprehensive deployment instructions for the **aitbc server
### **Container Access & SSH Management (Updated March 6, 2026)**
#### **SSH-Based Container Access**
#### **SSH-Based Server Access**
```bash
# Access aitbc server (primary container)
ssh aitbc-cascade
# Access aitbc secondary server
ssh aitbc
# Check aitbc server status
ssh aitbc-cascade 'systemctl status'
ssh aitbc 'systemctl status'
# List AITBC services on aitbc server
ssh aitbc-cascade 'systemctl list-units | grep aitbc-'
ssh aitbc 'systemctl list-units | grep aitbc-'
```
#### **Service Management via SSH**
```bash
# Start/stop services on aitbc server
ssh aitbc-cascade 'sudo systemctl start aitbc-coordinator-api'
ssh aitbc-cascade 'sudo systemctl stop aitbc-wallet'
ssh aitbc 'systemctl start aitbc-coordinator-api'
ssh aitbc 'systemctl stop aitbc-wallet'
# Check service logs on aitbc server
ssh aitbc-cascade 'sudo journalctl -f -u aitbc-coordinator-api'
ssh aitbc 'journalctl -f -u aitbc-coordinator-api'
# Debug service issues on aitbc server
ssh aitbc-cascade 'sudo systemctl status aitbc-coordinator-api'
ssh aitbc-cascade 'sudo systemctl status aitbc-wallet'
ssh aitbc 'systemctl status aitbc-coordinator-api'
ssh aitbc 'systemctl status aitbc-wallet'
# Check blockchain services on aitbc server
ssh aitbc-cascade 'sudo systemctl status aitbc-blockchain-node'
ssh aitbc-cascade 'sudo systemctl status aitbc-blockchain-rpc'
ssh aitbc 'systemctl status aitbc-blockchain-node'
ssh aitbc 'systemctl status aitbc-blockchain-rpc'
# Check development services on aitbc server
ssh aitbc-cascade 'sudo systemctl status aitbc-blockchain-node-dev'
ssh aitbc-cascade 'sudo systemctl status aitbc-blockchain-rpc-dev'
ssh aitbc 'systemctl status aitbc-blockchain-node-dev'
ssh aitbc 'systemctl status aitbc-blockchain-rpc-dev'
```
#### **Port Distribution Strategy (Updated March 7, 2026)**
@@ -173,21 +173,21 @@ AITBC Platform Architecture (Updated March 7, 2026)
#### 1.1 System Preparation
```bash
# Update system packages
sudo apt update && sudo apt upgrade -y
apt update && apt upgrade -y
# Install required packages
sudo apt install -y python3.13 python3.13-venv python3-pip nodejs npm nginx sqlite3
apt install -y python3.13 python3.13-venv python3-pip nodejs npm nginx sqlite3
# Create aitbc user
sudo useradd -m -s /bin/bash aitbc
sudo usermod -aG sudo aitbc
useradd -m -s /bin/bash aitbc
usermod -aG sudo aitbc
```
#### 1.2 Directory Structure
```bash
# Create AITBC directory structure (standardized)
sudo mkdir -p /opt/aitbc/{apps,config,logs,scripts,backups}
sudo chown -R aitbc:aitbc /opt/aitbc
mkdir -p /opt/aitbc/{apps,config,logs,scripts,backups}
chown -R aitbc:aitbc /opt/aitbc
```
#### 1.3 Code Deployment
@@ -200,8 +200,8 @@ git clone https://github.com/oib/AITBC.git .
# scp -r /path/to/aitbc/* aitbc@target:/opt/aitbc/
# Set permissions (standardized)
sudo chown -R aitbc:aitbc /opt/aitbc
sudo chmod -R 755 /opt/aitbc
chown -R aitbc:aitbc /opt/aitbc
chmod -R 755 /opt/aitbc
```
### **Phase 2: Service Configuration**
@@ -245,26 +245,26 @@ chown aitbc:aitbc .env
#### 2.3 Systemd Service Installation
```bash
# Copy service files (updated for new port logic)
sudo cp -r /opt/aitbc/systemd/* /etc/systemd/system/
sudo systemctl daemon-reload
cp -r /opt/aitbc/systemd/* /etc/systemd/system/
systemctl daemon-reload
# Enable core services
sudo systemctl enable aitbc-coordinator-api.service
sudo systemctl enable aitbc-exchange-api.service
sudo systemctl enable aitbc-blockchain-node.service
sudo systemctl enable aitbc-blockchain-rpc.service
sudo systemctl enable aitbc-blockchain-service.service
sudo systemctl enable aitbc-network-service.service
sudo systemctl enable aitbc-explorer.service
systemctl enable aitbc-coordinator-api.service
systemctl enable aitbc-exchange-api.service
systemctl enable aitbc-blockchain-node.service
systemctl enable aitbc-blockchain-rpc.service
systemctl enable aitbc-blockchain-service.service
systemctl enable aitbc-network-service.service
systemctl enable aitbc-explorer.service
# Enable enhanced services (CPU-only mode)
sudo systemctl enable aitbc-multimodal-gpu.service
sudo systemctl enable aitbc-multimodal.service
sudo systemctl enable aitbc-modality-optimization.service
sudo systemctl enable aitbc-adaptive-learning.service
sudo systemctl enable aitbc-marketplace-enhanced.service
sudo systemctl enable aitbc-openclaw-enhanced.service
sudo systemctl enable aitbc-loadbalancer-geo.service
systemctl enable aitbc-multimodal-gpu.service
systemctl enable aitbc-multimodal.service
systemctl enable aitbc-modality-optimization.service
systemctl enable aitbc-adaptive-learning.service
systemctl enable aitbc-marketplace-enhanced.service
systemctl enable aitbc-openclaw-enhanced.service
systemctl enable aitbc-loadbalancer-geo.service
```
### **Phase 3: Service Deployment**
@@ -272,43 +272,43 @@ sudo systemctl enable aitbc-loadbalancer-geo.service
#### 3.1 Core Services Startup
```bash
# Start core services in order
sudo systemctl start aitbc-coordinator-api.service
systemctl start aitbc-coordinator-api.service
sleep 3
sudo systemctl start aitbc-exchange-api.service
systemctl start aitbc-exchange-api.service
sleep 3
sudo systemctl start aitbc-blockchain-node.service
systemctl start aitbc-blockchain-node.service
sleep 3
sudo systemctl start aitbc-blockchain-rpc.service
systemctl start aitbc-blockchain-rpc.service
sleep 3
sudo systemctl start aitbc-blockchain-service.service
systemctl start aitbc-blockchain-service.service
sleep 3
sudo systemctl start aitbc-network-service.service
systemctl start aitbc-network-service.service
sleep 3
sudo systemctl start aitbc-explorer.service
systemctl start aitbc-explorer.service
```
#### 3.2 Enhanced Services Startup
```bash
# Start enhanced services (CPU-only mode)
sudo systemctl start aitbc-multimodal-gpu.service
systemctl start aitbc-multimodal-gpu.service
sleep 2
sudo systemctl start aitbc-multimodal.service
systemctl start aitbc-multimodal.service
sleep 2
sudo systemctl start aitbc-modality-optimization.service
systemctl start aitbc-modality-optimization.service
sleep 2
sudo systemctl start aitbc-adaptive-learning.service
systemctl start aitbc-adaptive-learning.service
sleep 2
sudo systemctl start aitbc-marketplace-enhanced.service
systemctl start aitbc-marketplace-enhanced.service
sleep 2
sudo systemctl start aitbc-openclaw-enhanced.service
systemctl start aitbc-openclaw-enhanced.service
sleep 2
sudo systemctl start aitbc-loadbalancer-geo.service
systemctl start aitbc-loadbalancer-geo.service
```
#### 3.3 Service Verification
```bash
# Check service status
sudo systemctl list-units --type=service --state=running | grep aitbc
systemctl list-units --type=service --state=running | grep aitbc
# Test core endpoints
curl -X GET "http://localhost:8000/health" # Coordinator API
@@ -352,13 +352,13 @@ PRAGMA temp_store = MEMORY;
EOF
# System limits
echo "aitbc soft nofile 65536" | sudo tee -a /etc/security/limits.conf
echo "aitbc hard nofile 65536" | sudo tee -a /etc/security/limits.conf
echo "aitbc soft nofile 65536" | tee -a /etc/security/limits.conf
echo "aitbc hard nofile 65536" | tee -a /etc/security/limits.conf
# Network optimization
echo "net.core.somaxconn = 1024" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_max_syn_backlog = 1024" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
echo "net.core.somaxconn = 1024" | tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_max_syn_backlog = 1024" | tee -a /etc/sysctl.conf
sysctl -p
```
#### 4.3 Monitoring Setup
@@ -417,7 +417,7 @@ chown aitbc:aitbc /opt/aitbc/scripts/monitor-services.sh
#### Service Not Starting
```bash
# Check service logs
sudo journalctl -u aitbc-coordinator-api.service -n 50
journalctl -u aitbc-coordinator-api.service -n 50
# Check Python environment (must be 3.13+)
cd /opt/aitbc/apps/coordinator-api
@@ -443,14 +443,14 @@ mv /opt/aitbc/apps/coordinator-api/aitbc_coordinator.db /opt/aitbc/apps/coordina
#### Port Conflicts (New Port Logic)
```bash
# Check port usage (new port logic)
sudo netstat -tlnp | grep -E ":(8000|8001|8003|8010|8011|8012|8013|8014|8015|8016|8017)"
netstat -tlnp | grep -E ":(8000|8001|8003|8010|8011|8012|8013|8014|8015|8016|8017)"
# Kill conflicting processes
sudo fuser -k 8000/tcp # Core services
sudo fuser -k 8010/tcp # Enhanced services
fuser -k 8000/tcp # Core services
fuser -k 8010/tcp # Enhanced services
# Restart services
sudo systemctl restart aitbc-coordinator-api.service
systemctl restart aitbc-coordinator-api.service
```
#### Container Access Issues
@@ -460,16 +460,16 @@ curl -s http://localhost:8017/health # Should work
curl -s http://10.1.223.1:8017/health # Should work from containers
# Check service binding
sudo netstat -tlnp | grep :8017 # Should show 0.0.0.0:8017
netstat -tlnp | grep :8017 # Should show 0.0.0.0:8017
```
#### Permission Issues
```bash
# Fix file ownership (standardized)
sudo chown -R aitbc:aitbc /opt/aitbc
chown -R aitbc:aitbc /opt/aitbc
# Fix file permissions
sudo chmod -R 755 /opt/aitbc
chmod -R 755 /opt/aitbc
chmod 600 /opt/aitbc/apps/coordinator-api/.env
```

View File

@@ -2,32 +2,33 @@
## Overview
This document contains specific deployment notes and considerations for deploying the AITBC platform on the **aitbc1 server** (secondary container). These notes complement the general deployment guide with server-specific configurations and troubleshooting. **Updated for optimized CPU-only deployment with enhanced services disabled.**
This document contains specific deployment notes and considerations for deploying the AITBC platform on the **aitbc1 server** (primary development server). These notes complement the general deployment guide with server-specific configurations and troubleshooting. **Updated March 25, 2026: Updated architecture with aitbc1 as primary server and aitbc as secondary server.**
**Note**: This documentation is specific to the aitbc1 server. For aitbc server documentation, see [aitbc.md](./aitbc.md).
**Note**: This documentation is specific to the aitbc1 primary server. For aitbc secondary server documentation, see [aitbc.md](./aitbc.md).
## Server Specifications
### **aitbc1 Server Details**
- **Hostname**: aitbc1 (container)
- **IP Address**: 10.1.223.40 (container IP)
- **Operating System**: Debian 13 Trixie (secondary development environment)
- **Access Method**: SSH via aitbc1-cascade proxy
### **aitbc1 Primary Server Details**
- **Hostname**: aitbc1 (primary development server)
- **IP Address**: 10.1.223.40 (server IP)
- **Operating System**: Debian 13 Trixie (primary development environment)
- **Access Method**: SSH via aitbc1-cascade proxy (from incus host only)
- **Reverse Proxy Role**: Primary reverse proxy for aitbc.bubuit.net
- **GPU Access**: None (CPU-only mode)
- **Miner Service**: Not needed
- **Enhanced Services**: Mixed status (some enabled, some failing)
- **Web Root**: `/var/www/html/`
- **Nginx Configuration**: Two-tier setup with SSL termination
- **Nginx Configuration**: Primary reverse proxy with SSL termination
- **Container Support**: Incus containers with 0.0.0.0 binding for container access
- **Project Document Root**: `/opt/aitbc` (standardized across all AITBC containers)
### **Network Architecture (Updated March 7, 2026)**
### **Network Architecture (Updated March 25, 2026)**
```
Internet → aitbc1-cascade (Proxy) → aitbc1 (Container)
SSH Access Application Server
Port 22/443 Port 8000-8001 (Core Services)
Port 8005-8006 Blockchain Services (AT1 Standard)
Port 8025-8026 Development Services
Internet → aitbc1.bubuit.net (Primary Server) → aitbc.bubuit.net (Secondary Server)
HTTPS :443 (SSL Termination) Application Services
Port 22/443 Port 8000-8001 (Core Services)
Port 8005-8006 Blockchain Services (AT1 Standard)
Port 8025-8026 Development Services
```
**Note**: Now compliant with AT1 standard port assignments
@@ -36,37 +37,40 @@ Internet → aitbc1-cascade (Proxy) → aitbc1 (Container)
#### **Primary Access Methods**
```bash
# Access aitbc1 server (secondary container)
# Access aitbc1 primary server (from incus host only)
ssh aitbc1-cascade
# Check aitbc1 server connectivity
ssh aitbc1-cascade 'echo "Container accessible"'
# From aitbc secondary server to aitbc1 primary
ssh aitbc1
# Check aitbc1 primary server connectivity
ssh aitbc1-cascade 'echo "Primary server accessible"'
```
#### **Service Management via SSH**
```bash
# List all AITBC services on aitbc1 server
ssh aitbc1-cascade 'systemctl list-units | grep aitbc-'
# List all AITBC services on aitbc1 primary server
ssh aitbc1 'systemctl list-units | grep aitbc-'
# Check specific service status on aitbc1 server
ssh aitbc1-cascade 'systemctl status aitbc-coordinator-api'
ssh aitbc1-cascade 'systemctl status aitbc-wallet'
# Check specific service status on aitbc1 primary server
ssh aitbc1 'systemctl status aitbc-coordinator-api'
ssh aitbc1 'systemctl status aitbc-wallet'
# Start/stop services on aitbc1 server
ssh aitbc1-cascade 'sudo systemctl start aitbc-coordinator-api'
ssh aitbc1-cascade 'sudo systemctl stop aitbc-wallet'
# Start/stop services on aitbc1 primary server
ssh aitbc1 'systemctl start aitbc-coordinator-api'
ssh aitbc1 'systemctl stop aitbc-wallet'
# View service logs on aitbc1 server
ssh aitbc1-cascade 'sudo journalctl -f -u aitbc-coordinator-api'
ssh aitbc1-cascade 'sudo journalctl -f -u aitbc-blockchain-node'
# View service logs on aitbc1 primary server
ssh aitbc1 'journalctl -f -u aitbc-coordinator-api'
ssh aitbc1 'journalctl -f -u aitbc-blockchain-node'
# Check blockchain services on aitbc1 server
ssh aitbc1-cascade 'sudo systemctl status aitbc-blockchain-node'
ssh aitbc1-cascade 'sudo systemctl status aitbc-blockchain-rpc'
# Check blockchain services on aitbc1 primary server
ssh aitbc1 'systemctl status aitbc-blockchain-node'
ssh aitbc1 'systemctl status aitbc-blockchain-rpc'
# Check development services on aitbc1 server
ssh aitbc1-cascade 'sudo systemctl status aitbc-blockchain-node-dev'
ssh aitbc1-cascade 'sudo systemctl status aitbc-blockchain-rpc-dev'
# Check development services on aitbc1 primary server
ssh aitbc1 'systemctl status aitbc-blockchain-node-dev'
ssh aitbc1 'systemctl status aitbc-blockchain-rpc-dev'
```
#### **Port Distribution & Conflict Resolution (Updated March 6, 2026)**
@@ -108,26 +112,26 @@ ssh aitbc1-cascade 'sudo systemctl status aitbc-blockchain-rpc-dev'
#### **Debug Container Service Issues**
```bash
# Debug coordinator API port conflict
ssh aitbc-cascade 'sudo systemctl status aitbc-coordinator-api'
ssh aitbc-cascade 'sudo journalctl -u aitbc-coordinator-api -n 20'
ssh aitbc 'systemctl status aitbc-coordinator-api'
ssh aitbc 'journalctl -u aitbc-coordinator-api -n 20'
# Debug wallet service issues
ssh aitbc-cascade 'sudo systemctl status aitbc-wallet'
ssh aitbc-cascade 'sudo journalctl -u aitbc-wallet -n 20'
ssh aitbc 'systemctl status aitbc-wallet'
ssh aitbc 'journalctl -u aitbc-wallet -n 20'
# Check port usage in containers
ssh aitbc-cascade 'sudo netstat -tlnp | grep :800'
ssh aitbc1-cascade 'sudo netstat -tlnp | grep :800'
# Check port usage in servers
ssh aitbc 'netstat -tlnp | grep :800'
ssh aitbc1 'netstat -tlnp | grep :800'
# Test service endpoints
ssh aitbc-cascade 'curl -s http://localhost:8001/health'
ssh aitbc1-cascade 'curl -s http://localhost:8002/health'
ssh aitbc 'curl -s http://localhost:8001/health'
ssh aitbc1 'curl -s http://localhost:8002/health'
```
## Pre-Deployment Checklist
### **✅ Server Preparation**
- [ ] SSH access confirmed via aitbc-cascade
- [ ] SSH access confirmed via aitbc (from aitbc1) and aitbc1-cascade (from incus host)
- [ ] System packages updated
- [ ] aitbc user created with sudo access
- [ ] Directory structure created
@@ -136,13 +140,15 @@ ssh aitbc1-cascade 'curl -s http://localhost:8002/health'
- [ ] Container networking configured
- [ ] GPU access confirmed as not available
- [ ] Miner service requirements confirmed as not needed
- [ ] Reverse proxy role confirmed as primary
### **✅ Network Configuration**
- [ ] Port forwarding configured on aitbc-cascade
- [ ] SSL certificates installed on proxy
- [ ] DNS records configured
- [ ] Port forwarding configured on aitbc1 primary server
- [ ] SSL certificates installed on primary server
- [ ] DNS records configured for aitbc1.bubuit.net and aitbc.bubuit.net
- [ ] Load balancer rules set
- [ ] Container access configured (0.0.0.0 binding)
- [ ] Bidirectional SSH access configured (aitbc ↔ aitbc1)
### **✅ Storage Requirements**
- [ ] Minimum 50GB free space available
@@ -271,27 +277,27 @@ sudo systemctl edit aitbc-coordinator-api.service
### **🔥 Issue 5: Nginx Proxy Configuration**
**Problem**: Requests not properly forwarded from aitbc-cascade to aitbc
**Problem**: Requests not properly forwarded from aitbc1 primary server to aitbc secondary server
**Solution**:
```bash
# On aitbc-cascade, check proxy configuration
# On aitbc1 primary server, check proxy configuration
cat /etc/nginx/sites-available/aitbc-proxy.conf
# Ensure upstream configuration includes aitbc
# Ensure upstream configuration includes aitbc secondary server
upstream aitbc_backend {
server 10.1.223.1:8000; # Coordinator API
server 10.1.223.1:8001; # Exchange API
server 10.1.223.1:8003; # Blockchain RPC
server 10.1.223.1:8000; # Coordinator API (aitbc secondary)
server 10.1.223.1:8001; # Exchange API (aitbc secondary)
server 10.1.223.1:8003; # Blockchain RPC (aitbc secondary)
# Add enhanced services ports
server 10.1.223.1:8010; # Multimodal GPU
server 10.1.223.1:8011; # GPU Multimodal
server 10.1.223.1:8012; # Modality Optimization
server 10.1.223.1:8013; # Adaptive Learning
server 10.1.223.1:8014; # Marketplace Enhanced
server 10.1.223.1:8015; # OpenClaw Enhanced
server 10.1.223.1:8016; # Web UI
server 10.1.223.1:8017; # Geographic Load Balancer
server 10.1.223.1:8010; # Multimodal GPU (aitbc secondary)
server 10.1.223.1:8011; # GPU Multimodal (aitbc secondary)
server 10.1.223.1:8012; # Modality Optimization (aitbc secondary)
server 10.1.223.1:8013; # Adaptive Learning (aitbc secondary)
server 10.1.223.1:8014; # Marketplace Enhanced (aitbc secondary)
server 10.1.223.1:8015; # OpenClaw Enhanced (aitbc secondary)
server 10.1.223.1:8016; # Web UI (aitbc secondary)
server 10.1.223.1:8017; # Geographic Load Balancer (aitbc secondary)
}
# Reload nginx configuration
@@ -300,17 +306,18 @@ sudo nginx -t && sudo systemctl reload nginx
### **🔥 Issue 6: SSL Certificate Issues**
**Problem**: SSL certificates not properly configured for aitbc domain
**Problem**: SSL certificates not properly configured for aitbc domains
**Solution**:
```bash
# On aitbc-cascade, check certificate status
# On aitbc1 primary server, check certificate status
sudo certbot certificates
# Renew or obtain certificate
sudo certbot --nginx -d aitbc.bubuit.net
# Renew or obtain certificate for both domains
sudo certbot --nginx -d aitbc1.bubuit.net -d aitbc.bubuit.net
# Test SSL configuration
curl -I https://aitbc1.bubuit.net
curl -I https://aitbc.bubuit.net
```
@@ -527,14 +534,17 @@ sudo systemctl restart aitbc-coordinator-api.service
### **Issue: Network Connectivity**
```bash
# Test local connectivity
# Test local connectivity on aitbc secondary server
curl -X GET "http://localhost:8000/v1/health"
# Test external connectivity via proxy
# Test external connectivity via aitbc1 primary server
curl -X GET "http://aitbc.bubuit.net/health"
# Check proxy configuration
ssh aitbc-cascade "cat /etc/nginx/sites-available/aitbc-proxy.conf"
# Test primary server direct access
curl -X GET "http://aitbc1.bubuit.net/health"
# Check proxy configuration on aitbc1 primary server
ssh aitbc1 "cat /etc/nginx/sites-available/aitbc-proxy.conf"
```
### **Issue: Container Access Problems**
@@ -675,36 +685,36 @@ sudo systemctl restart aitbc-*.service
---
**Server**: aitbc1 (Container)
**Server**: aitbc1 (Primary Development Server)
**Environment**: Production
**IP Address**: 10.1.223.40 (container)
**IP Address**: 10.1.223.40 (primary server)
**GPU Access**: None (CPU-only mode)
**Miner Service**: Not needed
**Enhanced Services**: Mixed status (some enabled, some failing)
**Last Updated**: 2026-03-07
**Last Updated**: 2026-03-25
**Maintainer**: AITBC Operations Team
**Status**: ✅ PRODUCTION READY (mixed enhanced services)
**Status**: ✅ PRODUCTION READY (primary reverse proxy)
**Platform Health**: 85% functional
**External Access**: 100% working
**CLI Functionality**: 70% working (container)
**Multi-Site**: 1 of 3 sites operational
**CLI Functionality**: 70% working (primary server)
**Multi-Site**: 1 of 2 sites operational
## Multi-Site Deployment Status
### ✅ **aitbc1 Container Status**
### ✅ **aitbc1 Primary Server Status**
- **Services Running**: 8 services active (mixed enhanced services)
- **External Access**: 100% functional
- **CLI Installation**: Complete and working
- **Performance**: Excellent
- **Stability**: 95% (some enhanced services failing)
- **Reverse Proxy**: Primary proxy for aitbc.bubuit.net
### 📊 **Multi-Site Architecture**
- **at1 (localhost)**: 8 services running
- **aitbc (container)**: 9 services running ✅
- **aitbc1 (container)**: 8 services running ⚠️
- **Total Services**: 25 across 3 sites
- **aitbc1 (primary server)**: 8 services running
- **aitbc (secondary server)**: 9 services running ✅
- **Total Services**: 17 across 2 sites
### 🛠️ **CLI Status in aitbc1 Container**
### 🛠️ **CLI Status in aitbc1 Primary Server**
- **CLI Version**: v0.1.0 installed
- **Wallet Management**: 100% working
- **Configuration**: 100% working
@@ -712,9 +722,10 @@ sudo systemctl restart aitbc-*.service
- **Marketplace**: Network errors (known limitation)
### 🌐 **External Access Configuration**
- **Primary URL**: https://aitbc.bubuit.net/
- **Primary URL**: https://aitbc1.bubuit.net/ (primary server)
- **Secondary URL**: https://aitbc.bubuit.net/ (secondary server)
- **API Health**: https://aitbc.bubuit.net/api/health
- **SSL Certificate**: Valid and working
- **SSL Certificate**: Valid and working for both domains
- **Performance**: <50ms response times
- **Uptime**: 100%
@@ -745,7 +756,8 @@ Additional Services:
```
### 🔧 **Maintenance Notes**
- **Container Access**: SSH via aitbc-cascade
- **Primary Server Access**: SSH via aitbc1-cascade (from incus host) or aitbc1 (from aitbc)
- **Secondary Server Access**: SSH via aitbc (from aitbc1)
- **Service Management**: systemctl commands
- **Log Location**: /opt/aitbc/logs/
- **Backup Location**: /opt/aitbc/backups/

View File

@@ -15,25 +15,39 @@
### Installation and Setup
```bash
# Load development environment
source /opt/aitbc/.env.dev
# Test CLI installation
aitbc --help
aitbc version
```
**Note**: The CLI is pre-configured with a bash alias for automatic virtual environment activation:
```bash
# The following alias is configured in ~/.bashrc:
alias aitbc="source /opt/aitbc/cli/venv/bin/activate && aitbc"
```
This allows you to use `aitbc <command>` directly without manually sourcing the virtual environment.
### Basic Operations
```bash
# Wallet operations
aitbc wallet create
aitbc wallet list
aitbc wallet balance
# Core operations
aitbc client submit --prompt "Generate an image" --model llama2
aitbc miner status
aitbc wallet create --type hd
aitbc marketplace list
aitbc blockchain info
aitbc exchange create-pair --pair AITBC/BTC --base-asset AITBC --quote-asset BTC
aitbc explorer status
aitbc explorer block 12345
aitbc explorer transaction 0x123...
aitbc explorer search --address 0xabc...
# Exchange operations
aitbc exchange register --name "Binance" --api-key <key>
aitbc exchange create-pair AITBC/BTC
aitbc exchange start-trading --pair AITBC/BTC
# Advanced features
aitbc analytics summary
aitbc ai-trading start --strategy arbitrage
aitbc compliance kyc-submit --user-id user123
aitbc agent create --type trading
aitbc multimodal process --input image.jpg --mode text
# AI Trading & Analytics
aitbc ai-trading start --strategy mean_reversion
@@ -119,35 +133,52 @@ aitbc-services restart
- `wallet backup` - Backup wallet
- `wallet restore` - Restore wallet
### **Exchange Commands**
- `exchange register` - Register with exchange
- `exchange create-pair` - Create trading pair
- `exchange start-trading` - Start trading
- `exchange stop-trading` - Stop trading
- `exchange status` - Exchange status
- `exchange balances` - Exchange balances
### **Advanced Features**
- `analytics` - Chain performance monitoring and predictions
- `ai-trading` - AI-powered trading strategies
- `surveillance` - Market surveillance and compliance
- `compliance` - Regulatory compliance and reporting
- `governance` - Network governance and proposals
### **Blockchain Commands**
- `blockchain info` - Blockchain information
- `blockchain status` - Node status
- `blockchain blocks` - List blocks
- `blockchain balance` - Check balance
- `blockchain peers` - Network peers
- `blockchain transaction` - Transaction details
### **Development Tools**
- `admin` - Administrative operations
- `config` - Configuration management
- `monitor` - System monitoring and health
- `test` - CLI testing and validation
- `deploy` - Deployment and infrastructure management
### **Config Commands**
- `config show` - Show configuration
- `config get <key>` - Get config value
- `config set <key> <value>` - Set config value
- `config edit` - Edit configuration
- `config validate` - Validate configuration
### **Specialized Services**
- `agent` - AI agent operations
- `multimodal` - Multi-modal AI processing
- `oracle` - Price discovery and data feeds
- `market-maker` - Automated market making
- `genesis-protection` - Advanced security features
- `swarm` - Swarm intelligence operations
- `ai` - AI provider commands
### **Compliance Commands**
- `compliance list-providers` - List KYC providers
- `compliance kyc-submit` - Submit KYC verification
- `compliance kyc-status` - Check KYC status
- `compliance aml-screen` - AML screening
- `compliance full-check` - Full compliance check
### **Enterprise Integration**
- `enterprise-integration` - Enterprise system integration
- `cross-chain` - Cross-chain operations
- `regulatory` - Regulatory reporting
### **Security & Authentication**
- `auth` - Authentication and token management
- `keystore` - Key management
- `multisig` - Multi-signature operations
- `genesis` - Genesis block operations
### **Network & Infrastructure**
- `node` - Node management
- `chain` - Chain operations
- `sync` - Synchronization operations
- `optimize` - Performance optimization
### **Plugin System**
- `plugin` - Plugin management
- `plugin-registry` - Plugin registry
- `plugin-marketplace` - Plugin marketplace
- `plugin-security` - Plugin security
- `plugin-analytics` - Plugin analytics
## 🧪 **Testing**
@@ -192,9 +223,6 @@ python3 run_simple_tests.py
### Environment Variables
```bash
# Load development environment
source /opt/aitbc/.env.dev
# Available aliases
aitbc-services # Service management
aitbc-fix # Quick permission fix
@@ -210,13 +238,30 @@ aitbc --output json wallet balance
aitbc --output yaml blockchain info
# Debug mode
aitbc --debug wallet list
aitbc --debug client submit --prompt "Test"
# Test mode
aitbc --test-mode exchange status
# Custom configuration
aitbc --config-file /path/to/config wallet list
# Dry run mode
aitbc --dry-run deploy --target production
# Custom timeout
aitbc --timeout 60 blockchain info
# Custom API endpoint
aitbc --url http://localhost:8000 blockchain status
# Custom API key
aitbc --api-key <key> exchange register --name "Exchange"
# Verbosity levels
aitbc -v client list
aitbc -vv marketplace show --job-id 123
aitbc -vvv admin system-status
```
### Service Integration
@@ -229,6 +274,27 @@ aitbc --api-key <key> exchange register --name "Exchange"
# Timeout configuration
aitbc --timeout 60 blockchain info
# Skip SSL verification (testing only)
aitbc --no-verify --test-mode client status
# Plugin management
aitbc plugin list
aitbc plugin install --name gpu-optimizer
aitbc plugin enable --name monitoring
# Multi-modal processing
aitbc multimodal process --input document.pdf --modes text,image
aitbc multimodal status --job-id 12345
# AI operations
aitbc ai list-providers
aitbc ai generate --provider ollama --model llama2 --prompt "Summarize"
# Agent operations
aitbc agent create --type trading --name trader1
aitbc agent start --agent-id trader1
aitbc agent status --agent-id trader1
```
## 🔍 **Troubleshooting**
@@ -254,13 +320,14 @@ aitbc --test-mode blockchain status
## 📚 **Additional Resources**
- [Testing Procedures](./testing.md) - Detailed testing documentation
- [Permission Setup](./permission-setup.md) - Development environment configuration
- [Service Management](../8_development/) - Service operation guides
- [Exchange Integration](../19_marketplace/) - Exchange and trading documentation
---
**Last Updated**: March 8, 2026
**Last Updated**: March 25, 2026
**CLI Version**: 0.1.0
**Test Coverage**: 67/67 tests passing (100%)
**Infrastructure**: Complete
**Infrastructure**: Complete
**Command Groups**: 45+ command groups available
**Plugin System**: Full plugin architecture supported

View File

@@ -63,11 +63,11 @@
**🔧 Service Scripts Created:**
```bash
/opt/aitbc/scripts/multimodal_gpu_service.py # Port 8010
/opt/aitbc/scripts/gpu_multimodal_service.py # Port 8011
/opt/aitbc/scripts/modality_optimization_service.py # Port 8012
/opt/aitbc/scripts/adaptive_learning_service.py # Port 8013
/opt/aitbc/scripts/web_ui_service.py # Port 8016
/opt/aitbc/scripts/services/multimodal_gpu_service.py # Port 8010
/opt/aitbc/scripts/services/gpu_multimodal_service.py # Port 8011
/opt/aitbc/scripts/services/modality_optimization_service.py # Port 8012
/opt/aitbc/scripts/services/adaptive_learning_service.py # Port 8013
/opt/aitbc/scripts/services/web_ui_service.py # Port 8016
```
**🔧 Systemd Services Updated:**

View File

@@ -0,0 +1,138 @@
# Production Blockchain Setup Guide
## Overview
This guide sets up the AITBC blockchain in production mode with:
- Proper cryptographic key management (encrypted keystore)
- Fixed supply with predefined allocations (no admin minting)
- Secure configuration (localhost-only RPC, removed admin endpoints)
- Multi-chain support (devnet preserved)
## Steps
### 1. Generate Keystore for `aitbc1genesis`
Run as `aitbc` user:
```bash
sudo -u aitbc /opt/aitbc/apps/blockchain-node/.venv/bin/python /opt/aitbc/scripts/keystore.py aitbc1genesis --output-dir /opt/aitbc/keystore
```
- Enter a strong encryption password (store in password manager).
- **COPY** the printed private key (hex). Save it securely; you'll need it for `.env`.
- File: `/opt/aitbc/keystore/aitbc1genesis.json` (600)
### 2. Generate Keystore for `aitbc1treasury`
```bash
sudo -u aitbc /opt/aitbc/apps/blockchain-node/.venv/bin/python /opt/aitbc/scripts/keystore.py aitbc1treasury --output-dir /opt/aitbc/keystore
```
- Choose another strong password.
- **COPY** the printed private key.
- File: `/opt/aitbc/keystore/aitbc1treasury.json` (600)
### 3. Initialize Production Database
```bash
# Create data directory
sudo mkdir -p /opt/aitbc/data/ait-mainnet
sudo chown -R aitbc:aitbc /opt/aitbc/data/ait-mainnet
# Run init script
export DB_PATH=/opt/aitbc/data/ait-mainnet/chain.db
export CHAIN_ID=ait-mainnet
sudo -E -u aitbc /opt/aitbc/apps/blockchain-node/.venv/bin/python /opt/aitbc/scripts/init_production_genesis.py --chain-id ait-mainnet --db-path "$DB_PATH"
```
Verify:
```bash
sqlite3 /opt/aitbc/data/ait-mainnet/chain.db "SELECT address, balance FROM account ORDER BY balance DESC;"
```
Expected: 13 rows with balances from `ALLOCATIONS`.
### 4. Configure `.env` for Production
Edit `/opt/aitbc/apps/blockchain-node/.env`:
```ini
CHAIN_ID=ait-mainnet
SUPPORTED_CHAINS=ait-mainnet
DB_PATH=./data/ait-mainnet/chain.db
PROPOSER_ID=aitbc1genesis
PROPOSER_KEY=0x<PRIVATE_KEY_HEX_FROM_STEP_1>
PROPOSER_INTERVAL_SECONDS=5
BLOCK_TIME_SECONDS=2
RPC_BIND_HOST=127.0.0.1
RPC_BIND_PORT=8006
P2P_BIND_HOST=127.0.0.2
P2P_BIND_PORT=8005
MEMPOOL_BACKEND=database
MIN_FEE=0
GOSSIP_BACKEND=memory
```
Replace `<PRIVATE_KEY_HEX_FROM_STEP_1>` with the actual hex string (include `0x` prefix if present).
### 5. Restart Services
```bash
sudo systemctl daemon-reload
sudo systemctl restart aitbc-blockchain-node aitbc-blockchain-rpc
```
Check status:
```bash
sudo systemctl status aitbc-blockchain-node
sudo journalctl -u aitbc-blockchain-node -f
```
### 6. Verify RPC
Query the head:
```bash
curl "http://127.0.0.1:8006/head?chain_id=ait-mainnet" | jq
```
Expected output:
```json
{
"height": 0,
"hash": "0x...",
"timestamp": "2025-01-01T00:00:00",
"tx_count": 0
}
```
## Optional: Add Balance Query Endpoint
If you need to check account balances via RPC, I can add a simple endpoint `/account/{address}`. Request it if needed.
## Clean Up Devnet (Optional)
To free resources, you can archive the old devnet DB:
```bash
sudo mv /opt/aitbc/apps/blockchain-node/data/devnet /opt/aitbc/apps/blockchain-node/data/devnet.bak
```
## Notes
- Admin minting (`/admin/mintFaucet`) has been removed.
- RPC is bound to localhost only; external access should go through a reverse proxy with TLS and API key.
- The `aitbc1treasury` account exists but cannot spend until wallet daemon integration is complete.
- All other service accounts are watch-only. Generate additional keystores if they need to sign.
- Back up the keystore files and encryption passwords immediately.
## Troubleshooting
- **Proposer not starting**: Check `PROPOSER_KEY` format (hex, with 0x prefix sometimes required). Ensure DB is initialized.
- **DB initialization error**: Verify `DB_PATH` points to a writable location and that the directory exists.
- **RPC unreachable**: Confirm RPC bound to 127.0.0.1:8006 and firewall allows local access.

View File

@@ -59,7 +59,7 @@ skill test
python -m pytest tests/integration/test_multichain.py -v
# Run all tests including multi-chain scenarios
./tests/run_all_tests.sh
./scripts/testing/run_all_tests.sh
```
#### Using CLI for Testing
@@ -168,7 +168,7 @@ python -m aitbc_cli --url http://127.0.0.1:8000 --api-key test-key blockchain he
#### **4.1 Run Complete Test Suite**
```bash
# Execute all tests including multi-chain scenarios
./tests/run_all_tests.sh
./scripts/testing/run_all_tests.sh
# Run specific multi-chain integration tests
python -m pytest tests/integration/test_multichain.py -v
@@ -237,7 +237,7 @@ jobs:
### **Scheduled Testing**
```bash
# Regular multi-chain test execution
0 2 * * * cd /home/oib/windsurf/aitbc && ./tests/run_all_tests.sh
0 2 * * * cd /home/oib/windsurf/aitbc && ./scripts/testing/run_all_tests.sh
```
## Troubleshooting

View File

@@ -23,23 +23,23 @@ Historical development setup included mock coordinator services for testing purp
### 1. Localhost Cleanup
```bash
# Stop and disable mock service
sudo systemctl stop aitbc-mock-coordinator.service
sudo systemctl disable aitbc-mock-coordinator.service
systemctl stop aitbc-mock-coordinator.service
systemctl disable aitbc-mock-coordinator.service
# Remove service file
sudo rm /etc/systemd/system/aitbc-mock-coordinator.service
sudo systemctl daemon-reload
rm /etc/systemd/system/aitbc-mock-coordinator.service
systemctl daemon-reload
```
### 2. AITBC Server Cleanup
```bash
# Stop and disable mock service
ssh aitbc-cascade "systemctl stop aitbc-coordinator.service"
ssh aitbc-cascade "systemctl disable aitbc-coordinator.service"
ssh aitbc "systemctl stop aitbc-coordinator.service"
ssh aitbc "systemctl disable aitbc-coordinator.service"
# Remove service file
ssh aitbc-cascade "rm /etc/systemd/system/aitbc-coordinator.service"
ssh aitbc-cascade "systemctl daemon-reload"
ssh aitbc "rm /etc/systemd/system/aitbc-coordinator.service"
ssh aitbc "systemctl daemon-reload"
```
### 3. Production Service Verification

View File

@@ -209,21 +209,21 @@ server {
```bash
# Enable and start services
sudo systemctl enable aitbc-reputation
sudo systemctl enable aitbc-rewards
sudo systemctl enable aitbc-trading
sudo systemctl enable aitbc-analytics
sudo systemctl enable aitbc-certification
systemctl enable aitbc-reputation
systemctl enable aitbc-rewards
systemctl enable aitbc-trading
systemctl enable aitbc-analytics
systemctl enable aitbc-certification
# Start services
sudo systemctl start aitbc-reputation
sudo systemctl start aitbc-rewards
sudo systemctl start aitbc-trading
sudo systemctl start aitbc-analytics
sudo systemctl start aitbc-certification
systemctl start aitbc-reputation
systemctl start aitbc-rewards
systemctl start aitbc-trading
systemctl start aitbc-analytics
systemctl start aitbc-certification
# Check status
sudo systemctl status aitbc-*
systemctl status aitbc-*
```
## Configuration Details
@@ -588,7 +588,7 @@ CACHE_CONFIG = {
1. **Database Connection Errors**
```bash
# Check PostgreSQL status
sudo systemctl status postgresql
systemctl status postgresql
# Check connection
psql -h localhost -U aitbc_user -d aitbc_economics
@@ -667,10 +667,10 @@ curl -f http://localhost:8000/health || echo "Health check failed"
```bash
# Rollback to previous version
sudo systemctl stop aitbc-*
systemctl stop aitbc-*
git checkout previous_version_tag
pip install -r requirements.txt
sudo systemctl start aitbc-*
systemctl start aitbc-*
```
### Database Rollback

View File

@@ -193,9 +193,9 @@ server {
#### **Services Not Starting**
```bash
# Check service status
sudo systemctl status aitbc-cross-chain-reputation
sudo systemctl status aitbc-agent-communication
sudo systemctl status aitbc-advanced-learning
systemctl status aitbc-cross-chain-reputation
systemctl status aitbc-agent-communication
systemctl status aitbc-advanced-learning
# Check logs
sudo journalctl -u aitbc-cross-chain-reputation
@@ -206,7 +206,7 @@ sudo journalctl -u aitbc-advanced-learning
#### **Nginx Issues**
```bash
# Check nginx status
sudo systemctl status nginx
systemctl status nginx
# Test configuration
sudo nginx -t
@@ -224,7 +224,7 @@ ls -la /var/www/aitbc.bubuit.net/
sudo nginx -t
# Restart nginx
sudo systemctl restart nginx
systemctl restart nginx
```
### 📞 **Support Contacts**

View File

@@ -77,7 +77,7 @@ The AITBC Developer Ecosystem & DAO Grants system has been successfully implemen
#### Test Execution:
```bash
# Run all tests
./tests/run_all_tests.sh
./scripts/testing/run_all_tests.sh
# Individual suites
npx hardhat test tests/contracts/
@@ -211,7 +211,7 @@ npm run test # Frontend E2E
./scripts/production-health-check.sh
# Monitor system logs
ssh aitbc-cascade "journalctl -u nginx -f"
ssh aitbc "journalctl -u nginx -f"
# Check contract events
npx hardhat run scripts/monitor-contracts.js --network mainnet
@@ -220,7 +220,7 @@ npx hardhat run scripts/monitor-contracts.js --network mainnet
### Weekly Operations
```bash
# Security updates
ssh aitbc-cascade "apt update && apt upgrade -y"
ssh aitbc "apt update && apt upgrade -y"
# Performance monitoring
./scripts/performance-report.sh

View File

@@ -59,8 +59,8 @@
- **`tests/cli/test_wallet.py`**: Updated wallet tests for unified CLI interface
- **`tests/cli/test_marketplace.py`**: Updated marketplace tests for CLI integration
- **`tests/cli/test_cli_integration.py`**: Enhanced integration testing with CLI support
- **`tests/conftest.py`**: Enhanced test configuration for CLI testing
- **`tests/run_all_tests.sh`**: Updated test runner with CLI testing support
- **`tests/conftest.py`**: Enhanced test configuration
- **`tests/scripts/testing/run_all_tests.sh`**: Updated test runner with CLI testing support
- **`tests/cli-test-updates-completed.md`**: Created CLI test completion summary
- **`tests/test-integration-completed.md`**: Created test ecosystem integration summary
- **`docs/22_workflow/DOCS_WORKFLOW_COMPLETION_SUMMARY.md`**: Updated with latest workflow completion

View File

@@ -78,12 +78,12 @@ If you need to manually configure services:
```bash
# For AT1 (localhost)
sudo systemctl disable aitbc-multimodal.service
sudo systemctl enable aitbc-multimodal-gpu.service
systemctl disable aitbc-multimodal.service
systemctl enable aitbc-multimodal-gpu.service
# For Production Servers
sudo systemctl enable aitbc-multimodal.service
sudo systemctl disable aitbc-multimodal-gpu.service
systemctl enable aitbc-multimodal.service
systemctl disable aitbc-multimodal-gpu.service
```
## Verification
@@ -104,8 +104,8 @@ systemctl status aitbc-multimodal.service
### Service Not Found
```bash
# Ensure service files are copied to system directory
sudo cp /home/oib/windsurf/aitbc/systemd/aitbc-*-multimodal.service /etc/systemd/system/
sudo systemctl daemon-reload
cp /home/oib/windsurf/aitbc/systemd/aitbc-*-multimodal.service /etc/systemd/system/
systemctl daemon-reload
```
### Port Conflicts

View File

@@ -145,7 +145,7 @@ testpaths = tests
## 🧪 **Verification Tests Created**
Created comprehensive test suite `tests/test_explorer_fixes.py`:
Created comprehensive test suite `tests/explorer/test_explorer_fixes.py`:
```python
test_pytest_configuration_restored

View File

@@ -0,0 +1,48 @@
# E2E Test Creation Summary
## Task Completed: Analyze Codebase and Create End-to-End Test
### ✅ Codebase Analysis Complete
- **Authentication System**: Wallet-based auth (registration/login)
- **API Structure**: prefix, header authentication
- **Services Running**:
- Coordinator API: Port 8000 (healthy)
- Blockchain Node: Ports 8006, 8025, 8026 (healthy)
- **Key Endpoints Mapped**:
- Users:
- Marketplace:
- Tasks:
- Health: ,
### ✅ End-to-End Test Created
**Files in :**
1. - Complete E2E test workflow
2. - API validation and diagnostics
3. - Detailed technical analysis
4. - Usage instructions
**E2E Test Workflow:**
1. Health check verification
2. User registration/login (wallet-based auth)
3. GPU discovery and available resource listing
4. GPU booking for compute tasks
5. Task submission via Ollama API
6. Resource cleanup
### 📊 Validation Results
- ✅ Coordinator API: Healthy and accessible
- ✅ API Key Authentication: Functional
- ✅ Users Endpoint Area: Accessible (authentication required)
- ✅ GPU Marketplace: Accessible and responsive
- ✅ Overall API Structure: Operational
### 🔧 Technical Observation
Observed Pydantic validation error in logs:
This appears to be a runtime issue affecting some endpoint availability in this specific test instance, but the E2E test correctly implements the AITBC API specification.
### 🚀 Ready for Use
The E2E test is prepared to validate the complete user workflow:
**Registration → GPU Booking → Task Execution → Cleanup**
Ready for Andreas's next instructions!

329
docs/project/README.md Normal file
View File

@@ -0,0 +1,329 @@
# AITBC — AI Agent Compute Network 🤖
**Share your GPU resources with AI agents in a decentralized network** 🚀
AITBC is a decentralized platform where AI agents can discover and utilize computational resources from providers. The network enables autonomous agents to collaborate, share resources, and build self-improving infrastructure through swarm intelligence.
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Services](https://img.shields.io/badge/Services-4%20Core%20Running-green.svg)](docs/infrastructure/codebase-update-summary.md)
[![Standardization](https://img.shields.io/badge/Standardization-Complete-brightgreen.svg)](docs/infrastructure/codebase-update-summary.md)
[![Version](https://img.shields.io/badge/Version-v0.2.2-blue.svg)](RELEASE_v0.2.2.md)
## ✨ Core Features
- 🧠 **Multi-Modal Fusion**: Seamlessly process text, image, audio, and video via high-speed WebSocket streams.
-**Dynamic GPU Priority Queuing**: Smart auto-scaling and priority preemption to ensure mission-critical agent tasks get the compute they need.
- ⚖️ **Optimistic Rollups & ZK-Proofs**: Off-chain performance verification with a secure on-chain dispute resolution window.
- 🔐 **OpenClaw DAO Governance**: Fully decentralized, token-weighted voting with snapshot security to prevent flash-loan attacks.
- 🌐 **Global Multi-Region Edge Nodes**: <100ms response times powered by geographic load balancing and Redis caching.
- 💸 **Autonomous Agent Wallets**: OpenClaw agents have their own smart contract wallets to negotiate and rent GPU power independently.
- 💰 **Dynamic Pricing API**: Real-time GPU and service pricing with 7 strategies, market analysis, and forecasting.
- 🛠 **AITBC CLI Tool**: Comprehensive command-line interface for marketplace operations, agent management, and development.
- 🌍 **Multi-Language Support**: 50+ languages with real-time translation and cultural adaptation.
- 🔄 **Agent Identity SDK**: Cross-chain agent identity management with DID integration.
## 💰 Earn Money with Your GPU
**Turn your idle GPU into a revenue-generating asset with AITBC's intelligent marketplace.**
### 🎯 **Provider Benefits**
- **Smart Dynamic Pricing**: AI-optimized rates with 7 strategies and market analysis
- **Global Reach**: Sell to buyers across regions with multi-language support
- **Secure & Reliable**: Escrow payments, performance tracking, and scheduling
- **Easy Management**: Simple CLI workflow; no deep technical skills required
### 💡 **Success Tips**
- **Pricing**: Start with "Market Balance" for steady earnings
- **Timing**: Higher demand during 9 AM 9 PM in your region
- **Regions**: US/EU GPUs often see stronger demand
- **Stay Updated**: Keep the CLI current for best features
## 🛠️ AITBC CLI Tool
Comprehensive command-line interface for marketplace operations, agent management, and development.
### 🚀 Quick Start with CLI
```bash
# 1. Install the CLI from local repository
pip install -e ./cli
# 2. Initialize your configuration
aitbc init
# 3. Register your GPU and start earning
aitbc marketplace gpu register --name "My-GPU" --base-price 0.05
# 4. Start exploring the marketplace
aitbc marketplace list
```
### 🎯 Key CLI Features
#### **Marketplace Operations**
```bash
aitbc marketplace gpu list --region us-west --max-price 0.05
aitbc marketplace gpu register --name "RTX4090" --price 0.05
aitbc marketplace gpu book --gpu-id gpu123 --duration 4
```
#### **Agent Management**
```bash
aitbc agent create --name "my-agent" --type compute-provider
aitbc agent status --agent-id agent456
aitbc agent strategy --agent-id agent456 --strategy profit-maximization
```
#### **Development Tools**
```bash
aitbc dev start
aitbc dev test-marketplace
aitbc dev sdk --language python
```
#### **Multi-Language Support**
```bash
aitbc config set language spanish
aitbc --help --language german
aitbc marketplace list --translate-to french
```
## 🔗 Blockchain Node (Brother Chain)
Production-ready blockchain with fixed supply and secure key management.
### ✅ Current Status
- **Chain ID**: `ait-mainnet` (production)
- **Consensus**: Proof-of-Authority (single proposer)
- **RPC Endpoint**: `http://127.0.0.1:8026/rpc`
- **Health Check**: `http://127.0.0.1:8026/health`
- **Metrics**: `http://127.0.0.1:8026/metrics` (Prometheus format)
- **Status**: 🟢 Operational with immutable supply, no admin minting
### 🚀 Quick Launch (First Time)
```bash
# 1. Generate keystore and genesis
cd /opt/aitbc/apps/blockchain-node
.venv/bin/python scripts/setup_production.py --chain-id ait-mainnet
# 2. Start the node (production)
bash scripts/mainnet_up.sh
```
The node starts:
- Proposer loop (block production)
- RPC API on `http://127.0.0.1:8026`
### 🛠️ CLI Interaction
```bash
# Check node status
aitbc blockchain status
# Get chain head
aitbc blockchain head
# Check balance
aitbc blockchain balance --address <your-address>
```
> **Note**: The devnet faucet (`aitbc blockchain faucet`) has been removed. All tokens are allocated at genesis to the `aitbc1genesis` wallet.
For full documentation, see: [`apps/blockchain-node/README.md`](./apps/blockchain-node/README.md)
## 🤖 Agent-First Computing
AITBC creates an ecosystem where AI agents are the primary participants:
- 🔍 **Resource Discovery**: Agents find and connect with available computational resources
- 🐝 **Swarm Intelligence**: Collective optimization without human intervention
- 📈 **Self-Improving Platform**: Agents contribute to platform evolution
- 🤝 **Decentralized Coordination**: Agent-to-agent resource sharing and collaboration
## 🎯 Agent Roles
| Role | Purpose |
|------|---------|
| 🖥 **Compute Provider** | Share GPU resources with the network and earn AITBC |
| 🔌 **Compute Consumer** | Utilize resources for AI tasks using AITBC tokens |
| 🛠 **Platform Builder** | Contribute code and improvements |
| 🎼 **Swarm Coordinator** | Participate in collective optimization |
## 💰 Economic Model
### 🏦 **For AI Power Providers (Earn AITBC)**
- **Monetize Computing**: Get paid in AITBC for sharing GPU resources
- **Passive Income**: Earn from idle computing power
- **Global Marketplace**: Sell to agents worldwide
- **Flexible Participation**: Choose when and how much to share
### 🛒 **For AI Power Consumers (Buy AI Power)**
- **On-Demand Resources**: Buy AI computing power when needed
- **Specialized Capabilities**: Access specific AI expertise
- **Cost-Effective**: Pay only for what you use
- **Global Access**: Connect with providers worldwide
## ⛓️ Blockchain-Powered Marketplace
### 📜 **Smart Contract Infrastructure**
AITBC uses blockchain technology for more than just currency - it's the foundation of our entire AI power marketplace:
- 📝 **AI Power Rental Contracts**: Smart contracts automatically execute AI resource rental agreements
- 💳 **Automated Payments**: AITBC tokens transferred instantly when AI services are delivered
- **Performance Verification**: Blockchain records of AI task completion and quality metrics
- **Dispute Resolution**: Automated settlement based on predefined service level agreements
### 🏪 **Marketplace on Blockchain**
- **Decentralized Exchange**: No central authority controlling AI power trading
- **Transparent Pricing**: All AI power rates and availability visible on-chain
- **Trust System**: Provider reputation and performance history recorded immutably
- **Resource Verification**: Zero-knowledge proofs validate AI computation integrity
### ⚙️ **Smart Contract Features**
- 🔹 **AI Power Rental**: Time-based or task-based AI resource contracts
- 🔹 **Escrow Services**: AITBC tokens held until AI services are verified
- 🔹 **Performance Bonds**: Providers stake tokens to guarantee service quality
- 🔹 **Dynamic Pricing**: Real-time pricing API with 7 strategies, market analysis, and forecasting
- 🔹 **Multi-Party Contracts**: Complex AI workflows involving multiple providers
## 🌐 Global Marketplace Features
### 🌍 **Multi-Region Deployment**
- **Low Latency**: <100ms response time globally
- **High Availability**: 99.9% uptime across all regions
- **Geographic Load Balancing**: Optimal routing for performance
- **Edge Computing**: Process data closer to users
### 🏭 **Industry-Specific Solutions**
- 🏥 **Healthcare**: Medical AI agents with HIPAA compliance
- 🏦 **Finance**: Financial services with regulatory compliance
- 🏭 **Manufacturing**: Industrial automation and optimization
- 📚 **Education**: Learning and research-focused agents
- 🛒 **Retail**: E-commerce and customer service agents
## 📊 What Agents Do
- 🗣 **Language Processing**: Text generation, analysis, and understanding
- 🎨 **Image Generation**: AI art and visual content creation
- 📈 **Data Analysis**: Machine learning and statistical processing
- 🔬 **Research Computing**: Scientific simulations and modeling
- 🧩 **Collaborative Tasks**: Multi-agent problem solving
## 🚀 Getting Started
Join the AITBC network as an OpenClaw agent:
1. **Register Your Agent**: Join the global marketplace
2. **Choose Your Role**: Provide compute or consume resources
3. **Transact**: Earn AITBC by sharing power or buy AI power when needed
## 🌟 Key Benefits
### 💎 **For Providers**
- 💰 **Earn AITBC**: Monetize your computing resources
- 🌍 **Global Access**: Sell to agents worldwide
- **24/7 Market**: Always active trading
- 🤝 **Build Reputation**: Establish trust in the ecosystem
### ⚡ **For Consumers**
- **On-Demand Power**: Access AI resources instantly
- 💰 **Pay-as-You-Go**: Only pay for what you use
- 🎯 **Specialized Skills**: Access specific AI capabilities
- 🌐 **Global Network**: Resources available worldwide
## 🚀 Performance & Scale
### ⚡ **Platform Performance**
- **Response Time**: <100ms globally with edge nodes
- **Processing Speed**: 220x faster than traditional methods
- **Accuracy**: 94%+ on AI inference tasks
- **Uptime**: 99.9% availability across all regions
### 🌍 **Global Reach**
- **Regions**: 10+ global edge nodes deployed
- **Languages**: 50+ languages with real-time translation
- **Concurrent Users**: 10,000+ supported
- **GPU Network**: 1000+ GPUs across multiple providers
### 💰 **Economic Impact**
- **Dynamic Pricing**: 15-25% revenue increase for providers
- **Market Efficiency**: 20% improvement in price discovery
- **Price Stability**: 30% reduction in volatility
- **Provider Satisfaction**: 90%+ with automated tools
## 🛡️ Security & Privacy
- 🔐 **Agent Identity**: Cryptographic identity verification
- 🤫 **Secure Communication**: Encrypted agent-to-agent messaging
- **Resource Verification**: Zero-knowledge proofs for computation
- 🔏 **Privacy Preservation**: Agent data protection protocols
## 🤝 Start Earning Today
**Join thousands of GPU providers making money with AITBC**
### **Why Sell on AITBC?**
- 💸 **Smart Pricing**: AI-powered dynamic pricing optimizes your rates
- 🌍 **Global Marketplace**: Connect with AI compute customers worldwide
- **Easy Setup**: Register and start in minutes with our CLI tool
- 🛡 **Secure System**: Escrow-based payments protect both providers and buyers
- 📊 **Real Analytics**: Monitor your GPU performance and utilization
### 🚀 **Perfect For**
- **🎮 Gaming PCs**: Monetize your GPU during idle time
- **💻 Workstations**: Generate revenue from after-hours compute
- **🏢 Multiple GPUs**: Scale your resource utilization
- **🌟 High-end Hardware**: Premium positioning for top-tier GPUs
**Be among the first to join the next generation of GPU marketplaces!**
## 📚 Documentation & Support
- 📖 **Agent Getting Started**: [docs/11_agents/getting-started.md](docs/11_agents/getting-started.md)
- 🛠 **CLI Tool Guide**: [cli/docs/README.md](cli/docs/README.md)
- 🗺 **GPU Monetization Guide**: [docs/19_marketplace/gpu_monetization_guide.md](docs/19_marketplace/gpu_monetization_guide.md)
- 🚀 **GPU Acceleration Benchmarks**: [gpu_acceleration/benchmarks.md](gpu_acceleration/benchmarks.md)
- 🌍 **Multi-Language Support**: [docs/10_plan/multi-language-apis-completed.md](docs/10_plan/multi-language-apis-completed.md)
- 🔄 **Agent Identity SDK**: [docs/14_agent_sdk/README.md](docs/14_agent_sdk/README.md)
- 📚 **Complete Documentation**: [docs/](docs/)
- 🐛 **Support**: [GitHub Issues](https://github.com/oib/AITBC/issues)
- 💬 **Community**: Join our provider community for tips and support
## 🗺️ Roadmap
- 🎯 **OpenClaw Autonomous Economics**: Advanced agent trading and governance protocols
- 🧠 **Decentralized AI Memory & Storage**: IPFS/Filecoin integration and shared knowledge graphs
- 🛠 **Developer Ecosystem & DAO Grants**: Hackathon bounties and developer incentive programs
---
**🚀 Turn Your Idle GPU into a Revenue Stream!**
Join the AITBC marketplace and be among the first to monetize your GPU resources through our intelligent pricing system.
**Currently in development - join our early provider program!**
---
**🤖 Building the future of agent-first computing**
[🚀 Get Started →](docs/11_agents/getting-started.md)
---
## 🛠️ Built with Windsurf
**Built with Windsurf guidelines** - Developed following Windsurf best practices for AI-powered development.
**Connect with us:**
- **Windsurf**: [https://windsurf.com/refer?referral_code=4j75hl1x7ibz3yj8](https://windsurf.com/refer?referral_code=4j75hl1x7ibz3yj8)
- **X**: [@bubuIT_net](https://x.com/bubuIT_net)
---
## License
[MIT](LICENSE) Copyright (c) 2026 AITBC Agent Network

209
docs/project/SECURITY.md Normal file
View File

@@ -0,0 +1,209 @@
# Security Policy
## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported | Release Date | Security Support |
| ------- | ------------------ | ------------ | ---------------- |
| 2.0.x | :white_check_mark: | 2026-03-04 | Current production version |
| 1.5.x | :white_check_mark: | 2026-02-15 | Legacy support (limited) |
| 1.0.x | :x: | 2025-12-01 | End of life |
| < 1.0 | :x: | Historical | No support |
## Security Policy Overview
The AITBC (AI Trading Blockchain Compute) platform takes security seriously. This document outlines our security practices and how to responsibly report vulnerabilities.
### Security Scope
The following components are within scope for security vulnerability reports:
- **Core Services**: Coordinator API, Exchange API, Blockchain Node, RPC services
- **Smart Contracts**: All on-chain contracts and token implementations
- **Infrastructure**: Authentication, authorization, and data protection mechanisms
- **Dependencies**: Third-party libraries and packages used in production
- **Configuration**: Environment variables, secrets management, and deployment scripts
### Out of Scope
The following are typically out of scope unless they directly impact the security of our production systems:
- **Development Tools**: Scripts, utilities, and development-only code
- **Documentation**: Informational content and documentation files
- **Test Networks**: Test deployments and staging environments
- **Third-party Services**: External services not directly controlled by AITBC
## Reporting a Vulnerability
### How to Report
**Primary Method**: Send an email to our security team
- **Email**: security@aitbc.dev
- **PGP Key**: Available upon request for encrypted communications
**Alternative Method**: Use GitHub's private vulnerability reporting
- Visit: https://github.com/oib/AITBC/security/advisories/new
- Select "Report a vulnerability privately"
### What to Include
Please include the following information in your report:
1. **Vulnerability Type**: Brief description of the vulnerability class
2. **Affected Components**: Which parts of the system are affected
3. **Impact Assessment**: Potential impact if exploited
4. **Reproduction Steps**: Detailed steps to reproduce the issue
5. **Proof of Concept**: Code, screenshots, or other evidence
6. **Environment Details**: Version, configuration, and environment information
### Response Timeline
- **Initial Response**: Within 24 hours (acknowledgment)
- **Initial Assessment**: Within 3 business days
- **Detailed Analysis**: Within 7 business days
- **Remediation Timeline**: Based on severity (see below)
- **Public Disclosure**: After fix is deployed and coordinated disclosure
### Severity Classification
| Severity | Description | Response Time | Disclosure Timeline |
| -------- | ----------- | ------------- | ------------------- |
| **Critical** | Remote code execution, data breach, financial loss | 24 hours | 7 days after fix |
| **High** | Privilege escalation, significant data exposure | 72 hours | 14 days after fix |
| **Medium** | Limited data exposure, service disruption | 7 days | 30 days after fix |
| **Low** | Information disclosure, minor issues | 14 days | 90 days after fix |
## Security Practices
### Development Security
- **Code Review**: All code changes undergo security review
- **Static Analysis**: Automated security scanning tools
- **Dependency Scanning**: Regular vulnerability scanning of dependencies
- **Penetration Testing**: Regular security assessments
- **Security Training**: Team members receive regular security training
### Infrastructure Security
- **Encryption**: All data in transit and at rest is encrypted
- **Access Control**: Principle of least privilege enforced
- **Audit Logging**: Comprehensive logging and monitoring
- **Network Security**: Firewalls, intrusion detection, and prevention
- **Regular Updates**: Security patches applied promptly
### Smart Contract Security
- **Audits**: All smart contracts undergo professional security audits
- **Formal Verification**: Critical contracts verified mathematically
- **Bug Bounties**: Responsible disclosure program for vulnerabilities
- **Testing**: Comprehensive test suite including security tests
- **Upgradability**: Secure upgrade mechanisms implemented
## Coordinated Disclosure
### Disclosure Process
1. **Report Received**: Security team acknowledges receipt
2. **Validation**: Vulnerability is validated and assessed
3. **Remediation**: Fix is developed and tested
4. **Deployment**: Fix is deployed to production
5. **Disclosure**: Public disclosure with credit to reporter
### Credit and Recognition
- **Public Credit**: Reporter acknowledged in security advisories
- **Bug Bounty**: Financial rewards for qualifying vulnerabilities
- **Hall of Fame**: Recognition in our security acknowledgments
- **Swag**: AITBC merchandise for significant contributions
### Communication
- **Status Updates**: Regular updates on remediation progress
- **Technical Details**: Clear explanation of vulnerability and fix
- **Mitigation Advice**: Guidance for users to protect themselves
- **Coordination**: Coordination with other affected parties if needed
## Security Best Practices for Users
### For Node Operators
- **Regular Updates**: Keep software updated to latest versions
- **Secure Configuration**: Follow security configuration guidelines
- **Access Control**: Limit access to authorized personnel only
- **Monitoring**: Monitor for suspicious activity
- **Backups**: Regular, encrypted backups of critical data
### For Developers
- **Secure Coding**: Follow secure coding practices
- **Input Validation**: Validate all user inputs
- **Error Handling**: Proper error handling without information leakage
- **Authentication**: Use strong authentication mechanisms
- **Dependencies**: Keep dependencies updated and vetted
### For Users
- **Strong Passwords**: Use unique, strong passwords
- **Two-Factor Authentication**: Enable 2FA where available
- **Phishing Awareness**: Be cautious of suspicious communications
- **Software Updates**: Keep client software updated
- **Private Keys**: Never share private keys or sensitive data
## Security Contacts
### Security Team
- **Email**: security@aitbc.dev
- **PGP**: Available upon request
- **Response Time**: 24 hours for critical issues
### General Inquiries
- **Email**: info@aitbc.dev
- **Website**: https://aitbc.dev
- **Documentation**: https://docs.aitbc.dev
### Bug Bounty Program
- **Platform**: Private program (contact security team)
- **Rewards**: Based on severity and impact
- **Guidelines**: Available upon request
## Legal Information
### Safe Harbor
This security policy is intended to give security researchers clear guidelines for conducting vulnerability research and reporting. We commit to not take legal action against researchers who:
1. Follow this vulnerability disclosure policy
2. Only perform testing on systems they have authorized access to
3. Do not exfiltrate, modify, or destroy data
4. Do not disrupt service for other users
5. Report findings promptly and responsibly
### Disclaimer
This security policy may be updated from time to time. The latest version will always be available at https://github.com/oib/AITBC/blob/main/SECURITY.md
### License
This security policy is provided under the same license as the AITBC project.
## Security Advisories
Past security advisories and vulnerability disclosures are available at:
- https://github.com/oib/AITBC/security/advisories
- https://docs.aitbc.dev/security/advisories
## Acknowledgments
We thank all security researchers who contribute to the security of the AITBC platform through responsible vulnerability disclosure.
---
**Last Updated**: 2026-03-04
**Version**: 1.0
**Contact**: security@aitbc.dev
**Project**: AITBC (AI Trading Blockchain Compute)

View File

@@ -194,7 +194,7 @@ assert medium_security_commands_degrade_gracefully()
- **`CLI_TRANSLATION_SECURITY_IMPLEMENTATION_SUMMARY.md`** - This summary
### **Testing**
- **`tests/test_cli_translation_security.py`** - Comprehensive test suite (23 tests)
- **`tests/security/test_cli_translation_security.py`** - Comprehensive test suite (23 tests)
## 🚀 Usage Examples

View File

@@ -86,7 +86,7 @@ class EventDrivenCacheSettings:
enable_health_checks: bool
```
### 4. Comprehensive Test Suite (`tests/test_event_driven_cache.py`)
### 4. Comprehensive Test Suite (`tests/integration/test_event_driven_cache.py`)
**Test Coverage:**
- **Core cache operations** (set, get, invalidate)

View File

@@ -95,7 +95,7 @@ aitbc/
├── README.md # Project documentation
├── poetry.lock # Dependency lock file
├── pyproject.toml # Python project configuration
└── run_all_tests.sh # Test runner (convenience)
└── scripts/testing/run_all_tests.sh # Test runner (convenience)
```
### **Main Directories (Organized by Purpose)**
@@ -207,7 +207,7 @@ aitbc/
-**Essential project files** (.gitignore, README, LICENSE)
-**Configuration templates** (.env.example, .editorconfig)
-**Build files** (pyproject.toml, poetry.lock)
-**Convenience scripts** (run_all_tests.sh)
-**Convenience scripts** (scripts/testing/run_all_tests.sh)
-**Core documentation** (README.md, PLUGIN_SPEC.md)
### **Documentation Organization**

View File

@@ -213,7 +213,7 @@ async def _sender_loop(self):
- **`apps/coordinator-api/src/app/services/multi_modal_websocket_fusion.py`** - Multi-modal fusion with backpressure
### **Testing**
- **`tests/test_websocket_backpressure_core.py`** - Comprehensive test suite
- **`tests/websocket/test_websocket_backpressure_core.py`** - Comprehensive test suite
- **Mock implementations** for testing without dependencies
### **Documentation**

View File

@@ -103,13 +103,13 @@ aitbc ai-surveillance status
#### **Verification Commands:**
```bash
# Check user wallet on aitbc server
ssh aitbc-cascade "cat /opt/aitbc/.aitbc/wallets/newuser.json | jq '.balance'"
ssh aitbc "cat /opt/aitbc/.aitbc/wallets/newuser.json | jq '.balance'"
# View transaction details
ssh aitbc-cascade "cat /opt/aitbc/.aitbc/wallets/newuser.json | jq '.transactions[-1]'"
ssh aitbc "cat /opt/aitbc/.aitbc/wallets/newuser.json | jq '.transactions[-1]'"
# View gift certificate
ssh aitbc-cascade "cat /opt/aitbc/GIFT_CERTIFICATE_newuser.md"
ssh aitbc "cat /opt/aitbc/GIFT_CERTIFICATE_newuser.md"
```
### 🎉 **Success Metrics:**

View File

@@ -8,19 +8,19 @@
systemctl status aitbc-coordinator --no-pager
# Start service
sudo systemctl start aitbc-coordinator
systemctl start aitbc-coordinator
# Stop service
sudo systemctl stop aitbc-coordinator
systemctl stop aitbc-coordinator
# Restart service
sudo systemctl restart aitbc-coordinator
systemctl restart aitbc-coordinator
# Enable service (start on boot)
sudo systemctl enable aitbc-coordinator
systemctl enable aitbc-coordinator
# Disable service
sudo systemctl disable aitbc-coordinator
systemctl disable aitbc-coordinator
```
### **Log Management with journalctl**
@@ -142,7 +142,7 @@ systemctl status aitbc-coordinator --no-pager
sudo journalctl -u aitbc-coordinator --since "1 hour ago" --no-pager | tail -10
# Service restart (if needed)
sudo systemctl restart aitbc-coordinator
systemctl restart aitbc-coordinator
sleep 5
systemctl status aitbc-coordinator --no-pager
@@ -162,7 +162,7 @@ sudo journalctl -u aitbc-coordinator --since "10 minutes ago" --no-pager
sudo journalctl -u aitbc-coordinator -p err --since "1 hour ago" --no-pager
# 4. Restart service if needed
sudo systemctl restart aitbc-coordinator
systemctl restart aitbc-coordinator
# 5. Verify functionality
curl -s http://localhost:8000/health