O'Reilly logo

Mastering OpenStack - Second Edition by Chandan Dutta Chowdhury, Omar Khedher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modularizing the stacks

Users can speed up their development tenfold by organizing the infrastructure code using nested templates. The following example will combine several reusable templates to deploy a multi-tier application in Heat, including:

  • A load balancer
  • A fleet of two load-balanced web server instances running HTTPD
  • A database running the MariaDB database instance

We can start by defining our Heat templates for each stack created with the following structure:

----Templates    | ------------------ pp_stack.yaml   | ------------------ Lib                               | --------------- env.yaml                               | --------------- mariadb.yaml                               | --------------- privateNet.yaml                               | --------------- publicNet.yaml                               | --------------- httpd.yaml                               | --------------- loadbalancer.yaml

We will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required