4.1 KiB
4.1 KiB
Scripts Created - Implementation Summary
✅ Core Scripts Implemented
1. scripts/network/bootstrap-network.sh
Purpose: Network bootstrap using script-based approach (static-nodes.json)
Functionality:
- Collects enodes from all validator nodes
- Generates static-nodes.json with validator enodes
- Deploys static-nodes.json to all nodes (validators, sentries, RPC)
- Restarts services in correct order (sentries → validators → RPC)
- Verifies peer connections
Usage:
./scripts/network/bootstrap-network.sh
Key Features:
- Extracts enodes via RPC (if enabled) or from nodekey
- Sequential startup with health checks
- Peer connection verification
- Error handling and logging
2. scripts/validation/validate-validator-set.sh
Purpose: Validate that all validators are properly configured and can participate in consensus
Functionality:
- Validates container and service status
- Checks validator keys exist and are accessible
- Verifies validator addresses
- Checks Besu configuration files
- Validates consensus participation
- Checks peer connectivity
Usage:
./scripts/validation/validate-validator-set.sh
Key Features:
- 4-phase validation (Container/Service → Keys → Config → Consensus)
- Detailed error and warning reporting
- Exit codes for automation (0=success, 1=errors)
3. scripts/deployment/deploy-validated-set.sh
Purpose: Main deployment orchestrator - end-to-end validated set deployment
Functionality:
- Pre-deployment validation (prerequisites, OS template)
- Deploy containers (via deploy-besu-nodes.sh)
- Copy configuration files (via copy-besu-config.sh)
- Bootstrap network (via bootstrap-network.sh)
- Validate deployment (via validate-validator-set.sh)
Usage:
# Full deployment
./scripts/deployment/deploy-validated-set.sh --source-project /path/to/smom-dbis-138
# Skip phases if already done
./scripts/deployment/deploy-validated-set.sh --skip-deployment --source-project /path/to/smom-dbis-138
./scripts/deployment/deploy-validated-set.sh --skip-deployment --skip-config
Options:
--skip-deployment- Skip container deployment (assume containers exist)--skip-config- Skip configuration file copying--skip-bootstrap- Skip network bootstrap--skip-validation- Skip validation--source-project PATH- Path to source project with config files--help- Show help message
Key Features:
- Single command deployment
- Phase-based with skip options
- Comprehensive logging
- Rollback support (if configured)
- Error handling at each phase
Integration with Existing Scripts
These new scripts integrate with existing deployment infrastructure:
- Uses
lib/common.shfor logging and utilities - Calls
deploy-besu-nodes.shfor container deployment - Calls
copy-besu-config.shfor configuration management - Uses existing configuration files (
config/proxmox.conf,config/network.conf) - Compatible with rollback mechanism (
lib/rollback.sh)
Usage Examples
Complete Fresh Deployment
cd /opt/smom-dbis-138-proxmox
sudo ./scripts/deployment/deploy-validated-set.sh \
--source-project /path/to/smom-dbis-138
Bootstrap Existing Containers
# Containers already deployed, just need to bootstrap
sudo ./scripts/deployment/deploy-validated-set.sh \
--skip-deployment \
--source-project /path/to/smom-dbis-138
Just Bootstrap Network
# Containers and configs already done, just bootstrap
sudo ./scripts/network/bootstrap-network.sh
Validate Validator Set
# Just validate validators
sudo ./scripts/validation/validate-validator-set.sh
Next Steps
- Test Scripts - Test on a development/test environment first
- Review Logs - Check deployment logs for any issues
- Fine-tune - Adjust timeouts, retries, or validation criteria as needed
- Document - Add to main documentation and runbooks
Status
✅ Core scripts implemented and ready for testing
All scripts follow the existing codebase patterns and use the common library functions.