Ask Your Question
0

interactive autoscaling heat template

asked 2017-09-05 11:20:46 -0600

vblando gravatar image

My instance heat template has parameters with constraints, so on the UI it displays a dropdown list of choices

flavor:
  type: string
  label: Instance Flaor
  default: m3.medium
  constraints:
    - allowed_values: [ m3.medium, m3.large, m3.xlarge ]

but if I call out that instance heat template on an autoscaling template, it automatically launch it using the "default" values of the parameter. How do I make it a bit more interactive by asking first the values of the parameters before it launch the autoscaling template?

scaleup_group:
  type: OS::Heat::AutoScalingGroup
  properties:
    cooldown: 60
    desired_capacity: 2
    max_size: 5
    min_size: 1
    resource:
      type: http://192.168.0.1/autoscaling/centos.yaml
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-09-05 12:21:22 -0600

vern gravatar image

I think what you're asking is how to pass parameters to an included sub-template.

When you call the sub-template, add some properties after the type. For instance, modifying your example:

scaleup_group:
  type: OS::Heat::AutoScalingGroup
  properties:
    cooldown: 60
    desired_capacity: 2
    max_size: 5
    min_size: 1
    resource:
      type: http://192.168.0.1/autoscaling/centos.yaml
      properties:
        flavor: m3.large

Or, of course, you could pass a user-supplied parameter using something like: flavor: {get_param: flavor}

edit flag offensive delete link more

Comments

i already tried passing in the parameter similar to your example but it does not show on the dashboard.

vblando gravatar imagevblando ( 2017-09-05 16:59:38 -0600 )edit

Add the same parameter to the top-level template, then pass it down to the nested template in the scaling group using flavor: {get_param: flavor}.

zaneb gravatar imagezaneb ( 2017-09-19 14:48:47 -0600 )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

1 follower

Stats

Asked: 2017-09-05 11:20:46 -0600

Seen: 78 times

Last updated: Sep 05 '17