[openstack-dev] [Heat] How to model resources in Heat
Mark Washenberger
mark.washenberger at markwash.net
Thu Jan 30 22:24:55 UTC 2014
On Thu, Jan 30, 2014 at 1:54 PM, Clint Byrum <clint at fewbar.com> wrote:
> Excerpts from Mark Washenberger's message of 2014-01-30 12:41:40 -0800:
> > On Wed, Jan 29, 2014 at 5:03 PM, Zane Bitter <zbitter at redhat.com> wrote:
> > > (I'm not touching the question of whether Heat should have a Glance
> Image
> > > resource at all, which I'm deeply ambivalent about.)
> > >
> >
> > Maybe I'm just missing the use case, but it seems like modeling anything
> > Glance-y in Heat doesn't quite make sense. If at all, the dependency
> would
> > run the other way (model heat-things in glance, just as we presently
> model
> > nova-things in glance). So I think we're in agreement.
> >
>
> I'm pretty sure it is useful to model images in Heat.
>
> Consider this scenario:
>
>
> resources:
> build_done_handle:
> type: AWS::CloudFormation::WaitConditionHandle
> build_done:
> type: AWS::CloudFormation::WaitCondition
> properties:
> handle: {Ref: build_done_handle}
> build_server:
> type: OS::Nova::Server
> properties:
> image: build-server-image
> userdata:
> join [ "",
> - "#!/bin/bash\n"
> - "build_an_image\n"
> - "cfn-signal -s SUCCESS "
> - {Ref: build_done_handle}
> - "\n"]
> built_image:
> type: OS::Glance::Image
> depends_on: build_done
> properties:
> fetch_url: join [ "", ["http://", {get_attribute: [ build_server,
> fixed_ip ]}, "/image_path"]]
> actual_server:
> type: OS::Nova::Server
> properties:
> image: {Ref: built_image}
>
>
> Anyway, seems rather useful. Maybe I'm reaching.
>
Perhaps I am confused. It would be good to resolve that.
I think this proposal makes sense but is distinct from modeling the image
directly. Would it be fair to say that above you are modeling an
image-build process, and the image id/url is an output of that process?
Maybe the distinction I'm making is too fine. The difference is that once
an Image exists, you can pretty much just *download* it, you can't really
do dynamic stuff to it like you can with a nova server instance.
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140130/11ec7b66/attachment-0001.html>
More information about the OpenStack-dev
mailing list