This design implements Azure Batch for parallel processing (e.g., rendering, risk analysis).
Topology: Batch Nodes (VMs) run in a Spoke VNet. They peer to the Hub to mount Storage or access Licenses.
+--------------+ +--------------------------+ +--------------+
| Job | | HUB VNet | | SPOKE VNet |
| Scheduler | | (License Svr) | | (Compute) |
+------+-------+ +------------+-------------+ +------+-------+
| | |
v | (Peering) |
+------+-------+ v v
| Batch | +------------+-------------+ +------+-------+
| Service |---------->| Storage Account |<--------->| Batch Pool |
| (Orch) | | (Input/Output) | | (100 VMs) |
+--------------+ +--------------------------+ +------+-------+
PRIMARY REGION (East US)
+-----------------------------------------------------------------------+
| HUB VNet: vnet-hub (10.0.0.0/16) |
| +-----------------------+ |
| | License Server VM | |
| +-----------|-----------+ |
| | |
| v (Peering) |
+---------------|-------------------------------------------------------+
|
+---------------|-------------------------------------------------------+
| SPOKE VNet: vnet-hpc-spoke (10.1.0.0/16) |
| +-----------------------+ |
| | Subnet: Batch | |
| | [VM Node 1] | |
| | [VM Node 2] | |
| | ... | |
| | [VM Node 100] | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
SECONDARY REGION (West US)
+-----------------------------------------------------------------------+
| DR SPOKE VNet |
| +-----------------------+ |
| | Batch Account (DR) | |
| | (Empty Pool) | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
* Create Batch Account in West US.
* If East US fails, submit new jobs to West US Account.
1. Upload: User uploads input.dat to Storage.
2. Submit: User submits Job to Batch Service.
3. Scale: Batch sees work, scales Pool to 50 VMs.
4. Execute: VMs pull input.dat, process it.
5. Output: VMs write output.dat to Storage.
6. Scale Down: Batch deletes VMs.
1. Search: "Virtual networks" -> + Create.
2. Resource Group: rg-hpc-spoke.
3. Name: vnet-hpc-spoke.
4. Region: East US.
5. Subnet: snet-batch (Range 10.1.0.0/24).
6. Create.
7. Peer to vnet-hub.
1. Search: "Batch accounts" -> + Create.
2. Resource Group: rg-hpc-spoke.
3. Name: batchcorp[uniqueid].
4. Region: East US.
5. Storage account: Select existing or create new stbatch[uniqueid].
6. Advanced:
* Pool allocation mode: User subscription. (This is Critical for VNet injection).
* *Note: You might need to grant "Contributor" to the Microsoft Azure Batch API on your subscription if prompted.*
7. Create.
1. Go to the Batch Account -> Pools -> + Add.
2. Pool ID: pool-render.
3. Image Type: Marketplace.
4. Publisher/Offer/Sku: Canonical / UbuntuServer / 20.04-LTS.
5. Node Size: Standard_F2s_v2 (Compute Optimized).
6. Scale:
* Mode: Fixed.
* Target dedicated nodes: 0.
* Target Spot/Low-priority nodes: 2 (Cheaper for testing).
7. Virtual Network:
* Virtual network: vnet-hpc-spoke.
* Subnet: snet-batch.
8. Create.
1. Click on pool-render.
2. Go to Nodes (Left Menu).
3. Wait for the Status to change:
* Creating -> Starting -> Idle.
4. Once Idle, they are ready to accept jobs.
5. Check IP: Click a node. It should have a Private IP from 10.1.0.x.
1. Jobs -> + Add.
2. Job ID: job-01.
3. Pool: pool-render.
4. OK.
5. Tasks -> + Add.
6. Command line: /bin/bash -c "printenv; sleep 30".
7. Submit.
8. Watch the Task state go to Completed.