Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Heat template with nova scheduler hints passed from parameters.
{
"Parameters" : {
"KeyName" : {"Type" : "String"},
"my_hint": {"Type": "String"}
},
"Resources" : {
"JobServerConfig" : {
"Type" : "AWS::EC2::Instance",
"Properties": {
"ImageId" : "MyImageId",
"InstanceType" : "m1.large",
"KeyName" : { "Ref" : "KeyName" },
"NovaSchedulerHints": [ {"Key": "my_hint", "Value": {"Ref": "my_hint"}} ],
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash -v\n"
]]}}
}
}
}
}
Then start with:
heat stack-create -f my_temp.template -P "KeyName=heat_key;my_hint=whateveryouwant"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment