Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
This commit is contained in:
69
scripts/integration/setup-firefly-cacti.sh
Executable file
69
scripts/integration/setup-firefly-cacti.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Setup Firefly-Cacti Integration
|
||||
# This script sets up the integration between Firefly and Cacti
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../lib/init.sh"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
||||
# Configuration
|
||||
FIREFLY_NAMESPACE="${FIREFLY_NAMESPACE:-firefly}"
|
||||
CACTI_NAMESPACE="${CACTI_NAMESPACE:-cacti}"
|
||||
FIREFLY_API_URL="${FIREFLY_API_URL:-http://firefly-api.firefly.svc.cluster.local:5000}"
|
||||
CACTUS_API_URL="${CACTUS_API_URL:-http://cactus-api.cacti.svc.cluster.local:4000}"
|
||||
|
||||
|
||||
log_success "Setting up Firefly-Cacti Integration..."
|
||||
|
||||
# Check prerequisites
|
||||
if ! command -v kubectl &> /dev/null; then
|
||||
log_error "Error: kubectl not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Apply integration configuration
|
||||
log_warn "Applying integration configuration..."
|
||||
kubectl apply -f "$PROJECT_ROOT/connectors/firefly-cacti/integration.yaml"
|
||||
|
||||
# Wait for Firefly to be ready
|
||||
log_warn "Waiting for Firefly to be ready..."
|
||||
kubectl wait --for=condition=ready pod -l app=firefly-core -n "$FIREFLY_NAMESPACE" --timeout=300s
|
||||
|
||||
# Wait for Cacti to be ready
|
||||
log_warn "Waiting for Cacti to be ready..."
|
||||
kubectl wait --for=condition=ready pod -l app=cactus-api -n "$CACTI_NAMESPACE" --timeout=300s
|
||||
|
||||
# Register Besu ledger with Cacti
|
||||
log_warn "Registering Besu ledger with Cacti..."
|
||||
curl -X POST "$CACTUS_API_URL/api/v1/plugins/ledger-connector/besu" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"ledgerId": "besu-chain-138",
|
||||
"chainId": 138,
|
||||
"rpc": {
|
||||
"http": "http://besu-rpc-service.besu-network.svc.cluster.local:8545",
|
||||
"ws": "ws://besu-rpc-service.besu-network.svc.cluster.local:8546"
|
||||
}
|
||||
}' || log_warn "Note: Cacti API may not be accessible from this context"
|
||||
|
||||
# Register Besu network with Firefly
|
||||
log_warn "Registering Besu network with Firefly..."
|
||||
curl -X POST "$FIREFLY_API_URL/api/v1/networks" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"name": "besu-chain-138",
|
||||
"type": "ethereum",
|
||||
"chainId": 138,
|
||||
"rpc": {
|
||||
"http": "http://besu-rpc-service.besu-network.svc.cluster.local:8545",
|
||||
"ws": "ws://besu-rpc-service.besu-network.svc.cluster.local:8546"
|
||||
}
|
||||
}' || log_warn "Note: Firefly API may not be accessible from this context"
|
||||
|
||||
log_success "Firefly-Cacti integration setup complete!"
|
||||
log_warn "Firefly API: $FIREFLY_API_URL"
|
||||
log_warn "Cactus API: $CACTUS_API_URL"
|
||||
|
||||
79
scripts/integration/test-connectors.sh
Executable file
79
scripts/integration/test-connectors.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Test Connectors
|
||||
# This script tests the Besu-Firefly, Besu-Cacti, and Firefly-Cacti connectors
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../lib/init.sh"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
||||
# Configuration
|
||||
BESU_RPC_URL="${BESU_RPC_URL:-http://besu-rpc-service.besu-network.svc.cluster.local:8545}"
|
||||
FIREFLY_API_URL="${FIREFLY_API_URL:-http://firefly-api.firefly.svc.cluster.local:5000}"
|
||||
CACTUS_API_URL="${CACTUS_API_URL:-http://cactus-api.cacti.svc.cluster.local:4000}"
|
||||
|
||||
|
||||
log_success "Testing Connectors..."
|
||||
|
||||
# Test Besu connection
|
||||
log_warn "Testing Besu connection..."
|
||||
if curl -s -X POST "$BESU_RPC_URL" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' | grep -q "0x8a"; then
|
||||
log_success "✅ Besu connection successful"
|
||||
else
|
||||
log_error "❌ Besu connection failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test Firefly connection
|
||||
log_warn "Testing Firefly connection..."
|
||||
if curl -s "$FIREFLY_API_URL/api/v1/status" | grep -q "ready"; then
|
||||
log_success "✅ Firefly connection successful"
|
||||
else
|
||||
log_warn "⚠️ Firefly connection failed (may not be deployed)"
|
||||
fi
|
||||
|
||||
# Test Cacti connection
|
||||
log_warn "Testing Cacti connection..."
|
||||
if curl -s "$CACTUS_API_URL/api/v1/api-server/healthcheck" | grep -q "status"; then
|
||||
log_success "✅ Cacti connection successful"
|
||||
else
|
||||
log_warn "⚠️ Cacti connection failed (may not be deployed)"
|
||||
fi
|
||||
|
||||
# Test Python connectors
|
||||
log_warn "Testing Python connectors..."
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# Test Besu-Firefly connector
|
||||
if python3 -c "
|
||||
import sys
|
||||
sys.path.insert(0, 'connectors/besu-firefly')
|
||||
from connector import BesuFireflyConnector
|
||||
connector = BesuFireflyConnector('$BESU_RPC_URL', '$FIREFLY_API_URL', '')
|
||||
status = connector.get_besu_status()
|
||||
print('Besu status:', status)
|
||||
" 2>/dev/null; then
|
||||
log_success "✅ Besu-Firefly connector test successful"
|
||||
else
|
||||
log_warn "⚠️ Besu-Firefly connector test failed (dependencies may be missing)"
|
||||
fi
|
||||
|
||||
# Test Besu-Cacti connector
|
||||
if python3 -c "
|
||||
import sys
|
||||
sys.path.insert(0, 'connectors/besu-cacti')
|
||||
from connector import BesuCactiConnector
|
||||
connector = BesuCactiConnector('$BESU_RPC_URL', '$CACTUS_API_URL')
|
||||
print('Besu-Cacti connector initialized')
|
||||
" 2>/dev/null; then
|
||||
log_success "✅ Besu-Cacti connector test successful"
|
||||
else
|
||||
log_warn "⚠️ Besu-Cacti connector test failed (dependencies may be missing)"
|
||||
fi
|
||||
|
||||
log_success "Connector tests complete!"
|
||||
|
||||
Reference in New Issue
Block a user