Software developer Martin Paulo shares his Heat templates to get you started.

When the original authors wrote the “Writing your First OpenStack Application” guide over four days, there were some sections left unfinished, waiting for a helpful person to come along and contribute.

The section on Orchestration in particular bore the warning: "Sorry! We’re not quite happy with this chapter. It will give you an introduction to Heat, but it’s a little dry at the moment. We’d like to write a template for the Fractals app instead of using the "hello world" style ones, so stay tuned!"

Enter Martin Paulo, a software developer from Melbourne. He used the first app guide to run a training session for developers from several countries for NeCTAR. As part of that work, he extended the section on orchestration and now he’s contributed it upstream so everyone can benefit.

“We wanted to give developers an idea of how to architect their applications for the NeCTAR OpenStack cloud – and also to introduce Heat to them,” Paulo tells Superuser. “When we discovered the "Writing your First OpenStack Application" guide, we realized that we had a good foundation for our developers – but one without Heat templates. So I created some. Having created them, it seemed churlish not to give them back to the community,” he adds.

What are the major changes?

The "Writing your First OpenStack Application" guide had a very cursory chapter introducing Heat – with a basic "Hello World" template, and a rather large "To Do: create a template for FAAFO" (The First App Application For OpenStack, the application used as an example throughout the book).

I expanded the chapter by adding two templates and some descriptive text. The first template demonstrates how to create a compute instance that builds and runs the Fractal application as an all-in-one installation. The second template demonstrates how to autoscale the worker instances, allowing the application to handle the generation of larger fractals without too much of an impact on performance. I also tried to describe the relationship between autoscaling and Ceilometer.

What else do people need to know – who will this help most?

The templates have been tested and work on the NeCTAR cloud: but given that there are different OpenStack configurations out there, they may not work on other OpenStack installations. It would be really good if people could give them a try: and if they don’t work, fix the issues and submit patches and improvements back to the documentation. Then we can all learn and grow 🙂

Also, this chapter is a very brief introduction to Heat. Once you’ve worked your way through it, please go on to explore Heat more deeply. It really does reward you for the effort you invest. The online documentation is extensive and helpful. That said, I believe that Heat is worthy of its own book targeting developers!

I hope that it will help developers who want to start automating their cloud deployments: and will give them an incentive to dive in and to explore Heat further.

Are you working on any additions to it?

I have a further template that puts an AWS load balancer in front of the FAAFO web server(s). When NeCTAR upgrade to Neutron I intend to change it to use the Neutron load balancer and then to contribute it to further extend the chapter. That is unless someone else beats me to it!

I’ve also created and contributed a set of jcloud samples to help those who are working on the Java version of the book. Hopefully that version will be released soon…

Superuser is always interested in how-tos and other contributions, please get in touch: [email protected]

Cover Photo // CC BY NC