Ask Your Question
0

Heat: how to repeat values in template

asked 2014-08-07 08:21:04 -0500

tipytop gravatar image

I want to give same value (user-data) to multiple-resources. I can't put value in parameters section because, If I understood correctly, parameters are meant to be seen when initiating template, but I don't want that.

I am running Havana.

edit retag flag offensive close merge delete

Comments

What would these values be? How and when would these values be used?

AndyHardwick gravatar imageAndyHardwick ( 2014-08-07 13:02:15 -0500 )edit

For an example if two resources/instances have the same user data. Value would be bash script.

tipytop gravatar imagetipytop ( 2014-08-07 13:05:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-07 13:40:49 -0500

zaneb gravatar image

updated 2014-08-13 11:30:53 -0500

If you really need to do this, one option (for small strings) is to make them parameters with the default value set to the value you want. You would then simply not specify a value for the parameter when you instantiate your template.

For a longer input, like a bash script, a better way is to use the get_file instrinsic function to include it from a separate file (the Heat client should automatically upload the file for you when it is referenced in the template).

In the case of user-data in particular, another good thing to look into would be creating a single SoftwareConfiguration resource and multiple SoftwareDeployment resources to deploy the same configuration onto each server.

edit flag offensive delete link more

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

Stats

Asked: 2014-08-07 08:21:04 -0500

Seen: 555 times

Last updated: Aug 13 '14