From 185b4d680116cd9e4e3a17ae39426ea9e0eb8c60 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 21 May 2013 17:40:59 +0100 Subject: [PATCH] Start bm node with heat Adding Heat to the stack of tested elements --- templates/heat_base.json | 33 +++++++++++++++++++++++++++++++++ toci_test.sh | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 templates/heat_base.json diff --git a/templates/heat_base.json b/templates/heat_base.json new file mode 100644 index 000000000..6e3315339 --- /dev/null +++ b/templates/heat_base.json @@ -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" : { + } +} diff --git a/toci_test.sh b/toci_test.sh index 68962055f..2390020d3 100755 --- a/toci_test.sh +++ b/toci_test.sh @@ -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")'