Jump to: navigation, search

Difference between revisions of "Heat/GettingStartedUsingDevstack"

Line 11: Line 11:
  
 
<pre><nowiki>
 
<pre><nowiki>
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng,h-meta
+
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
 
</nowiki></pre>
 
</nowiki></pre>
  

Revision as of 14:07, 30 November 2012

Heat and Devstack

Heat is fully integrated into DevStack. This is a convenient way to try out or develop heat alongside the current development state of all the other OpenStack projects. Heat on DevStack works on both Ubuntu and Fedora.

These instructions assume you already have a working DevStack installation which can launch basic instances.

Configure DevStack to enable Heat

Adding the following line to your `localrc` file will enable the heat services

ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng


It would also be useful to automatically download and register a VM image that Heat can launch.

IMAGE_URLS+=",https://github.com/downloads/heat-api/prebuilt-jeos-images/F16-x86_64-cfntools.qcow2"

URLs for any of these prebuilt JEOS images can be specified.

That is all the configuration that is required. When you run `./stack.sh` the Heat processes will be launched in `screen` with the labels prefixed with `h-`.

Confirming heat is responding

Before any heat commands can be run, the authentication environment needs to be loaded

source openrc


You can confirm that Heat is running and responding with this command

heat-cfn list

This should return the following

<ListStacksResponse>
  <ListStacksResult>
    <StackSummaries/>
  </ListStacksResult>
</ListStacksResponse>


Preparing Nova for running stacks

Enabling Heat in devstack will replace the default Nova flavors with flavours that the Heat example templates expect. You can see what those flavors are by running

nova flavor-list


Heat needs to launch instances with a keypair, so we need to generate one

nova keypair-add heat_key > heat_key.priv
chmod 600 heat_key.priv


Launching a stack

Now lets launch a stack

heat-cfn -d create teststack --template-file=../heat/templates/WordPress_Single_Instance.template \
--parameters="InstanceType=m1.large;DBUsername=wp;DBPassword=verybadpassword;KeyName=heat_key;LinuxDistribution=F16"

Which will respond

<CreateStackResponse>
  <CreateStackResult>
    <StackId>arn:openstack:heat::service:stacks/teststack/1</StackId>
  </CreateStackResult>
</CreateStackResponse>


List stacks

heat-cfn list


List stack events

heat-cfn event-list teststack


Describe the wordpress stack

heat-cfn describe teststack

Note: After a few seconds, the StackStatus should change from IN_PROGRESS to CREATE_COMPLETE.

Verify instance creation

Because the software takes some time to install from the repository, it may be a few minutes before the Wordpress instance is in a running state.

Point a web browser at the location given by the WebsiteURL Output as shown by heat describe::


wget ${WebsiteURL}


Delete the instance when done

heat-cfn delete teststack
heat-cfn list


Note: This operation will show no running stack.

Troubleshooting

If you encounter issues running heat, see if the solution to the issue is documented on the Troubleshooting wiki page. If not, let us know about the problem in the #heat IRC channel on freenode.