64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
heat_template_version: 2013-05-23
|
|
description: 'sample-tosca-vnfd-scaling
|
|
|
|
'
|
|
|
|
parameters: {}
|
|
outputs: {}
|
|
resources:
|
|
SP1_group:
|
|
properties:
|
|
cooldown: 60
|
|
desired_capacity: 2
|
|
max_size: 3
|
|
min_size: 1
|
|
resource: {type: SP1_res.yaml}
|
|
type: OS::Heat::AutoScalingGroup
|
|
SP1_scale_in:
|
|
properties:
|
|
adjustment_type: change_in_capacity
|
|
auto_scaling_group_id: {get_resource: SP1_group}
|
|
cooldown: 60
|
|
scaling_adjustment: -1
|
|
type: OS::Heat::ScalingPolicy
|
|
SP1_scale_out:
|
|
properties:
|
|
adjustment_type: change_in_capacity
|
|
auto_scaling_group_id: {get_resource: SP1_group}
|
|
cooldown: 60
|
|
scaling_adjustment: 1
|
|
type: OS::Heat::ScalingPolicy
|
|
|
|
vdu_hcpu_usage_scaling_out:
|
|
type: OS::Aodh::GnocchiAggregationByResourcesAlarm
|
|
properties:
|
|
description: utilization greater_than 50%
|
|
metric: cpu_util
|
|
aggregation_method: mean
|
|
granularity: 600
|
|
evaluation_periods: 1
|
|
threshold: 50
|
|
resource_type: instance
|
|
query:
|
|
str_replace:
|
|
template: '{"=": {"server_group": "scaling_group_id"}}'
|
|
params:
|
|
scaling_group_id: SG1-2e3261d9-14
|
|
comparison_operator: gt
|
|
vdu_lcpu_usage_scaling_in:
|
|
type: OS::Aodh::GnocchiAggregationByResourcesAlarm
|
|
properties:
|
|
description: utilization less_than 10%
|
|
metric: cpu_util
|
|
aggregation_method: mean
|
|
granularity: 600
|
|
evaluation_periods: 1
|
|
threshold: 10
|
|
resource_type: instance
|
|
query:
|
|
str_replace:
|
|
template: '{"=": {"server_group": "scaling_group_id"}}'
|
|
params:
|
|
scaling_group_id: SG1-2e3261d9-14
|
|
comparison_operator: lt
|