Ask Your Question
1

How to pass environment file|json via HEAT rest API

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

mdoakes42 gravatar image

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

smaffulli gravatar image

Using https://wiki.openstack.org/wiki/Heat/... 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": http://www.example.com/hot/software/w... "Software::MySQL": http://www.example.com/hot/software/m...

edit retag flag offensive close merge delete

Comments

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 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

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

larsks gravatar image

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

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

Comments

Did this answer help out at all?

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

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

Seen: 1,198 times

Last updated: Sep 26 '14