Files
aitbc/templates/node_setup_template.sh
aitbc1 8251853cbd
All checks were successful
Integration Tests / test-service-integration (push) Successful in 49s
Python Tests / test-python (push) Successful in 58s
Security Scanning / security-scan (push) Successful in 52s
feat: add marketplace and AI services RPC endpoints
📋 Marketplace Endpoints:
• GET /marketplace/listings - List all active marketplace items
• POST /marketplace/create - Create new marketplace listing
• Demo listings for GPU and compute resources
• In-memory storage with active status filtering

🤖 AI Services Endpoints:
• POST /ai/submit - Submit AI jobs with payment
• GET /ai/stats - AI service statistics and revenue tracking
• Support for text, image, and training job types
2026-03-29 17:15:54 +02:00

45 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# AITBC Node Setup Template
# Usage: ./node_setup_template.sh <node-name> <role> <genesis-authority>
NODE_NAME=$1
ROLE=$2
GENESIS_AUTHORITY=$3
echo "Setting up AITBC node: $NODE_NAME"
echo "Role: $ROLE"
echo "Genesis Authority: $GENESIS_AUTHORITY"
# Install dependencies
apt update && apt install -y python3 python3-venv redis-server
# Setup directories
mkdir -p /var/lib/aitbc/{data,keystore,logs}
mkdir -p /etc/aitbc
# Copy configuration from genesis authority
scp $GENESIS_AUTHORITY:/etc/aitbc/blockchain.env /etc/aitbc/
# Pull code
cd /opt/aitbc
git clone http://gitea.bubuit.net:oib/aitbc.git
cd aitbc
# Setup virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Configure node role
if [ "$ROLE" = "follower" ]; then
sed -i 's/enable_block_production=true/enable_block_production=false/g' /etc/aitbc/blockchain.env
sed -i "s/proposer_id=.*/proposer_id=follower-node-$NODE_NAME/g" /etc/aitbc/blockchain.env
fi
# Setup systemd services
cp systemd/*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable aitbc-blockchain-node aitbc-blockchain-rpc
echo "Node $NODE_NAME setup complete!"