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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.