Commit b09f85cc authored by Daniel Baur's avatar Daniel Baur

first draft of scaling trigger

parent 9cdca8bf
......@@ -258,3 +258,44 @@ outputs:
value:
ip_address: { get_attribute: [ frontend_floatingip, floating_ip_address ] }
port: 80
groups:
nodejs:
# adding the some_vm node template that was previously configured
members: [nodejs_host]
policies:
cpu_threshold:
# using the 'host_failure' policy type
type: cloudify.policies.types.threshold
# policy specific configuration
properties:
# Configure it
service: system
threshold: 50
upper_bound: true
# Name of the service we want to shortlist (using regular expressions) and
# watch - every Diamond event has the service field set to some value.
# In our case, the ExampleCollector sends events with this value set to "example".
service:
- system
triggers:
heal_trigger:
# using the 'execute_workflow' policy trigger
type: cloudify.policies.triggers.execute_workflow
parameters:
# configuring this trigger to execute the scale workflow
workflow: scale
# The heal workflow will get
# its parameters from the event that triggered
# its execution
workflow_parameters:
# 'node_id' will be the node instance id
# of the node that failed. In our case, it will be
# something like 'some_vm_afd34'
node_id: { get_property: [SELF, node_id] }
delta: 1
scale_compute: true
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment