Some checks failed
Documentation Validation / validate-docs (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Has been cancelled
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Has been cancelled
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
- Bump version from 1.0 to 2.0 in OPENCLAW_AITBC_MASTERY_PLAN.md - Add comprehensive workflow integration section with links to multi-node setup, operations, marketplace, and production workflows - Document multi-chain runtime support (ait-testnet, ait-devnet) with shared database and chain-aware RPC - Document hub/follower topology with island management and P2P network architecture - Add new
3.5 KiB
3.5 KiB
AITBC Production Environment
🏗️ Proper System Architecture
The AITBC production environment follows Linux Filesystem Hierarchy Standard (FHS) compliance:
📁 System Directory Structure
/etc/aitbc/ # Production configurations
├── .env # Production environment variables
├── blockchain.env # Blockchain service config
└── production/ # Production-specific configs
/opt/aitbc/services/ # Production service scripts
├── blockchain_http_launcher.py
├── blockchain_simple.py
├── marketplace.py
└── ... # Other service scripts
/var/lib/aitbc/ # Runtime data
├── data/ # Blockchain databases
│ ├── blockchain/ # Blockchain data
│ ├── coordinator/ # Coordinator database
│ └── marketplace/ # Marketplace data
├── keystore/ # Cryptographic keys (secure)
└── backups/ # Production backups
/var/log/aitbc/ # Production logs
├── production/ # Production service logs
├── blockchain/ # Blockchain service logs
└── coordinator/ # Coordinator logs
🚀 Launching Production Services
Services are launched via systemd:
# Start blockchain node
systemctl start aitbc-blockchain-node
# Start blockchain RPC
systemctl start aitbc-blockchain-rpc
# Start coordinator API
systemctl start aitbc-agent-coordinator
# Check status
systemctl status aitbc-blockchain-node
⚙️ Configuration Management
Production configurations are stored in /etc/aitbc/:
- Environment variables in
.env - Blockchain config in
blockchain.env - Service-specific configs in production subdirectory
📊 Monitoring and Logs
Production logs are centralized in /var/log/aitbc/:
- Each service has its own log directory
- Logs rotate automatically
- Real-time monitoring available
Coordinator observability endpoints:
- JSON metrics endpoint:
http://localhost:8000/v1/metrics - Prometheus metrics endpoint:
http://localhost:8000/metrics - Health endpoint:
http://localhost:8000/v1/health - Web dashboard source:
/opt/aitbc/website/dashboards/metrics.html
Current monitoring flow:
- FastAPI request middleware records request counts, error counts, response time, and cache stats
metrics.pycalculates live metric summaries and alert thresholds/v1/metricsreturns JSON for dashboard consumption/metricsremains available for Prometheus-style scraping- Alert delivery uses webhook dispatch when
AITBC_ALERT_WEBHOOK_URLis configured, otherwise alerts are logged locally
🔧 Maintenance
- Backups: Stored in
/var/lib/aitbc/backups/ - Updates: Update code in
/opt/aitbc/, restart services - Configuration: Edit files in
/etc/aitbc/
🛡️ Security
- All production files have proper permissions
- Keystore at
/var/lib/aitbc/keystore/(secure, permissions 700) - Environment variables are protected
- SSL certificates in
/etc/aitbc/production/certs/(if used)
📋 Architecture Status
The AITBC production environment follows FHS compliance:
- ✅ Configurations in
/etc/aitbc/ - ✅ Service scripts in
/opt/aitbc/services/ - ✅ Runtime data in
/var/lib/aitbc/ - ✅ Logs centralized in
/var/log/aitbc/ - ✅ Repository clean of runtime files
- ✅ Proper FHS compliance achieved