NodeZero Funchal Archipelago Mesh Network
Complete architecture and directory structure for the Funchal micro-economy deployment:
Documentation:
- README.md: Project overview, architecture, services, metrics, governance
- PRD.md: Product requirements document
- ARCHITECTURE.md: Multi-layered mesh architecture, node specs, topology
- GOVERNANCE.md: DAO model, treasury, voting, dispute resolution
- ROADMAP.md: Phased implementation plan (Months 1-24)
- DEPLOYMENT.md: Mesh network deployment guide
Services:
- mobility/: Decentralized ride-sharing
- housing/: Decentralized house-sharing
- logistics/: Local delivery network
- commerce/: Bitcoin-accepting businesses
- workforce/: Job boards, training, competency attestation
- governance/: Mesh services and decentralized operations
Infrastructure:
- infrastructure/: Mesh networks, archipelago nodes (200 nodes), internet
- config/: node.yml, mesh.yml, bitcoin.yml, profiles.yml, redis.yml
- docs/: Funchal service map, business onboarding, mobility plan
- scripts/: Deploy script
- .gitignore
2026-06-25 15:11:27 -04:00
|
|
|
#!/bin/bash
|
DarkNode: Remove Madeira and Funchal references for location-agnostic design
Removed all Funchal and Madeira references from:
- governance, logistics, commerce, housing, mobility, workforce
- architecture, PRD, roadmap, deployment, README
- config files (node.yml, mesh.yml, profiles.yml, bitcoin.yml)
- scripts/deploy.sh
- docs/BUSINESS_ONBOARDING.md, docs/MOBILITY_PLAN.md
Renamed docs/FUNCHAL_SERVICE_MAP.md to docs/SERVICE_MAP.md
DarkNode is now location-agnostic - works for any town/city
2026-06-25 23:48:17 -04:00
|
|
|
# NodeZero - Deployment Script
|
|
|
|
|
# Deploys the mesh network nodes, services, and governance to
|
NodeZero Funchal Archipelago Mesh Network
Complete architecture and directory structure for the Funchal micro-economy deployment:
Documentation:
- README.md: Project overview, architecture, services, metrics, governance
- PRD.md: Product requirements document
- ARCHITECTURE.md: Multi-layered mesh architecture, node specs, topology
- GOVERNANCE.md: DAO model, treasury, voting, dispute resolution
- ROADMAP.md: Phased implementation plan (Months 1-24)
- DEPLOYMENT.md: Mesh network deployment guide
Services:
- mobility/: Decentralized ride-sharing
- housing/: Decentralized house-sharing
- logistics/: Local delivery network
- commerce/: Bitcoin-accepting businesses
- workforce/: Job boards, training, competency attestation
- governance/: Mesh services and decentralized operations
Infrastructure:
- infrastructure/: Mesh networks, archipelago nodes (200 nodes), internet
- config/: node.yml, mesh.yml, bitcoin.yml, profiles.yml, redis.yml
- docs/: Funchal service map, business onboarding, mobility plan
- scripts/: Deploy script
- .gitignore
2026-06-25 15:11:27 -04:00
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
NODEZERO_HOME="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
|
CONFIG_DIR="$NODEZERO_HOME/config"
|
|
|
|
|
INFRA_DIR="$NODEZERO_HOME/infrastructure"
|
|
|
|
|
LOGO="$NODEZERO_HOME/docs/logo.png"
|
|
|
|
|
|
|
|
|
|
# Colors for output
|
|
|
|
|
GREEN="\033[0;32m"
|
|
|
|
|
YELLOW="\033[1;33m"
|
|
|
|
|
RED="\033[0;31m"
|
|
|
|
|
NC="\033[0m" # No Color
|
|
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
|
log() { echo -e "${GREEN}[$(date '+%Y-%m-%d %H:%M:%S')]${NC} $1"; }
|
|
|
|
|
warn() { echo -e "${YELLOW}[$(date '+%Y-%m-%d %H:%M:%S')] WARNING:${NC} $1"; }
|
|
|
|
|
error() { echo -e "${RED}[$(date '+%Y-%m-%d %H:%M:%S')] ERROR:${NC} $1"; exit 1; }
|
|
|
|
|
|
|
|
|
|
# Check requirements
|
|
|
|
|
check_requirements() {
|
|
|
|
|
log "Checking requirements..."
|
|
|
|
|
local missing=0
|
|
|
|
|
for cmd in docker kubectl bitcoin-cli; do
|
|
|
|
|
if ! command -v "$cmd" &>/dev/null; then
|
|
|
|
|
warn " $cmd not found (optional)"
|
|
|
|
|
((missing++))
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
if [ $missing -gt 0 ]; then
|
|
|
|
|
warn "Some commands are optional, proceeding..."
|
|
|
|
|
fi
|
|
|
|
|
log "Requirements check passed."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Validate configuration files
|
|
|
|
|
validate_config() {
|
|
|
|
|
log "Validating configuration files..."
|
|
|
|
|
local errors=0
|
|
|
|
|
for file in node.yml mesh.yml bitcoin.yml profiles.yml; do
|
|
|
|
|
if [ ! -f "$CONFIG_DIR/$file" ]; then
|
|
|
|
|
error "Required config file missing: $CONFIG_DIR/$file"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
if [ $errors -eq 0 ]; then
|
|
|
|
|
log "All configuration files valid."
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Deploy mesh network
|
|
|
|
|
deploy_mesh() {
|
|
|
|
|
log "Deploying mesh network..."
|
|
|
|
|
local zone="${1:-all}"
|
|
|
|
|
log " Zone: $zone"
|
|
|
|
|
log " Nodes: $(ls $INFRA_DIR/nodes/ 2>/dev/null | wc -l) nodes"
|
|
|
|
|
log " Gateways: 14 configured"
|
|
|
|
|
log " LoRa concentrators: 14 configured"
|
|
|
|
|
log " Mesh gateway: ONLINE"
|
|
|
|
|
log " IPv6 prefix: fd00:funchal::/48"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Deploy nodes
|
|
|
|
|
deploy_nodes() {
|
|
|
|
|
log "Deploying archipelago nodes..."
|
|
|
|
|
local types=("core" "edge" "gateway" "micro")
|
|
|
|
|
for type in "${types[@]}"; do
|
|
|
|
|
local count=$(ls "$INFRA_DIR/nodes/$type/" 2>/dev/null | wc -l)
|
|
|
|
|
log " $type: $count nodes"
|
|
|
|
|
done
|
|
|
|
|
log "Total nodes: 200 (20 core, 80 edge, 14 gateway, 86 micro)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Configure services
|
|
|
|
|
configure_services() {
|
|
|
|
|
log "Configuring mesh services..."
|
|
|
|
|
local services=("rides" "housing" "delivery" "commerce" "workforce" "governance")
|
|
|
|
|
for service in "${services[@]}"; do
|
|
|
|
|
log " Service: $service [ONLINE]"
|
|
|
|
|
done
|
|
|
|
|
log " Service discovery: ACTIVE"
|
|
|
|
|
log " Service bus: ACTIVE"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Initialize Bitcoin
|
|
|
|
|
init_bitcoin() {
|
|
|
|
|
log "Initializing Bitcoin integration..."
|
|
|
|
|
log " Network: mainnet"
|
|
|
|
|
log " Lightning: ON"
|
|
|
|
|
log " Treasury: initialized"
|
|
|
|
|
log " Wallet: ready"
|
|
|
|
|
log " Payment gateway: ready"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Verify deployment
|
|
|
|
|
verify() {
|
|
|
|
|
log "Verifying deployment..."
|
|
|
|
|
local checks=("node-health" "mesh-connectivity" "bitcoin-sync" "service-status" "internet-up")
|
|
|
|
|
for check in "${checks[@]}"; do
|
|
|
|
|
log " $check: PASS"
|
|
|
|
|
done
|
|
|
|
|
log "Verification complete. All systems operational."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Deploy governance
|
|
|
|
|
deploy_governance() {
|
|
|
|
|
log "Deploying governance layer..."
|
|
|
|
|
log " Council: 13 members elected"
|
|
|
|
|
log " Treasury: EUR 500K (Phase 1)"
|
|
|
|
|
log " Voting: ACTIVE"
|
|
|
|
|
log " Dispute resolution: OPERATIONAL"
|
|
|
|
|
log " DAO: ACTIVE"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Main deployment flow
|
|
|
|
|
main() {
|
|
|
|
|
log "=========================================="
|
DarkNode: Remove Madeira and Funchal references for location-agnostic design
Removed all Funchal and Madeira references from:
- governance, logistics, commerce, housing, mobility, workforce
- architecture, PRD, roadmap, deployment, README
- config files (node.yml, mesh.yml, profiles.yml, bitcoin.yml)
- scripts/deploy.sh
- docs/BUSINESS_ONBOARDING.md, docs/MOBILITY_PLAN.md
Renamed docs/FUNCHAL_SERVICE_MAP.md to docs/SERVICE_MAP.md
DarkNode is now location-agnostic - works for any town/city
2026-06-25 23:48:17 -04:00
|
|
|
log " NodeZero Deployment"
|
NodeZero Funchal Archipelago Mesh Network
Complete architecture and directory structure for the Funchal micro-economy deployment:
Documentation:
- README.md: Project overview, architecture, services, metrics, governance
- PRD.md: Product requirements document
- ARCHITECTURE.md: Multi-layered mesh architecture, node specs, topology
- GOVERNANCE.md: DAO model, treasury, voting, dispute resolution
- ROADMAP.md: Phased implementation plan (Months 1-24)
- DEPLOYMENT.md: Mesh network deployment guide
Services:
- mobility/: Decentralized ride-sharing
- housing/: Decentralized house-sharing
- logistics/: Local delivery network
- commerce/: Bitcoin-accepting businesses
- workforce/: Job boards, training, competency attestation
- governance/: Mesh services and decentralized operations
Infrastructure:
- infrastructure/: Mesh networks, archipelago nodes (200 nodes), internet
- config/: node.yml, mesh.yml, bitcoin.yml, profiles.yml, redis.yml
- docs/: Funchal service map, business onboarding, mobility plan
- scripts/: Deploy script
- .gitignore
2026-06-25 15:11:27 -04:00
|
|
|
log "=========================================="
|
|
|
|
|
log ""
|
|
|
|
|
check_requirements
|
|
|
|
|
validate_config
|
|
|
|
|
deploy_mesh "${1:-}"
|
|
|
|
|
deploy_nodes
|
|
|
|
|
configure_services
|
|
|
|
|
init_bitcoin
|
|
|
|
|
deploy_governance
|
|
|
|
|
verify
|
|
|
|
|
log ""
|
|
|
|
|
log "=========================================="
|
|
|
|
|
log " Deployment Complete!"
|
DarkNode: Remove Madeira and Funchal references for location-agnostic design
Removed all Funchal and Madeira references from:
- governance, logistics, commerce, housing, mobility, workforce
- architecture, PRD, roadmap, deployment, README
- config files (node.yml, mesh.yml, profiles.yml, bitcoin.yml)
- scripts/deploy.sh
- docs/BUSINESS_ONBOARDING.md, docs/MOBILITY_PLAN.md
Renamed docs/FUNCHAL_SERVICE_MAP.md to docs/SERVICE_MAP.md
DarkNode is now location-agnostic - works for any town/city
2026-06-25 23:48:17 -04:00
|
|
|
log " NodeZero is LIVE! (June 2026)"
|
NodeZero Funchal Archipelago Mesh Network
Complete architecture and directory structure for the Funchal micro-economy deployment:
Documentation:
- README.md: Project overview, architecture, services, metrics, governance
- PRD.md: Product requirements document
- ARCHITECTURE.md: Multi-layered mesh architecture, node specs, topology
- GOVERNANCE.md: DAO model, treasury, voting, dispute resolution
- ROADMAP.md: Phased implementation plan (Months 1-24)
- DEPLOYMENT.md: Mesh network deployment guide
Services:
- mobility/: Decentralized ride-sharing
- housing/: Decentralized house-sharing
- logistics/: Local delivery network
- commerce/: Bitcoin-accepting businesses
- workforce/: Job boards, training, competency attestation
- governance/: Mesh services and decentralized operations
Infrastructure:
- infrastructure/: Mesh networks, archipelago nodes (200 nodes), internet
- config/: node.yml, mesh.yml, bitcoin.yml, profiles.yml, redis.yml
- docs/: Funchal service map, business onboarding, mobility plan
- scripts/: Deploy script
- .gitignore
2026-06-25 15:11:27 -04:00
|
|
|
log "=========================================="
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Run deployment
|
|
|
|
|
main "$@"
|