Files
defiQUG 1fb7266469 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.
2025-12-12 14:57:48 -08:00

147 lines
3.2 KiB
Markdown

# VM Deployment Scripts
This directory contains scripts for deploying and managing Besu nodes on Azure Virtual Machines (VMs) or Virtual Machine Scale Sets (VMSS).
## Scripts
### Deployment Scripts
- **`deploy-vm-network.sh`** - Deploy Besu network on VMs using Terraform
- **`setup-vm.sh`** - Setup individual VM with Docker and Besu
- **`setup-cloud-init.sh`** - Generate cloud-init configuration
### Management Scripts
- **`monitor-vm.sh`** - Monitor all VMs and Besu containers
- **`update-vm-config.sh`** - Update Besu configuration on a VM
- **`get-vm-ips.sh`** - Get IP addresses of all VMs
- **`scale-vmss.sh`** - Scale VM Scale Set up or down
### Validation Scripts
- **`validate-vm-deployment.sh`** - Validate VM deployment
- **`health-check-vm.sh`** - Health check for VM-based Besu nodes
- **`run-all-checks.sh`** - Run all validation and health checks
### Backup/Restore Scripts
- **`backup-vm.sh`** - Backup Besu data from a VM
- **`restore-vm.sh`** - Restore Besu data to a VM
## Usage
### Deploy Network
```bash
./scripts/vm-deployment/deploy-vm-network.sh
```
### Setup Individual VM
```bash
./scripts/vm-deployment/setup-vm.sh validator 0
```
### Monitor VMs
```bash
./scripts/vm-deployment/monitor-vm.sh
```
### Validate Deployment
```bash
./scripts/vm-deployment/validate-vm-deployment.sh
```
### Health Check
```bash
./scripts/vm-deployment/health-check-vm.sh
```
### Get VM IPs
```bash
./scripts/vm-deployment/get-vm-ips.sh
```
### Scale VMSS
```bash
./scripts/vm-deployment/scale-vmss.sh besu-rpc-vmss 5
```
### Backup VM
```bash
./scripts/vm-deployment/backup-vm.sh <vm-ip>
```
### Restore VM
```bash
./scripts/vm-deployment/restore-vm.sh <vm-ip> <backup-file>
```
### Run All Checks
```bash
./scripts/vm-deployment/run-all-checks.sh
```
## Environment Variables
Most scripts support the following environment variables:
- `RESOURCE_GROUP` - Azure resource group name (default: `defi-oracle-mainnet-rg`)
- `CLUSTER_NAME` - Cluster name (default: `defi-oracle-aks`)
- `KEY_VAULT_NAME` - Key Vault name (default: `defi-oracle-kv`)
- `VALIDATOR_COUNT` - Number of validators (default: `2`)
- `SENTRY_COUNT` - Number of sentries (default: `2`)
- `RPC_COUNT` - Number of RPC nodes (default: `2`)
## Prerequisites
- Azure CLI installed and configured
- SSH key pair for VM access
- Terraform >= 1.0 (for deployment scripts)
- `jq` for JSON parsing
- `curl` for HTTP requests
## Examples
### Deploy Network
```bash
export RESOURCE_GROUP="defi-oracle-mainnet-rg"
export SSH_PUBLIC_KEY=$(cat ~/.ssh/id_rsa.pub)
./scripts/vm-deployment/deploy-vm-network.sh
```
### Monitor Specific VM
```bash
export VM_IP="20.123.45.67"
./scripts/vm-deployment/monitor-vm.sh
```
### Scale RPC VMSS
```bash
export RESOURCE_GROUP="defi-oracle-mainnet-rg"
./scripts/vm-deployment/scale-vmss.sh besu-rpc-vmss 5
```
## Troubleshooting
See [VM Deployment Troubleshooting Guide](../docs/VM_DEPLOYMENT_TROUBLESHOOTING.md) for common issues and solutions.
## Related Documentation
- [VM Deployment Guide](../docs/VM_DEPLOYMENT.md)
- [VM Deployment Quickstart](../docs/VM_DEPLOYMENT_QUICKSTART.md)
- [VM Deployment Checklist](../docs/VM_DEPLOYMENT_CHECKLIST.md)
- [Deployment Comparison](../docs/DEPLOYMENT_COMPARISON.md)