summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_cluster_autoscaling.yaml
blob: ca0fb3aa6b2aeb52bf0094d0d9d9a59c2d28de8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
heat_template_version: 2016-04-08

description: >
  Template for deploying servers based on policies.

parameters: {}
resources:
  my_server_1:
    type: OS::Senlin::Profile
    properties:
      type: os.nova.server-1.0
      properties:
        flavor: m1.medium
        image: rhel-6.5-test-image
        networks:
        - network: net0
  cluster_scaling_scale_out:
    type: OS::Senlin::Policy
    properties:
      bindings:
      - cluster:
          get_resource: my_server_1_cluster
      type: senlin.policy.scaling-1.0
      properties:
        adjustment:
          type: CHANGE_IN_CAPACITY
          number: 1
        event: CLUSTER_SCALE_OUT
  my_server_1_cluster:
    type: OS::Senlin::Cluster
    properties:
      profile:
        get_resource: my_server_1
      min_size: 2
      max_size: 10
      desired_capacity: 3
  my_server_1_scale_out_receiver:
    type: OS::Senlin::Receiver
    properties:
      action: CLUSTER_SCALE_OUT
      cluster:
        get_resource: my_server_1_cluster
      type: webhook
  scale_out_alarm:
    type: OS::Aodh::Alarm
    properties:
      meter_name: cpu_util
      alarm_actions:
      - get_attr:
        - my_server_1_scale_out_receiver
        - channel
        - alarm_url
      description: Cluster node autoscaling
      evaluation_periods: 1
      repeat_actions: True
      period: 60
      statistic: avg
      threshold: 50
      comparison_operator: gt
outputs: {}