How to pass environment file|json via HEAT rest API

asked 2014-09-25 17:38:05 -0600

mdoakes42 gravatar image

updated 2014-09-26 14:43:12 -0600

smaffulli gravatar image

Using as a guide.

Is it possible to use the provider templates when using the HEAT REST API. I need to dynamically create an environment_file.yaml (Similar to wordpress-and-mysql-environment.yaml in the wordpress example).

I can only use the HEAT REST API from a remote server to create my stacks. Is this what the "files" parameter is.
Any examples of how this is used? As it relates to the wordpress example? Thank you!

cat wordpress-and-mysql-environment.yaml resource_registry: "Software::Wordpress": "Software::MySQL":

edit retag flag offensive close merge delete


I don't have an answer for you but I just spotted this post on the mailing list and thought it may shed some ligt: Autoscaling OpenShift in OpenStack

smaffulli gravatar imagesmaffulli ( 2014-09-26 14:44:08 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-26 21:26:17 -0600

larsks gravatar image

updated 2014-09-26 21:27:09 -0600

I'm not entirely sure I understand your question, so please let me know if this is off target:

According to the Heat API reference, to create a new stack you POST to /v1/{tenant_id}/stacks. This POST request can include an environment parameter, which "provides a JSON environment for the stack".

This seems almost exactly like what you are asking about in the subject of this question.

The files parameter is for passing in provider templates; it maps filenames to JSON template content.

If you have remote access to the HEAT API, it seems as if you could also install the Heat command-line client (which talks to a remote Heat server using the API), and then create stacks via the heat stack-create command.

The Heat client also provides a good example of how to interact with the remote API.

edit flag offensive delete link more


Did this answer help out at all?

larsks gravatar imagelarsks ( 2014-09-29 14:10:48 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-09-25 17:38:05 -0600

Seen: 1,729 times

Last updated: Sep 26 '14