Skip to content

Commit 0c4406e

Browse files
authored
Merge pull request #203993 from anantshankar17/master
SFMC Spot VMs
2 parents ab60baf + a69b17f commit 0c4406e

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

articles/service-fabric/how-to-managed-cluster-stateless-node-type.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,40 @@ Sample templates are available: [Service Fabric Stateless Node types template](h
5252

5353
[Azure Spot Virtual Machines on scale sets](../virtual-machine-scale-sets/use-spot.md) enables users to take advantage of unused compute capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict these Azure Spot Virtual Machine instances. Therefore, Spot VM node types are great for workloads that can handle interruptions and don't need to be completed within a specific time frame. Recommended workloads include development, testing, batch processing jobs, big data, or other large-scale stateless scenarios.
5454

55-
To set one or more stateless node types to use Spot VM, set both **isStateless** and **IsSpotVM** properties to true. When deploying a Service Fabric cluster with stateless node types, it's required to have at least one primary node type, which is not stateless in the cluster. Stateless node types configured to use Spot VMs have Eviction Policy set to 'Delete'.
55+
To set one or more stateless node types to use Spot VM, set both **isStateless** and **IsSpotVM** properties to true. When deploying a Service Fabric cluster with stateless node types, it's required to have at least one primary node type, which is not stateless in the cluster. Stateless node types configured to use Spot VMs have Eviction Policy set to 'Delete' by default. Customers can configure the 'evictionPolicy' to be 'Delete' or 'Deallocate' but this can only be defined at the time of nodetype creation.
5656

57-
Sample templates are available: [Service Fabric Stateless Node types template](https://github.com/Azure-Samples/service-fabric-cluster-templates)
57+
Sample templates are available: [Service Fabric Spot Node types template](https://github.com/Azure-Samples/service-fabric-cluster-templates/tree/master/SF-Managed-Standard-SKU-2-NT-Spot)
58+
59+
* The Service Fabric managed cluster resource apiVersion should be **2022-06-01-preview** or later.
60+
61+
```json
62+
{
63+
"apiVersion": "[variables('sfApiVersion')]",
64+
"type": "Microsoft.ServiceFabric/managedclusters/nodetypes",
65+
"name": "[concat(parameters('clusterName'), '/', parameters('nodeTypeName'))]",
66+
"location": "[resourcegroup().location]",
67+
"dependsOn": [
68+
"[concat('Microsoft.ServiceFabric/managedclusters/', parameters('clusterName'))]"
69+
],
70+
"properties": {
71+
"isStateless": true,
72+
"isPrimary": false,
73+
"IsSpotVM": true,
74+
"vmImagePublisher": "[parameters('vmImagePublisher')]",
75+
"vmImageOffer": "[parameters('vmImageOffer')]",
76+
"vmImageSku": "[parameters('vmImageSku')]",
77+
"vmImageVersion": "[parameters('vmImageVersion')]",
78+
"vmSize": "[parameters('nodeTypeSize')]",
79+
"vmInstanceCount": "[parameters('nodeTypeVmInstanceCount')]",
80+
"dataDiskSizeGB": "[parameters('nodeTypeDataDiskSizeGB')]"
81+
}
82+
}
83+
```
84+
85+
## Enabling Spot VMs with Try & Restore
5886

59-
* The Service Fabric managed cluster resource apiVersion should be **2022-02-01-preview** or later.
87+
This configuration enables the platform to automatically try to restore the evicted Spot VMs. Refer to the virtual machine scale set doc for [details](../virtual-machine-scale-sets/use-spot.md#try--restore).
88+
This configuration can only be enabled on new Spot nodetypes by specifying the **spotRestoreTimeout**, which is an ISO 8601 time duration having a value between 30 & 2880 mins. The platform will try to restore the VMs for this duration, after eviction.
6089

6190
```json
6291
{
@@ -71,6 +100,8 @@ Sample templates are available: [Service Fabric Stateless Node types template](h
71100
"isStateless": true,
72101
"isPrimary": false,
73102
"IsSpotVM": true,
103+
"evictionPolicy": "deallocate",
104+
"spotRestoreTimeout": "PT30M",
74105
"vmImagePublisher": "[parameters('vmImagePublisher')]",
75106
"vmImageOffer": "[parameters('vmImageOffer')]",
76107
"vmImageSku": "[parameters('vmImageSku')]",

0 commit comments

Comments
 (0)