Search code examples
openstack

OpenStack: what is a stack?


From what I saw, a "Stack" (in OpenStack) is a collection of resources. But I don't understand how it is "delimited".

There are multiple questions, but I think they could be answered easily answered together as they are all linked.

First of all, what is a resource ?

  • I guess it includes servers, but does it include load balancers ? or load balancer's PoolMembers as a specific kind of resource ?
  • Would a floating IP be considered as a resource or as a part of a resource (of the server it is linked to, for example) ?
  • Is OpenStack even that clear/precise about this word or should it be used as vague concept ?

Now for the real question, is a stack:

  • The collection of resources made from one YAML file
  • All the resources on a OpenStack instances
  • You just decide how it is delimited (it could be a three-tier application, so the 3 server plus load balancer, or all the stacks on the instance, or just one server ..)

Any links to official documentation that clearly explains the answer would be appreciated.


Solution

  • The term "stack" refers to a Heat stack. This is a collection of OpenStack managed resources assembled by the execution of a Heat template. So to answer your question:

    Is a stack the collection of resources made from one YAML file?

    Yes, modulo that a HOT template may be expressed in other formats, and that a HOT template can include other files.

    Is a stack all the resources on an OpenStack instance

    Assuming that you mean an OpenStack instance (i.e. a "server"), No. A stack can consist of multiple instances, and other things that are not instances; e.g. network resources, storage resources, etcetera. And if by "on", you really mean "in", then No again. The software, data, etc resources in an instance are typically not under direct OpenStack management.

    You just decide how it is delimited (it could be a three-tier application, so the 3 server plus load balancer, or all the stacks on the instance, or just one server ..)?

    Sort of yes. If a single HOT template can be used to configure all of those resources, then you could refer to the whole lot as a stack.

    For more information, on Heat stacks, read:

    Note:

    • It is debatable whether you should deploy an entire cloud application using a single HOT template. Especially if the application is complicated, stateful and/or long running.
    • There is not a great deal of point in getting too particular about "delimiting" a Heat stack.
    • There are a number of other ways to assemble and configure OpenStack resources, including the Horizon dashboard, the Murano service, and programatically using the respective OpenStack APIs.

    I have not found any references that explain the choice of the name OpenStack, and hence the meaning of the Stack in OpenStack is debatable.