Wednesday 2 October 2013

Heat Providers/Environments 101

I've recently been experimenting with some cool new features we've added to Heat over the Havana cycle, testing things out in preparation for the Havana Release.

One potentially very powerful new abstraction is the Provider Resource method of defining nested stack resources.  Combined with the new environments capability to map template resource names to non-default implementations, it provides a very flexible way for both users and those deploying Heat to define custom resources based on Heat templates.

Firstly let me clarify what nested stacks are, following on from my previous post, and why we decided to provide this native interface to the functionality, rather than something similar to the existing Cloudformation compatible resource interface.

So nested stack resources enable you to specify a URL of another heat template, which will be used to create another Heat stack, owned by the stack which defines the AWS::CloudFormation::Stack.  This provides a way to implement composed Heat templates, and to reuse logically related template snippets.

The interface looks like this (using the new native HOT template syntax):

resources:
  nested:
    type: AWS::CloudFormation::Stack
    properties:
      TemplateURL: http://somewhere/something.yaml

There are several disadvantages to this interface:
  • Hard-coded URLs in your template
  • You have to have the nested templates accessible via a web-server somewhere
  • Hard to transparently substitute different versions of the nested implementation (without sedding! ;)
  • Passing Parameters is kind-of awkward (pass a nested map of parameter values)
  • Does not provide a way to define resources based on stack templates.
So we noticed something, which was the interface to stack templates is essentially very similar to the interface to resources, stack parameters map to resource properties, and stack outputs map to resource attributes.  Provider resources leverage this symmetry to provide a more flexible (and arguably easier to use) native interface to nested stack resources.

Ok, so how does it work!  Probably the easiest explanation is a simple worked example.

Say you define a simple template, like this example in our heat-templates repo, and you want to reuse it, as a nested stack via the Providers functionality, you simply need to do this:

Define an environment

The environment is used to map resource names to templates, and optionally can be used to define common stack parameters, so that they don't need to be passed every time you create a stack.

A user may pass an environment when creating (or updating) a stack, and a global environment may also be specified by the deployer (default location is /etc/heat/environment.d), using the same syntax.  The environment may override existing resources.

The resource_registry section is used to map resource names to template files:

resource_registry:
    My::WP::Server: https://raw.github.com/openstack/heat-templates/master/hot/F18/WordPress_Native.yaml

Or you can refer to a local file (local to the user running python-heatclient, which reads the file and attaches the content to the Heat API call creating the stack in the "files" parameter of the request):

resource_registry:
    My::WP::Server: file:///home/shardy/git/heat-templates/hot/F18/WordPress_Native.yaml

There are also some other possibilities, for example aliasing one resource name to another, which are described in our documentation.

Create Stack

Now you can simply create a stack template which references My::WP::Server:

# cat minimal_test.yaml 
heat_template_version: 2013-05-23

description: >
  Heat WordPress template, demonstrating Provider Resource.

parameters:
  user_key:
    type: string
    description : Name of a KeyPair to enable SSH access to the instance

resources:
  wordpress_instance:
    type: My::WP::Server
    properties:
        key_name: {get_param: user_key}

With an environment file:

# cat env_minimal.yaml 
resource_registry:
    My::WP::Server: file:///home/shardy/git/heat-templates/hot/F18/WordPress_Native.yaml

And then create the stack:

# heat stack-create test_stack1 --template-file=./minimal_test.yaml --environment-file=./env_minimal.yaml --parameters="user_key=$USER_key"

Optionally you could also specify the key via the environment too:


# cat env_key.yaml 
parameters:
    user_key: userkey
resource_registry:
    My::WP::Server: file:///home/shardy/git/heat-templates/hot/F18/WordPress_Native.yaml


heat stack-create test_stack2 --template-file=./minimal_test.yaml --environment-file=./env_key.yaml

This would create the nested template with a key_name parameter of "userkey"

So hopefully that provides an overview of this new feature, for more info please see our documentation and we're planning to add some example Provider/Environment examples to our example template repository soon.

Finally, kudos to Angus Salkeld, who implemented the majority of this functionality, thanks Angus! :)

29 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. https://trustedmedicationshop.com/product/buy-10-mg-valuim-online/
    Buy Valuim online with next day delivery
    Our online pharmacy is a verified supplier of Valuim and other medicines buy Valuim online without a prescription
    Buy Cheap Valuim online now at https://trustedmedicationshop.com
    Call. whatsapp or text us at +1406- 298- 3261

    ReplyDelete
  3. Real Research Chemical(RRC).supply of pure and top grade Stimulants, Depressants, Dissociatives, Opioids, Cannabinoids, Psychedelics and Pills. Safe and discrete delivery globally. 100% product quality guarantee.
    visit: https://realresearchchemical.com/

    ReplyDelete
  4. Buy Dankwoods Online. It is a cannabis pre-move organization that makes blunts utilizing Backwoods stogies.

    ReplyDelete
  5. %100 Guaranteed World Wide Delivery-Safe and Secured Payment Methods
    Buy Firearms online,Buy Glock pistols online,Buy Glock 17,Buy Glock 19 online,Buy Glock 22 online,Buy Riffle Firearms online

    Email: sales@gunmonster.com
    Phone | Whatsapp: +1(573) 684-3328

    ReplyDelete
  6. We offer hemp flower wholesale
    for those looking to start your own
    CBD business in CBD rich strains
    Website: https://hempsfarmstore.com/

    URL https://cbdhempsfarm.com/

    Whatsapp: +31 6 12978450

    Email : info@hempsfarmstore.com

    and we are always adding more flower
    strains so please contact us for a
    complete list of strains
    currently available.
    Fresh & Best Quality CBD,
    CBG & Other Wholesale Flowers are available at
    reasonable prices.

    ReplyDelete
  7. We are rank among the google top and best drugs pharmacy in the world, we supply the best and top quality medications, we have the best and most trusted reviews and our trustworthy is guaranteed, we sell cancer drugs, research chemicals, pain tablets , cheap cancer medications and others at the most cheapest prices, we also have discount. we also do wholesale and distribution on any medication our customers are willing to order
    Url: https://globalhomemed.com/
    Email : info@globalhomemed.com
    Text/WhatApp : +1 901-504-5215

    Buy cancer drugs,
    https://globalhomemed.com/
    https://globalhomemed.com/product-category/cancer-drugs/
    https://globalhomemed.com/shop/
    painkillers for sale,
    buy diphenidine,
    4-aco-dmt,
    ketamine hcl for sale,
    buy revolade online,
    buy keytruda online,
    gamma-butyrolactone for sale,
    buy 4-aco-dmt,
    buy pentobarbital online,
    buy 3fpm,
    buy ab-chminaca online,
    ethylphenidate buy usa,
    buy thj 018 usa,

    ReplyDelete
  8. köp ketamin
    comprare la ketamina
    買氯胺酮
    ketamint vásárolni
    kupiti ketamin
    Ketamin kaufen
    comprar cetamina
    pirkti ketamino
    osta ketamiini
    osta ketamiini veebis
    pirkti ketamino internete
    comprar cetamina online
    kup ketaminę online
    Ketamin online kaufen
    comprar cetamina online
    купить кетамин онлайн
    kjøp ketamin online
    köp ketamin online
    buy online ketamine
    buy ketamine
    order ketamine online
    ut ketamine online
    beställ ketamin online
    bestill ketamin online
    заказать кетамин онлайн
    Ketamin online bestellen
    online ketamine bestellen
    pedir ketamina en línea
    Vásároljon ketaminot




    call/text/whatsapp<<<<<<<< +1(505)257-5355

    email...bcvsgea1124@gmail.com

    ReplyDelete
  9. Hi there,
    Thank you so much for the post you do and also I like your post, Ibogaine hcl is the active chemical found in the African Tabernanthe iboga root that clears physical withdrawal signs drug craving

    Contact Us
    Phone: +1 (786) 822-5159
    Email: ibogaineprovidersonline@gmail.com

    Click here for MORE DETAILS....

    ReplyDelete
  10. Hi there,

    Thank you so much for the post you do and also I like your post, Are you looking for Buy Sig Sauer Gun Online in the whole USA? We are providing Online gun store, Best online gun store, Discount gun sales, Best online gun store, Gun stores in USA, Buy 9mm AR pistol online, Purchase walther CCP 9mm in USA, Buy Browning x-bolt pro, Browning x-bolt pro in us for sale, browning x bolt hells canyon speed 7mm mag for sale, Buy 9MM 3829 in usa in low rate, PMC-BRONZE-9MM online in USA, when will ammo be back in stock, when will shotgun shells be back in stock, why is there an ammo shortage, when will guns be back in stock 2021, why are guns out of stock 2021, gun sales 2021 by state, gun registrations by state, gun registration database, how to trace a gun by serial number, gun serial number identification, can you look up a gun by serial number, gun serial number, how many digits is a gun serial number, moving serial number on gun, firearm serial number requirements, how to put a serial number on a gun, stamping serial number on gun, what to do with a gun without serial number, is surplus ammo safe, is handguns safe, Buy Rifles Online with the well price and our services are very fast.
    Click here for title="Buy sig sauer magazine | Sig Sauer Magazine Online | premiumgunmart ">MORE DETAILS......

    CONTACT US
    Phone : +15592481585
    Email: info@premiumgunmart.com

    ReplyDelete
  11. C'est vraiment une bonne information sur comment buy-bulk-cbn-isolate-powder au Royaume-Uni. Indispensable pour partager ce blog, Ce commentaire aidera à avoir une connaissance complète d'autres EXTRAITS DE CBD COMME acheter en vrac-cbg-isolate-cristaux au Royaume-Uni,
    buy-bulk-cbd-isolate-crystals Royaume-Uni, Diamants Pure THCA au Royaume-Uni et Acheter de l'isolat de THCA en vrac | Poudre | En ligne, aidera également pour le futur MERCI.

    Pour plus d'informations, veuillez contacter les personnes suivantes.....

    APPEL/TEXTE/WHATSAPP >>>>>>>>>
    +1(424) 235 3914

    COURRIEL >>>>>>>>> support@420labextracts.com

    ReplyDelete
  12. Hi There,
    Thank you for sharing the knowledgeable blog with us I hope that you will post many more blog with us:-
    Buy Hygetropin Human Growth Hormone increases both the storage of calcium and converts the mineral substance of bones.
    Email:flymedshop75@gmail.com
    Click here for more information:- more info

    ReplyDelete
  13. Buy cheap nembutal pentobarbital pills, liquid, powder, SECONAL FOR SALE ONLINE, SECONAL and more online
    buy nembutal online, order nembutal online, purchase cheap nembutal online


    Email: acemedics2@gmail.com


    Are you terminally sick , weak , depressed and want to give up your life from the pain of the world? Have you been searching for a reliable and efficient means to get peaceful death without loosing your money ? Have you ever heard about Nembutal Pentobarbital Sodium Solution Peaceful exit medication? We are here to provide you with a peaceful and reliable solution.
    If you are looking to Buy Nembutal Online, then you are at the right place to make your purchase. Look no further, contact us and purchase Nembutal Online at a very affordable price. We have over 9 years of experience supplying nembutal to United States, Canada, Europe, Australia, Africa, Asia with 99.9% successful delivery.
    We are determined in giving real hope and everlasting rest to the terminally ill. We sell Nembutal Powder, Oral Nembutal Liquid and Nembutal Pills. Just providing your age and your weight, we will be able to provide you accurate information about Price, shipping, and payment.
    Note that, we do 100% discrete and express shipping of Nembutal world wide and have a refund/return policy to ensure maximum satisfaction of our clients. If we do not treat you well, tell us and if we treat you good tell the world.
    We are available 24/7 to answer all your question regarding HOW TO BUY NEMBUTAL ONLINE, WHERE TO BUY NEMBUTAL, BEST TYPE OF NEMBUTAL TO BUY etc. Simply send us an email and one of our customer service consultants will get back to you on time.
    Nembutal suicide dose,
    How to obtain Seconal,
    How to buy nembutal Online,
    Purchase nembutal Online,
    Nembutal by mail order,
    How to obtain pentobarbital,
    Best drugs for suicide overdose,


    Where to get nembutal,
    nembutal pills online,
    nembutal pills for sale,
    nembutal powder suppliers,


    how to acquire nembutal,
    buy nembutal exit international,
    buy nembutal pentobarbital sodium online,


    can you purchase nembutal online,
    purchase nembutal online,
    order nembutal online,
    nembutal online pharmacy,
    obtaining nembutal online,
    nembutal,
    nembutal online,
    nembutal for sale,


    nembutal pills,
    where can i buy nembutal,
    where to buy nembutal,
    buy nembutal online,
    nembutal purchase,
    nembutal price,
    nembutal buy,
    buy nembutal,
    nembutal pentobarbital for sale,

    purchase nembutal,
    nembutal capsules,
    nembutal sale,

    nembutal for sale online,
    nembutal buy online,
    where to buy nembutal online,

    buy nembutal capsules,
    nembutal pills for sale,
    purchasing nembutal online,
    pentobarbital sodium nembutal,
    seconal nembutal,
    nembutal no prescription,

    nembutal pentobarbital sodium,
    nembutal pills online,

    nembutal suppliers,
    We are a legitimate supplier for Nembutal. End the suffering, End the pain and End
    your sorrow by purchasing Nembutal online from the best nembutal suppliers. 100% Fast, Reliable, Trustworthy, the product being of high quality, everywhere
    decision to make. Dying with peacefulness, Dying with dignity, Peaceful euthanasia, Peaceful mind. Consumption and order to be placed according to the need.



    Contact us at: acemedics2@gmail.com



    best drugs for suicide overdose, buy nembutal pentobarbital sodium online, can you purchase nembutal online, how much nembutal is fatal, how to acquire nembutal, how to buy nembutal online, how to get sodium pentobarbital, how to obtain pentobarbital, how to obtain seconal, nembutal by mail order, nembutal for sale, nembutal online, nembutal online pharmacy, order nembutal online, nembutal pentobarbital for sale, nembutal pills for sale, nembutal powder for sale online, nembutal price, nembutal suicide dose.

    ReplyDelete
  14. Buy Psychedelic

    legalmedstoreonline.com is legal and it is one of the best pharmacies online that offers pain pills for sale, cancer drugs,Nembutal,Psychedelic drugs,Cannabinoids drugs,you can also Buy Psychedelic
    https://www.legalmedstoreonline.com/product-category/buy-psychedelic-drugs-for-sale/
    Buy 2-DPMP
    https://www.legalmedstoreonline.com/product/buy-2-dpmp-for-sale/
    Buy 2-FDCK pure online
    https://www.legalmedstoreonline.com/product/buy-2-fdck-pure-online/
    Buy 2-Oxo-PCM
    https://www.legalmedstoreonline.com/product/buy-2-oxo-pcm-pure/
    Buy 25i nbome blotter online
    https://www.legalmedstoreonline.com/product/buy-25i-nbome-blotter-online/
    Buy 4-Aco-DMT
    https://www.legalmedstoreonline.com/product/buy-4-aco-dmt-online/
    Buy 4-MEO-PV8 Crystal
    https://www.legalmedstoreonline.com/product/buy-4-meo-pv8-crystal/

    Email: info@legalmedstoreonline.com
    whatsapp...+1925 386 6102
    Telegram..tonyma1
    Wicker...safestore1




    ReplyDelete
  15. Buy Research Chemicals drugs

    legalmedstoreonline.com is legal and it is one of the best pharmacies online that offers pain pills for sale, cancer drugs,Nembutal,Psychedelic drugs,Cannabinoids drugs,you can also Buy Research Chemicals drugs
    https://www.legalmedstoreonline.com/product-category/buy-research-chemicals-for-sale/
    3-CMC CRYSTAL
    https://www.legalmedstoreonline.com/product/buy-3-cmc-crystal-online/
    3-Methylmethcathinone
    https://www.legalmedstoreonline.com/product/buy-3-methylmethcathinone/
    4-ACO-DMT (4-Acetoxy-DMT)
    https://www.legalmedstoreonline.com/product/buy-4-acetoxy-dmt/
    alpha-PVP Flakka
    https://www.legalmedstoreonline.com/product/alpha-pvp-flakka/
    Buy 2C-E Research Chemical
    https://www.legalmedstoreonline.com/product/buy-2c-e-research-chemical/
    Buy 3-Fluorophenmetrazine cheap
    https://www.legalmedstoreonline.com/product/buy-3-fluorophenmetrazine-cheap/
    JWH-018 Cannabinoid 100 ug/mL
    https://www.legalmedstoreonline.com/product/cheap-jwh-018-for-sale/
    Email: info@legalmedstoreonline.com
    whatsapp...+1925 386 6102
    Telegram..tonyma1
    Wicker...safestore1


    ReplyDelete
  16. cannabinoids-for-sale

    legalmedstoreonline.com is legal and it is one of the best pharmacies online that offers pain pills for sale, cancer drugs,Nembutal,Psychedelic drugs,Cannabinoids drugs,Research Chemicals drugs. yo can also Buy Cannabinoids drugs
    https://www.legalmedstoreonline.com/product-category/cannabinoids-for-sale/
    Buy 5C-AKB48 For Sale
    https://www.legalmedstoreonline.com/product/buy-5c-akb48-for-sale/
    Buy 5F-ADB Online
    https://www.legalmedstoreonline.com/product/buy-5f-adb-online/
    Buy FUB-AKB48
    https://www.legalmedstoreonline.com/product/buy-fub-akb48/
    Buy FUB-AMB for sale
    https://www.legalmedstoreonline.com/product/buy-fub-akb48-for-sale/
    Buy MMB Chminaca
    https://www.legalmedstoreonline.com/product/buy-mmb-chminaca/
    Buy NM2201 powder
    https://www.legalmedstoreonline.com/product/buy-nm2201-powder/
    BUY SDB-005 DRUG
    https://www.legalmedstoreonline.com/product/buy-sdb-005-drug/
    Buy THJ-018
    https://www.legalmedstoreonline.com/product/buy-thj-018-drugs-online/

    Email: info@legalmedstoreonline.com
    whatsapp...+1925 386 6102
    Telegram..tonyma1
    Wicker...safestore1


    ReplyDelete
  17. Buy Nembutal

    legalmedstoreonline.com is legal and it is one of the best pharmacies online that offers pain pills for sale, cancer drugs,Nembutal,Psychedelic drugs,Cannabinoids drugs,Research Chemicals drugs. yo can also Buy Nembutal
    https://www.legalmedstoreonline.com/product-category/nembutal-for-sale/
    Nembutal Powder
    https://www.legalmedstoreonline.com/product/buy-nembutal-powder/
    Pentobarbital oral Sodium
    https://www.legalmedstoreonline.com/product/buy-pentobarbital-oral-sodium/
    https://www.legalmedstoreonline.com/product/buy-pentobarbital-oral-sodium/
    Pentobarbital pills
    https://www.legalmedstoreonline.com/product/buy-pentobarbital-pills/

    Email: info@legalmedstoreonline.com
    whatsapp...+1925 386 6102
    Telegram..tonyma1
    Wicker...safestore1

    ReplyDelete
  18. Hi there,
    Thank you so much for the post you do and also I like your post, There are actually 3 unique grades of Ibogaine HCL Powder made use of, with variances depending on the variety of impurities that stay during the chemical compound

    Contact Us
    Phone: +1 (786) 822-5159
    Email: ibogaineprovidersonline@gmail.com

    Click here for MORE DETAILS....

    ReplyDelete
  19. Hi There,
    Thank you for sharing the knowledgeable blog with us I hope that you will post many more blog with us:-
    If you are taking the Vyvanse(Lisdexamfetamine) capsule form of this medication, swallow the capsule whole. However, if you have trouble.
    Email:info@flexipharmacy.com
    Click here for more information:- more info

    ReplyDelete
  20. We have your favorite Firearms from the most popular and world known firearms manufacturers – From the best Handguns to Shotguns & Rifles .Also get your Bulk Ammos, Silencers, Gun Optics and Switches for great prices today
    Call Us:+1(435)932-0729
    Email ID:support@buybestguns.com

    ReplyDelete
  21. Hi there,
    Thank you so much for the post you do and also I like your post, Buy Anavar Oxandrolone Tablets Online from us at very affordable prices with the best quality with or without prescription.

    Contact Us
    Email: info@bestpharmapillssteriodonlinestore.com

    Click here for MORE DETAILS....

    ReplyDelete
  22. Thanks for the wonderful informations about ,Thca isolate powder, We have quality content that will help you and your audience , read more,

    ReplyDelete
  23. Hi there,

    Thank you so much for the post you do and also I like your post, Are you looking for High Quality white rhino strain in the whole USA? We are providing High Quality afghan hash online, buy moon rock pre rolls online, AK 47 Strain, buy Alaskan Thunder Fuck strain, buy Big Chief Extracts online, bUy billy kimber strain online, Blue dream strain for sale, boom carts online, buy birthday cake strain online, Bubba Kush Strain with the well price and our services are very fast.

    Click here for Contact +1(415) 534-5674, Email: info@qualitythcportals.com

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. This is the official website for cake she hit different Cakedisposablescarts.com we do ship worldwide and we have bulk orders for affordable prices thanks.


    cake she hits different

    paradise og cake

    jedi juice cake

    cake crunch berry she hits different

    cake carts jedi juice

    mimosa cake she hits different

    cake paradise og

    cake disposable she hits different

    trap queen cake cart

    jedi juice cake strain

    unicorn cake she hits different

    cake paradise og disposable

    cake carts she hits different

    kiwi blueberry strain

    mind wrap cake

    cake she hits different carts

    cake she hits different disposable carts flavors

    cake she hits different disposable flavors

    unicorn cake carts

    alien candy cake disposable

    she hits different cake carts

    ReplyDelete
  26. Thanks for sharing this premium article free of cost i really like your article . you can alsoshop here

    ReplyDelete