竞价型实例支持DCOS

gku*_*ar7 3 amazon-web-services mesosphere

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

ted*_*r42 5

好的,鉴于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)