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 ...

Get Mastering OpenStack - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.