[Openstack] [Heat] Heat supports OpenStack operation
Steven Hardy
shardy at redhat.com
Fri Jan 16 09:11:44 UTC 2015
On Fri, Jan 16, 2015 at 08:34:47AM +0000, Duan, Li-Gong (Gary at HPServers-Core-OE-PSC) wrote:
> Does Heat support executing an OpenStack operation, such as migrating an
> Nova instance, powering off a Nova instance?
We call state changes which don't affect the definition of the stack an
"action", and we only support suspend and resume at present (e.g heat
action-suspend <stack name>)
It may be possible to add support for more actions (until now nobody has
asked for them), but note it only really makes sense to drive such actions
via heat when dependencies/ordering are important.
For example, when suspending then resuming a stack containing a WebServer
instance and a DatabaseServer instance, you want DatabaseServer to be
resumed before WebServer (same order as on stack create)
So, it might make sense to have an action which can power-off a whole
stack, turning off each nova node in the right order (you could write a
little script which does the same thing quite easily though..).
It probably doesn't make much sense for heat to support things like
migrating an instance, since it's an operation which isn't scoped to the
stack and it's dependencies, it's likely an operator wants to migrate a
workload off a specific compute node, which is something Heat has no
visibility of at all.
> I know currently Heat does a good job on launching cloud cluster or
> application, such as deploying a Nova instance with specified network
> configuration, but not sure how to control(not launch or delete) a Nova
> instance or cinder volume.
Right now, the easiest answer is write a little script which uses
information from heat (e.g to get the UUID's for the resources you want to
control) then e.g calls nova.
> If Heat does not support these OpenStack operation, what is the best Heat
> way if we want to execute some operations, such as powering off a Nova
> instance, in Heat template?
As mentioned above, these lifecycle operations affect the stack state, but
not it's definition, so it probably doesn't make sense to expose actions
like powering off an instance in the heat template.
Steve
More information about the Openstack
mailing list