Cheat sheet for using the Command Line client with Heat

Modified on Mon, 10 Jan, 2022 at 5:32 PM

The Heat command line client

In true OpenStack fashion there is a Heat command line client. To our biased eye, the command line tool seems more fully featured and gives more detailed feedback than the dashboard, so we prefer to use it when developing templates.

Instructions on installing the command line tools can be found here.

We will step through some the actions the command line tool can perform, using one of the NeCTAR Heat sample templates.

To list all the stacks you have created do (don't forget to source your RC file before you start!):

heat stack-list

Repeat the above command liberally as you step through the following commands!

To validate the template (all one line):

heat template-validate --template-url https://raw.github.com/NeCTAR-RC/heat-templates/master/yaml/Fedora/WordPress_Single_Instance.yaml

Then to use the template to create a stack named "teststack" (again, all one line):

heat create teststack --template-url=https://raw.github.com/NeCTAR-RC/heat-templates/master/yaml/Fedora/WordPress_Single_Instance.yaml --parameters="InstanceType=m1.small;DBUsername=dbuser;DBPassword=verybadpassword;DBRootPassword=anotherverybadpassword;KeyName=nectar_dev"

PS: Don't forget to customise the command: e.g.: replace the passwords with far better ones, and also to change the key name to match one of your keys.

Shell commands for exploring stacks:

Command Action
heat stack-list list all the stacks you have created
heat stack-show show all details for the stack
heat event-list <stackname> list events in the history of the stack
heat event-show <stackname> <resource> <eventID> information on a particular event (using the event ID)
heat action-suspend <stackname> suspend the stack
heat action-resume <stackname> resume the stack
heat resource-list <stackname> list the resources being used by the stack
heat resource-show <stackname> <resource> information on a particular resource
heat resource-metadata <stackname> <resource> show metadata on a resource
heat template-show <stackname> show the template that was used to create the stack
heat stack-delete <stackname> delete the stack

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article