
- rename VirtualResource to Composer - rename event parameter depend_action to child_action - rename values parameter to input Closes-bug: #1526780 Change-Id: Ib974e14ff4bda44c2d7d991f62aa4a06dea160ea
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
id: riak_service
|
|
|
|
resources:
|
|
- id: riak_service#{index}#
|
|
from: resources/riak_node
|
|
location: #{node}#
|
|
input:
|
|
riak_self_name: riak#{index}#
|
|
riak_hostname: riak_server#{index}#.solar
|
|
riak_name: riak#{index}#@riak_server#{index}#.solar
|
|
#% if join_to %#
|
|
join_to: #{join_to}#::riak_name
|
|
#% endif %#
|
|
ip: #{node}#::ip
|
|
|
|
updates:
|
|
- with_tags: 'resource=hosts_file'
|
|
input:
|
|
hosts:name:
|
|
- riak_service#{index}#::riak_hostname::NO_EVENTS
|
|
hosts:ip:
|
|
- riak_service#{index}#::ip::NO_EVENTS
|
|
|
|
- with_tags: 'resource=haproxy_service_config & service=riak & protocol=http'
|
|
input:
|
|
backends:server:
|
|
- riak_service#{index}#::riak_hostname
|
|
backends:port:
|
|
- riak_service#{index}#::riak_port_http
|
|
|
|
- with_tags: 'resource=haproxy_service_config & service=riak & protocol=tcp'
|
|
input:
|
|
backends:server:
|
|
- riak_service#{index}#::riak_hostname
|
|
backends:port:
|
|
- riak_service#{index}#::riak_port_pb
|
|
|
|
events:
|
|
- type: depends_on
|
|
parent:
|
|
with_tags: 'resource=hosts_file & location=#{node}#'
|
|
action: run
|
|
state: success
|
|
child_action: riak_service#{index}#.run
|
|
|
|
#% if join_to %#
|
|
- type: react_on
|
|
parent_action: riak_service#{index}#.run
|
|
state: success
|
|
child_action: riak_service#{index}#.join
|
|
|
|
- type: react_on
|
|
parent_action: riak_service#{index}#.leave
|
|
state: success
|
|
child_action: riak_service#{index}#.join
|
|
|
|
- type: react_on
|
|
parent_action: riak_service#{index}#.join
|
|
state: success
|
|
child_action: #{join_to}#.commit
|
|
#% endif %#
|