Heat/Providers
Heat "Providers" Resource plugins
This page is an attempt to distill the specification discussed in:
http://lists.openstack.org/pipermail/openstack-dev/2013-April/007989.html
And described in the following BPs:
https://blueprints.launchpad.net/heat/+spec/provider-resource
https://blueprints.launchpad.net/heat/+spec/json-parameters
https://blueprints.launchpad.net/heat/+spec/resource-properties-schema
https://blueprints.launchpad.net/heat/+spec/resource-template
https://blueprints.launchpad.net/heat/+spec/stack-metadata
https://blueprints.launchpad.net/heat/+spec/attributes-schema
https://blueprints.launchpad.net/heat/+spec/provider-upload
What are "Providers"?
Providers are an extension to our existing internal model, which allows user-definable "resource providers" to be specified via templates
It is conceptually similar to (and will internally leverage) our existing nested stack functionality, but with some additional interfaces which make consuming those nested stacks more convenient and more easily reusable. Specifically, a provider template can stand in for any resource type, and need not be identified as an AWS::CloudFormation::Stack
resource.
What might all of this give us?
- Users are no longer dependent on the operator to provide the resource type they need, they can supply their own.
- Users can modify built-in types
- Users can share their resource-provider templates
- template complexity is reduced
- modularity and reuse is improved
- provider defined resources could be to be either public, per-tenant, or per-user, again allowing more effective reuse
How might it work in practice?
Here is an example of how it might work to provide an alternate implementation for our internal (nested stack based) AWS::RDS::DBInstance resource:
1 - Get the template for the internal resource implementation
# heat resource-template-list AWS::RDS::DBInstance id name type default scope 1 builtin AWS::RDS::DBInstance true public
heat resource-template-show 1 <save cut/paste/modify template>
2 - Publish the modified resource template, scoped private (per user, this would be the default)
#heat resource-template-publish AWS::RDS::DBInstance --template-url ~/myspecialdb.template mydb
#heat resource-template-list --type AWS::RDS::DBInstance id name type default scope 1 builtin AWS::RDS::DBInstance true public 2 mydb AWS::RDS::DBInstance false private
3 - Publish a default, public resource template (this could be a tenant admin action, providing a default template for all tenant users)
heat resource-template-publish AWS::RDS::DBInstance --public --default --template-file ~/mydefaultdb.template defdb
heat resource-template-list --type AWS::RDS::DBInstance
id name type default scope 1 builtin AWS::RDS::DBInstance false public 2 mydb AWS::RDS::DBInstance false private 2 defdb AWS::RDS::DBInstance true private