Re: [openstack-dev] [heat] Stack preview

2013-12-11 Thread Randall Burt
On Dec 10, 2013, at 3:46 PM, Zane Bitter zbit...@redhat.com wrote:

 On 10/12/13 15:10, Randall Burt wrote:
 On Dec 10, 2013, at 1:27 PM, Zane Bitter zbit...@redhat.com
  wrote:
 
 On 10/12/13 12:46, Richard Lee wrote:
 Hey all,
 
 We're working on a blueprint
 https://blueprints.launchpad.net/heat/+spec/preview-stack that adds
 the ability to preview what a given template+parameters would create in
 terms of resources.  We think this would provide significant value for
 blueprint authors and for other heat users that want to see what
 someone's template would create before actually launching resources (and
 possibly having to pay for them).
 
 +1 for this use case.
 
 BTW AWS supports something similar, which we never bothered to implement in 
 the compatibility API. You might want to do some research on that as a 
 starting point:
 
 http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_EstimateTemplateCost.html
 
 However the fact that we have pluggable resource types would make it very 
 difficult for us to do cost calculations inside Heat (and, in fact, 
 CloudFormation doesn't do that either, it just spits out a URL for their 
 separate calculator) - e.g. it's very hard to know which resources will 
 create, say, a Nova server unless they are all annotated in some way.
 
 Are you thinking the API will simply return a list of resource types and 
 counts? e.g.:
 
 {
   OS::Nova::Server: 2,
   OS::Cinder::Volume: 1,
   OS::Neutron::FloatingIP: 1
 }
 
 If so, +1 for that implementation too. Don't forget that you will have to 
 recurse through provider templates, which may not contain what they say on 
 the tin.
 
 That sounds more than reasonable to me. I don't think we could begin to do 
 any sort of meaningful cost calculation without having to mostly punt to 
 the service provider anyway.
 
 Yeah, exactly.
 
 Although it occurs to me that we may want more detail than I originally 
 thought... e.g. knowing the flavor of any Nova servers is probably quite 
 important. Any ideas?
 
 The first thing that comes to mind is that we could annotate resource types 
 with the list of parameters we want to group by. That would enable something 
 like:
 
 {
  OS::Nova::Server:
[{config: {flavor: m1.small}, count: 1},
 {config: {flavor: m3.large}, count: 1}],
  OS::Cinder::Volume:
[{config: {size: 10}, count: 1}],
  OS::Neutron::FloatingIP:
[{config: {}, count: 1}],
 }
 
 - ZB

Yeah, that makes a lot of sense from a I want to calculate what this stack is 
going to cost me use case. My only concern is that a given service provider 
may have different ideas as to what's important WRT a stack's value, but we 
could always extend this with something in the global environment similar to 
how we discussed resource support status in those reviews.

So it sounds to me like we just need to add a field to the property schema that 
says this property is important to the preview call.

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [heat] Stack preview

2013-12-10 Thread Richard Lee
Hey all,

We're working on a
blueprinthttps://blueprints.launchpad.net/heat/+spec/preview-stack
that
adds the ability to preview what a given template+parameters would create
in terms of resources.  We think this would provide significant value for
blueprint authors and for other heat users that want to see what someone's
template would create before actually launching resources (and possibly
having to pay for them).

We'd love to hear any thoughts regarding this feature

Best,
Richard
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Clint Byrum
Excerpts from Richard Lee's message of 2013-12-10 09:46:49 -0800:
 Hey all,
 
 We're working on a
 blueprinthttps://blueprints.launchpad.net/heat/+spec/preview-stack
 that
 adds the ability to preview what a given template+parameters would create
 in terms of resources.  We think this would provide significant value for
 blueprint authors and for other heat users that want to see what someone's
 template would create before actually launching resources (and possibly
 having to pay for them).
 
 We'd love to hear any thoughts regarding this feature

Thanks for starting with use cases. I like the use case of being able
to preview the damage this template will do to your bank account when
consuming templates without actually understanding the template language.

I'd love to see more details in the spec.

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Anderson Mesquita
It's still sparse cause we're brainstorming what it'll look like, but if
anybody has suggestions, we more than welcome them!
More updates to the spec are coming soon! =)


2013/12/10 Clint Byrum cl...@fewbar.com

 Excerpts from Richard Lee's message of 2013-12-10 09:46:49 -0800:
  Hey all,
 
  We're working on a
  blueprinthttps://blueprints.launchpad.net/heat/+spec/preview-stack
  that
  adds the ability to preview what a given template+parameters would create
  in terms of resources.  We think this would provide significant value for
  blueprint authors and for other heat users that want to see what
 someone's
  template would create before actually launching resources (and possibly
  having to pay for them).
 
  We'd love to hear any thoughts regarding this feature

 Thanks for starting with use cases. I like the use case of being able
 to preview the damage this template will do to your bank account when
 consuming templates without actually understanding the template language.

 I'd love to see more details in the spec.

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Zane Bitter

On 10/12/13 12:46, Richard Lee wrote:

Hey all,

We're working on a blueprint
https://blueprints.launchpad.net/heat/+spec/preview-stack that adds
the ability to preview what a given template+parameters would create in
terms of resources.  We think this would provide significant value for
blueprint authors and for other heat users that want to see what
someone's template would create before actually launching resources (and
possibly having to pay for them).


+1 for this use case.

BTW AWS supports something similar, which we never bothered to implement 
in the compatibility API. You might want to do some research on that as 
a starting point:


http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_EstimateTemplateCost.html

However the fact that we have pluggable resource types would make it 
very difficult for us to do cost calculations inside Heat (and, in fact, 
CloudFormation doesn't do that either, it just spits out a URL for their 
separate calculator) - e.g. it's very hard to know which resources will 
create, say, a Nova server unless they are all annotated in some way.


Are you thinking the API will simply return a list of resource types and 
counts? e.g.:


{
   OS::Nova::Server: 2,
   OS::Cinder::Volume: 1,
   OS::Neutron::FloatingIP: 1
}

If so, +1 for that implementation too. Don't forget that you will have 
to recurse through provider templates, which may not contain what they 
say on the tin.


cheers,
Zane.

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Randall Burt
On Dec 10, 2013, at 1:27 PM, Zane Bitter zbit...@redhat.com
 wrote:

 On 10/12/13 12:46, Richard Lee wrote:
 Hey all,
 
 We're working on a blueprint
 https://blueprints.launchpad.net/heat/+spec/preview-stack that adds
 the ability to preview what a given template+parameters would create in
 terms of resources.  We think this would provide significant value for
 blueprint authors and for other heat users that want to see what
 someone's template would create before actually launching resources (and
 possibly having to pay for them).
 
 +1 for this use case.
 
 BTW AWS supports something similar, which we never bothered to implement in 
 the compatibility API. You might want to do some research on that as a 
 starting point:
 
 http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_EstimateTemplateCost.html
 
 However the fact that we have pluggable resource types would make it very 
 difficult for us to do cost calculations inside Heat (and, in fact, 
 CloudFormation doesn't do that either, it just spits out a URL for their 
 separate calculator) - e.g. it's very hard to know which resources will 
 create, say, a Nova server unless they are all annotated in some way.
 
 Are you thinking the API will simply return a list of resource types and 
 counts? e.g.:
 
 {
   OS::Nova::Server: 2,
   OS::Cinder::Volume: 1,
   OS::Neutron::FloatingIP: 1
 }
 
 If so, +1 for that implementation too. Don't forget that you will have to 
 recurse through provider templates, which may not contain what they say on 
 the tin.

That sounds more than reasonable to me. I don't think we could begin to do any 
sort of meaningful cost calculation without having to mostly punt to the 
service provider anyway.

 
 cheers,
 Zane.
 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Steve Baker
On 12/11/2013 06:46 AM, Richard Lee wrote:
 Hey all,

 We're working on a blueprint
 https://blueprints.launchpad.net/heat/+spec/preview-stack that adds
 the ability to preview what a given template+parameters would create
 in terms of resources.  We think this would provide significant value
 for blueprint authors and for other heat users that want to see what
 someone's template would create before actually launching resources
 (and possibly having to pay for them).

 We'd love to hear any thoughts regarding this feature

The REST call for this would have to be different to the current create
call, the user may be surprised when they do a preview call on an older
heat and it just goes ahead and launches the stack ;)
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat] Stack preview

2013-12-10 Thread Zane Bitter

On 10/12/13 15:10, Randall Burt wrote:

On Dec 10, 2013, at 1:27 PM, Zane Bitter zbit...@redhat.com
  wrote:


On 10/12/13 12:46, Richard Lee wrote:

Hey all,

We're working on a blueprint
https://blueprints.launchpad.net/heat/+spec/preview-stack that adds
the ability to preview what a given template+parameters would create in
terms of resources.  We think this would provide significant value for
blueprint authors and for other heat users that want to see what
someone's template would create before actually launching resources (and
possibly having to pay for them).


+1 for this use case.

BTW AWS supports something similar, which we never bothered to implement in the 
compatibility API. You might want to do some research on that as a starting 
point:

http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_EstimateTemplateCost.html

However the fact that we have pluggable resource types would make it very 
difficult for us to do cost calculations inside Heat (and, in fact, 
CloudFormation doesn't do that either, it just spits out a URL for their 
separate calculator) - e.g. it's very hard to know which resources will create, 
say, a Nova server unless they are all annotated in some way.

Are you thinking the API will simply return a list of resource types and 
counts? e.g.:

{
   OS::Nova::Server: 2,
   OS::Cinder::Volume: 1,
   OS::Neutron::FloatingIP: 1
}

If so, +1 for that implementation too. Don't forget that you will have to 
recurse through provider templates, which may not contain what they say on the 
tin.


That sounds more than reasonable to me. I don't think we could begin to do any sort of 
meaningful cost calculation without having to mostly punt to the service 
provider anyway.


Yeah, exactly.

Although it occurs to me that we may want more detail than I originally 
thought... e.g. knowing the flavor of any Nova servers is probably quite 
important. Any ideas?


The first thing that comes to mind is that we could annotate resource 
types with the list of parameters we want to group by. That would enable 
something like:


{
  OS::Nova::Server:
[{config: {flavor: m1.small}, count: 1},
 {config: {flavor: m3.large}, count: 1}],
  OS::Cinder::Volume:
[{config: {size: 10}, count: 1}],
  OS::Neutron::FloatingIP:
[{config: {}, count: 1}],
}

- ZB

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev