[openstack-dev] [Heat] How to model resources in Heat

Clint Byrum clint at fewbar.com
Thu Jan 30 21:54:47 UTC 2014


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.



More information about the OpenStack-dev mailing list