Start bm node with heat

Adding Heat to the stack of tested elements
This commit is contained in:
Derek Higgins 2013-05-21 17:40:59 +01:00
parent 2a620be9b0
commit 185b4d6801
2 changed files with 34 additions and 1 deletions

33
templates/heat_base.json Normal file
View File

@ -0,0 +1,33 @@
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template, just starts a base image",
"Parameters" : { },
"Resources" : {
"TestServer": {
"Type": "AWS::EC2::Instance",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"services" : {
"sysvinit" : {
"apache2" : { "enabled" : "true", "ensureRunning" : "true" }
}
}
}
}
},
"Properties": {
"ImageId" : "base",
"InstanceType" : "baremetal",
"KeyName" : "default",
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash -v\n",
"touch /var/log/tocitest.txt\n"
]]}}
}
}
},
"Outputs" : {
}
}

View File

@ -38,7 +38,7 @@ wait_for 40 10 ssh_noprompt root@$BOOTSTRAP_IP grep \'record updated for\' /var/
# but for now I'm tired so I'm going to
sleep 67
nova boot --flavor 256 --image base --key_name default bmtest
heat stack-create -f $TOCI_SOURCE_DIR/templates/heat_base.json toci_stack
# ping the node TODO : make this more readable and output less errors
wait_for 40 10 ssh_noprompt root@$BOOTSTRAP_IP 'source ~/stackrc ; ping -c 1 $(nova list | grep ctlplane | sed -e "s/.*=\(.*\) .*/\1/g")'