Bug 989676 - [RFE] Custom "Provider" Resource Based on Nested Stack
Summary: [RFE] Custom "Provider" Resource Based on Nested Stack
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Upstream M3
: 4.0
Assignee: Angus Salkeld
QA Contact: Zane Bitter
URL: https://blueprints.launchpad.net/heat...
Whiteboard:
Depends On:
Blocks: RHOS40RFE
TreeView+ depends on / blocked
 
Reported: 2013-07-29 17:29 UTC by Steven Hardy
Modified: 2013-12-20 00:16 UTC (History)
10 users (show)

Fixed In Version: openstack-heat-2013.2-0.8.b3.el6ost
Doc Type: Enhancement
Doc Text:
Feature: TemplateResources Reason: This feature enables a user to customize an existing Resource type or to create a new Resource type using a Template instead of a python plugin.
Clone Of:
Environment:
Last Closed: 2013-12-20 00:16:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 33038 0 None None None Never
OpenStack gerrit 33241 0 None None None Never
OpenStack gerrit 36314 0 None None None Never
OpenStack gerrit 36323 0 None None None Never
OpenStack gerrit 36744 0 None None None Never
OpenStack gerrit 37106 0 None None None Never
Red Hat Product Errata RHEA-2013:1859 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-21 00:01:48 UTC

Comment 3 Steven Hardy 2013-09-18 12:41:10 UTC
Merged for h3, setting status to POST:

https://blueprints.launchpad.net/heat/+spec/provider-resource

Comment 6 Angus Salkeld 2013-10-01 21:54:33 UTC
Hi

I have been on PTO for the last 3 weeks, I'll work at providing you some info in the next couple of days - just catching up on things.

-Angus

Comment 7 Angus Salkeld 2013-10-23 01:30:48 UTC
High level info:
---------------
TemplateResource: (or provider) is a way to implement a resource using a template. 
Environment: is a way of defining the mapping between the template path/url and the resource type that you wish to call the resource.

You can override a system resource to customize the behavior or just create a new resource.

In order for us to have a template as a resource we convert the template parameters -> resource properties
outputs  -> resource attributes

so if you have a template:
Parameters:
  thingy:
    Type: String
Resources:
  something:
    Type: ...
Outputs:
  thunk:
    Value: {Fn::GetAtt [something, ipaddress]}

and your env.yaml looks like:
  resource_registry:
    'OS::Mine::Thing': 'file://path/my_template.yaml'

and your top level_template.yaml looks like: 
Resources:
  newthing:
    Type: 'OS::Mine::Thing'
    Properties:
      thingy: this_is_it
Outputs:
  more:
    Value: {Fn::GetAtt [newthing, thunk]}

Now create your stack:
heat stack-create new -f top_level_template.yaml -e env.yaml

You can do a lot with this feature as it makes heat very flexible, but the basics are shown above.

In the environment you can do other things like give existing resources new names and remove resources.

My testing of this feature involved making a couple of complex TemplateResources. But the simplest thing to do is to get any existing (working) template and use it as a TemplateResource.

So get the standard wordpress template and make a TemplateResource out of it.

Comment 8 Ami Jeain 2013-10-28 11:42:27 UTC
QANAK'ing due to QE capacity

Comment 13 errata-xmlrpc 2013-12-20 00:16:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html


Note You need to log in before you can comment on or make changes to this bug.