[Openstack] [Heat] Heat supports OpenStack operation

Angus Salkeld asalkeld at mirantis.com
Wed Jan 21 00:00:03 UTC 2015


On Tue, Jan 20, 2015 at 5:54 PM, Duan, Li-Gong (Gary at HPServers-Core-OE-PSC)
<li-gong.duan at hp.com> wrote:

> Hi Steven,
>
> Thanks for your explanation on Heat.
>
> > -----Original Message-----
> > From: Steven Hardy [mailto:shardy at redhat.com]
> > Sent: Friday, January 16, 2015 5:12 PM
> > To: Duan, Li-Gong (Gary at HPServers-Core-OE-PSC)
> > Cc: openstack at lists.openstack.org
> > Subject: Re: [Openstack] [Heat] Heat supports OpenStack operation
> >
> > 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 does make sense in that Heat centers around stack and does a great job
> In stack operation.
>
> > 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 is an easy job to write a script to implement such actions as turning
> off each
> Nova node. But I would like to figure out a more elegant way to do it, for
> example, automatically turning off each Nova node at a specified condition.
> This can be implemented by using Ceilometer::Alarm to implement triggering
> this operation, but it seems that there is no appropriate place/component
> to
> implement the action (say, turning off each nova node). That's the reason
> why
> I want to see whether Heat can supports such operations.
>

Hi

We are currently fleshing out a spec for Mistral resource types that should
do
what you suggest above:
https://review.openstack.org/#/c/143989/12/specs/kilo/mistral-resources.rst
(see the example on line 108).

-Angus


>
> > 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.
>
> As mentioned above, the basic idea is to trigger a specified set of
> operations
> once a specified condition is reached. In this case, monitoring the
> condition
> and trigger action can be implemented with Ceilometer::Alarm, but I want to
> see whether it is possible to implement the set of operations in Heat
> template.
>
> Considering that Heat is dealing with sets of resources(stack), I am
> wondering
> whether it can deal with sets of operations, too.
>
> > >    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.
>
> Now I understand that it doesn't make much sense to implement operation set
> in heat template and I need to figure other way to implement the set of
> operations.
>
> Regards,
> Gary
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150121/fda4b509/attachment.html>


More information about the Openstack mailing list