竞价型实例支持DCOS

时间:2015-07-14 14:25:52

标签: amazon-web-services mesosphere

是否可以更改DCOS模板以使用专色实例?我环顾四周,似乎没有太多关于此的信息。

1 个答案:

答案 0 :(得分:5)

好的,given the DCOS template,奴隶的LaunchConfiguration看起来像这样:(我已经稍微缩短了一下)

"MasterLaunchConfig": {
  "Type": "AWS::AutoScaling::LaunchConfiguration",
  "Properties": {
    "IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
    "SecurityGroups": [ ... ],
    "ImageId": { ... },
    "InstanceType": { ... },
    "KeyName": { "Ref": "KeyName" },
    "UserData": { ... }
  }
}

要开始使用,您只需在其中添加SpotPrice属性即可。 SpotPrice的值显然是您要支付的最高价格。您可能需要在自动缩放方面做更多工作,尤其是警报和时间。所以这是你的新LaunchConfiguration,现货价格为每小时1.00美元:

"MasterLaunchConfig": {
  "Type": "AWS::AutoScaling::LaunchConfiguration",
  "Properties": {
    "IamInstanceProfile": { "Ref": "MasterInstanceProfile" },
    "SecurityGroups": [ ... ],
    "ImageId": { ... },
    "InstanceType": { ... },
    "KeyName": { "Ref": "KeyName" },
    "UserData": { ... },
    "SpotPrice": 1.00
  }
}
相关问题