Ask Your Question

Heat: how to repeat values in template

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

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


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

AndyHardwick gravatar imageAndyHardwick ( 2014-08-07 13:02:15 -0600 )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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

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

zaneb gravatar image

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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools


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

Seen: 602 times

Last updated: Aug 13 '14