Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 16s
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
CLI Tests / test-cli (push) Successful in 13s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
Deploy to Testnet / deploy-testnet (push) Successful in 1m7s
Documentation Validation / validate-docs (push) Successful in 8s
Documentation Validation / validate-policies-strict (push) Successful in 14s
Integration Tests / test-service-integration (push) Successful in 2m42s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 10s
Multi-Node Stress Testing / stress-test (push) Successful in 8s
Node Failover Simulation / failover-test (push) Failing after 6s
P2P Network Verification / p2p-verification (push) Successful in 7s
Deploy to Testnet / notify-deployment (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 1m5s
Package Tests / Python package - aitbc-core (push) Successful in 58s
Package Tests / Python package - aitbc-crypto (push) Successful in 36s
Package Tests / Python package - aitbc-sdk (push) Successful in 30s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 28s
Package Tests / JavaScript package - aitbc-token (push) Successful in 23s
Production Tests / Production Integration Tests (push) Failing after 1m7s
Staking Tests / test-staking-service (push) Failing after 3s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
- Replace hardcoded IPs in deploy-to-server.sh with AITBC_DEPLOY_SERVER - Replace hardcoded IPs in deploy-to-container.sh with AITBC_CONTAINER_IP - Replace hardcoded IPs in deploy-explorer.sh with AITBC_DEPLOY_SERVER - Replace hardcoded IPs in deploy-exchange.sh with AITBC_DEPLOY_SERVER - Replace hardcoded IPs in container-deploy.py with AITBC_CONTAINER_IP - Replace hardcoded IPs in deploy_gpu_to_container.py with AITBC_CONTAINER_IP - Replace hardcoded IPs in deploy_container_with_miner.py with AITBC_CONTAINER_IP - Default to localhost if env vars not set - Addresses report item #4 (hardcoded IPs in deployment scripts)
75 lines
2.0 KiB
Bash
Executable File
75 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Deploy AITBC Trade Exchange to the server
|
|
|
|
set -e
|
|
|
|
SERVER="${AITBC_DEPLOY_SERVER:-root@127.0.0.1}"
|
|
EXCHANGE_DIR="/root/aitbc/apps/trade-exchange"
|
|
|
|
echo "🚀 Deploying AITBC Trade Exchange"
|
|
echo "=================================="
|
|
echo "Server: $SERVER"
|
|
echo ""
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
print_status() {
|
|
echo -e "${GREEN}[INFO]${NC} $1"
|
|
}
|
|
|
|
print_warning() {
|
|
echo -e "${YELLOW}[WARN]${NC} $1"
|
|
}
|
|
|
|
# Test SSH connection
|
|
print_status "Testing SSH connection..."
|
|
ssh $SERVER "hostname && ip a show eth0 | grep inet"
|
|
|
|
# Copy updated files
|
|
print_status "Copying updated Exchange files..."
|
|
scp /home/oib/windsurf/aitbc/apps/trade-exchange/index.html $SERVER:$EXCHANGE_DIR/
|
|
scp /home/oib/windsurf/aitbc/apps/trade-exchange/server.py $SERVER:$EXCHANGE_DIR/
|
|
|
|
# Ensure assets are available
|
|
print_status "Ensuring assets directory exists..."
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets"
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/css"
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/js"
|
|
|
|
# Copy assets if they don't exist
|
|
print_status "Copying assets if needed..."
|
|
if ! ssh $SERVER "test -f /var/www/aitbc.bubuit.net/assets/css/aitbc.css"; then
|
|
scp -r /home/oib/windsurf/aitbc/assets/* $SERVER:/var/www/aitbc.bubuit.net/assets/
|
|
fi
|
|
|
|
# Restart the exchange service
|
|
print_status "Restarting Trade Exchange service..."
|
|
ssh $SERVER "systemctl restart aitbc-exchange"
|
|
|
|
# Wait for service to start
|
|
print_status "Waiting for service to start..."
|
|
sleep 5
|
|
|
|
# Check service status
|
|
print_status "Checking service status..."
|
|
ssh $SERVER "systemctl status aitbc-exchange --no-pager -l | head -10"
|
|
|
|
# Test the endpoint
|
|
print_status "Testing Exchange endpoint..."
|
|
ssh $SERVER "curl -s http://127.0.0.1:3002/ | head -c 100"
|
|
echo ""
|
|
|
|
echo ""
|
|
print_status "✅ Exchange deployment complete!"
|
|
echo ""
|
|
echo "📋 URLs:"
|
|
echo " 🌐 IP: http://10.1.223.93/Exchange"
|
|
echo " 🔒 Domain: https://aitbc.bubuit.net/Exchange"
|
|
echo ""
|
|
echo "🔍 To check logs:"
|
|
echo " ssh $SERVER 'journalctl -u aitbc-exchange -f'"
|