Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m7s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Successful in 5s
Multi-Node Stress Testing / stress-test (push) Successful in 4s
Node Failover Simulation / failover-test (push) Has started running
- Update project/infrastructure/PRODUCTION_ARCHITECTURE.md: coordinator URL 8000 → 8011 - Update project/3_infrastructure.md: coordinator URL 8000 → 8011 - Update project/aitbc.md: coordinator URL 8000 → 8011 - Update project/aitbc1.md: coordinator URL 8000 → 8011 - Update reference/16_security-audit-2026-02-13.md: coordinator URL 8000 → 8011 - Update blockchain/cross-chain/CROSS_CHAIN_TRADING_COMPLETE.md: coordinator port 8000 → 8011 - Update blockchain/cross-chain/CROSS_CHAIN_REPUTATION_FINAL_INTEGRATION.md: coordinator URL 8000 → 8011 - Update blockchain/cross-chain/CROSS_CHAIN_REPUTATION_STAGING_DEPLOYMENT.md: coordinator URL 8000 → 8011 - Update backend/documented_AITBC_Port_Logic_Implementation_-_Implementation_C.md: coordinator port 8000 → 8011 - Update architecture/1_system-flow.md: coordinator URL 8000 → 8011 - Update architecture/3_coordinator-api.md: API port 8000 → 8011 - Update architecture/5_marketplace-web.md: API URL 18000 → 8011 - Update testing/test-integration-completed.md: coordinator URL 8000 → 8011 - Update infrastructure/migration/microservices-migration-status.md: coordinator URL 8000 → 8011 - Coordinator API is now on port 8011 (not 8000)
102 lines
3.5 KiB
Markdown
102 lines
3.5 KiB
Markdown
# 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:
|
|
|
|
```bash
|
|
# 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:8011/v1/metrics`
|
|
- Prometheus metrics endpoint: `http://localhost:8011/metrics`
|
|
- Health endpoint: `http://localhost:8011/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.py` calculates live metric summaries and alert thresholds
|
|
- `/v1/metrics` returns JSON for dashboard consumption
|
|
- `/metrics` remains available for Prometheus-style scraping
|
|
- Alert delivery uses webhook dispatch when `AITBC_ALERT_WEBHOOK_URL` is 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
|