Spot Instances Support DCOS Support
1 answer
Ok, given the DCOS pattern , the LaunchConfiguration for the slaves looks like this: (I shortened it a bit)
"MasterLaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
"SecurityGroups": [ ... ],
"ImageId": { ... },
"InstanceType": { ... },
"KeyName": { "Ref": "KeyName" },
"UserData": { ... }
}
}
To get started, all you have to do is add SpotPrice
. The value SpotPrice
is obviously the maximum price you want to pay. You will probably need to do more with autoscaling, especially alarms and time of day. So here's your new one LaunchConfiguration
with a dotted price of $ 1.00 per hour:
"MasterLaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
"SecurityGroups": [ ... ],
"ImageId": { ... },
"InstanceType": { ... },
"KeyName": { "Ref": "KeyName" },
"UserData": { ... },
"SpotPrice": 1.00
}
}
+5
source to share