好的,鉴于DCOS模板,奴隶的LaunchConfiguration看起来像这样:(我已经稍微缩短了一下)
"MasterLaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
"SecurityGroups": [ ... ],
"ImageId": { ... },
"InstanceType": { ... },
"KeyName": { "Ref": "KeyName" },
"UserData": { ... }
}
}
Run Code Online (Sandbox Code Playgroud)
要开始,您需要做的就是SpotPrice在那里添加属性.SpotPrice显然,价值是您想要支付的最高价格.您可能需要在自动缩放方面做更多工作,尤其是警报和时间.所以这是你的新产品LaunchConfiguration,现货价格为每小时1.00美元:
"MasterLaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
"SecurityGroups": [ ... ],
"ImageId": { ... },
"InstanceType": { ... },
"KeyName": { "Ref": "KeyName" },
"UserData": { ... },
"SpotPrice": 1.00
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
742 次 |
| 最近记录: |