refactor: remove duplicate node setup template and empty templates directory
Node Setup Template Cleanup - Complete: ✅ DUPLICATE TEMPLATE REMOVED: Cleaned up redundant node setup template - templates/node_setup_template.sh: Removed (duplicate of existing functionality) - templates/ directory: Removed (empty after cleanup) - Root cause: Template was outdated and less functional than working scripts ✅ DUPLICATION ANALYSIS COMPLETED: 📋 templates/node_setup_template.sh: Basic 45-line template with limited functionality 📁 scripts/deployment/provision_node.sh: Working 33-line node provisioning script 📁 scripts/workflow/03_follower_node_setup.sh: Advanced 58-line follower setup 📁 scripts/workflow-openclaw/03_follower_node_setup_openclaw.sh: Comprehensive 214-line OpenClaw setup ✅ WORKING SCRIPTS PRESERVED: 🔧 scripts/deployment/provision_node.sh: Node provisioning with basic functionality 🔧 scripts/workflow/03_follower_node_setup.sh: Advanced follower node setup 🔧 scripts/workflow-openclaw/03_follower_node_setup_openclaw.sh: OpenClaw agent-based setup 📖 Documentation: References to genesis templates (different concept) preserved ✅ TEMPLATE FUNCTIONALITY ANALYSIS: ❌ Removed: Basic git clone, venv setup, generic configuration ✅ Preserved: Advanced follower-specific configuration, OpenClaw integration ✅ Preserved: Better error handling, existing venv usage, sophisticated setup ✅ Preserved: Multi-node coordination and agent-based deployment ✅ CLEANUP BENEFITS: ✅ No Duplication: Single source of truth for node setup ✅ Better Functionality: Preserved more advanced and working scripts ✅ Cleaner Structure: Removed empty templates directory ✅ Clear Choices: Developers use working scripts instead of outdated template ✅ PRESERVED DOCUMENTATION REFERENCES: 📚 docs/beginner/02_project/2_roadmap.md: References to config templates (different concept) 📚 docs/expert/01_issues/09_multichain_cli_tool_implementation.md: Genesis block templates 🎯 Context: These are configuration templates, not node setup templates 📝 Impact: No functional impact on documentation RESULT: Successfully removed duplicate node setup template and empty templates directory while preserving all working node setup scripts and documentation references to different template concepts.
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
#!/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!"
|
||||
Reference in New Issue
Block a user