# What Can Be Deployed Without vCPU Quota Increase

## Current Situation
- **Available vCPUs**: 4 remaining (6/10 used)
- **AKS Cluster**: Running with 3 nodes (Standard_D2s_v3 = 2 vCPUs each = 6 vCPUs total)
- **Cluster Capacity**: Can run workloads on existing nodes

## ✅ Can Deploy Immediately (No Additional vCPUs Needed)

### 1. Kubernetes Resources (Stateless)
These run on existing nodes and don't require new VMs:

#### Namespaces
```bash
kubectl create namespace besu-network
kubectl create namespace monitoring
kubectl create namespace firefly  # If needed
```

#### ConfigMaps and Secrets
```bash
# Configuration files
kubectl create configmap besu-config -n besu-network --from-file=config/
kubectl create secret generic besu-keys -n besu-network --from-file=keys/
```

#### Deployments (Lightweight)
- **Besu Validator Pods** (1-2 pods can run on existing nodes)
- **Besu RPC Pods** (1-2 pods)
- **Monitoring Agents** (Prometheus node-exporter, etc.)
- **Logging Agents** (Fluentd, Fluent Bit)

#### Services
```bash
# All Kubernetes Services can be created
kubectl apply -f k8s/services/
```

### 2. Helm Charts (Using Existing Nodes)

#### Besu Network (Reduced Scale)
```bash
# Deploy with reduced replica counts
helm install besu-validators ./helm/besu-network \
  -f helm/besu-network/values-validators.yaml \
  -n besu-network \
  --set replicaCount=1 \
  --set resources.requests.cpu=500m \
  --set resources.requests.memory=1Gi
```

#### Monitoring Stack
```bash
# Prometheus (lightweight)
helm install prometheus prometheus-community/kube-prometheus-stack \
  -n monitoring \
  --set prometheus.prometheusSpec.replicas=1 \
  --set prometheus.prometheusSpec.retention=7d \
  --set prometheus.prometheusSpec.resources.requests.cpu=500m \
  --set prometheus.prometheusSpec.resources.requests.memory=2Gi

# Grafana
helm install grafana grafana/grafana \
  -n monitoring \
  --set persistence.enabled=false \
  --set resources.requests.cpu=200m \
  --set resources.requests.memory=512Mi
```

### 3. Stateless Applications
- **API Gateways** (if lightweight)
- **Web Dashboards**
- **Configuration Management Tools**
- **CI/CD Agents** (if needed)

### 4. Network Configuration
- **Ingress Controllers** (NGINX, Traefik)
- **Load Balancers** (Azure Load Balancer services)
- **Network Policies**

### 5. Storage Resources
- **PersistentVolumeClaims** (use existing storage classes)
- **Storage Classes** configuration

## ⚠️ Cannot Deploy (Requires Additional vCPUs)

### Node Pools
- **Validator Node Pool** (needs 2 vCPUs × 1 node = 2 vCPUs)
- **Sentry Node Pool** (needs 2 vCPUs × 1 node = 2 vCPUs)
- **RPC Node Pool** (needs 2 vCPUs × 1 node = 2 vCPUs)
- **Total Needed**: 6 additional vCPUs (only 4 available)

### High Resource Workloads
- **Multiple Besu Validators** (each needs ~2 vCPUs)
- **Large Database Instances**
- **Resource-Intensive Processing**

## 📋 Recommended Deployment Order

### Phase 1: Immediate (No Quota Needed)
1. Create namespaces
2. Deploy ConfigMaps and Secrets
3. Deploy monitoring stack (Prometheus, Grafana)
4. Deploy single Besu validator pod (on existing nodes)
5. Deploy single Besu RPC pod (on existing nodes)
6. Configure services and ingress

### Phase 2: After Quota Increase
1. Deploy validator node pool
2. Deploy sentry node pool
3. Deploy RPC node pool
4. Scale up Besu deployments
5. Deploy additional validators

## 🚀 Quick Start Commands

### Deploy Monitoring (No Quota Needed)
```bash
# Add Helm repos
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

# Deploy Prometheus
helm install prometheus prometheus-community/kube-prometheus-stack \
  -n monitoring --create-namespace \
  --set prometheus.prometheusSpec.replicas=1 \
  --set prometheus.prometheusSpec.resources.requests.cpu=500m \
  --set prometheus.prometheusSpec.resources.requests.memory=2Gi

# Deploy Grafana
helm install grafana grafana/grafana \
  -n monitoring \
  --set persistence.enabled=false \
  --set adminPassword=admin \
  --set resources.requests.cpu=200m \
  --set resources.requests.memory=512Mi
```

### Deploy Besu (Single Pod, No Quota Needed)
```bash
# Create namespace
kubectl create namespace besu-network

# Deploy single validator pod
kubectl apply -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: besu-validator
  namespace: besu-network
spec:
  replicas: 1
  selector:
    matchLabels:
      app: besu-validator
  template:
    metadata:
      labels:
        app: besu-validator
    spec:
      containers:
      - name: besu
        image: hyperledger/besu:latest
        resources:
          requests:
            cpu: 500m
            memory: 1Gi
          limits:
            cpu: 1000m
            memory: 2Gi
