Files
aitbc/scripts/production_launcher.py
aitbc 214c1b65ec
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Package Tests / Python package - aitbc-agent-sdk (push) Has been cancelled
Package Tests / Python package - aitbc-core (push) Has been cancelled
Package Tests / Python package - aitbc-crypto (push) Has been cancelled
Package Tests / Python package - aitbc-sdk (push) Has been cancelled
Package Tests / JavaScript package - aitbc-sdk-js (push) Has been cancelled
Package Tests / JavaScript package - aitbc-token (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
Smart Contract Tests / test-foundry (push) Has been cancelled
Smart Contract Tests / lint-solidity (push) Has been cancelled
Smart Contract Tests / deploy-contracts (push) Has been cancelled
ci: migrate from requirements.txt to poetry.lock as source of truth
- Updated CI workflows to track poetry.lock instead of requirements.txt
- Removed check-requirements-sync.py step from python-tests.yml
- Updated dependency_scanner.py default from requirements.txt to pyproject.toml
- Replaced all print() with click.echo() in deploy_edge_node.py (CLI script)
- Replaced print() with logger.warning() in zk_cache.py
- Updated setup.py files to read dependencies from pyproject.toml via tomli
- Removed
2026-05-25 15:10:12 +02:00

53 lines
1.4 KiB
Python
Executable File

#!/usr/bin/env python3
"""
Production Services Launcher
Launches AITBC production services from system locations
"""
import os
import sys
import subprocess
import click
from pathlib import Path
def launch_service(service_name: str, script_path: str):
"""Launch a production service"""
click.echo(f"Launching {service_name}...")
# Ensure log directory exists
log_dir = Path(f"/var/log/aitbc/production/{service_name}")
log_dir.mkdir(parents=True, exist_ok=True)
# Launch service
try:
subprocess.run([
sys.executable,
str(Path("/opt/aitbc/services") / script_path)
], check=True)
except subprocess.CalledProcessError as e:
click.echo(f"Failed to launch {service_name}: {e}")
return False
except FileNotFoundError:
click.echo(f"Service script not found: {script_path}")
return False
return True
def main():
"""Main launcher"""
click.echo("=== AITBC Production Services Launcher ===")
services = [
("blockchain", "blockchain.py"),
("marketplace", "marketplace.py"),
("unified_marketplace", "unified_marketplace.py"),
]
for service_name, script_path in services:
if not launch_service(service_name, script_path):
click.echo(f"Skipping {service_name} due to error")
continue
if __name__ == "__main__":
main()