solar/examples/riak/haproxy_riak_config.yaml
2015-09-29 16:39:24 +02:00

51 lines
1.4 KiB
YAML

id: haproxy_riak_config
resources:
- id: haproxy_riak_config_http
from: resources/haproxy_service_config
tags: ['service=riak', 'protocol=http']
values:
listen_port: {{http_listen_port}}
protocol: 'http'
name: 'riak_haproxy_http'
backends:server:
{% for riak in riaks %}
- {{riak}}::riak_hostname
{% endfor %}
backends:port:
{% for riak in riaks %}
- {{riak}}::riak_port_http
{% endfor %}
- id: haproxy_riak_config_pb
from: resources/haproxy_service_config
tags: ['service=riak', 'protocol=tcp']
values:
listen_port: {{pb_listen_port}}
protocol: 'tcp'
name: 'riak_haproxy_pb'
backends:server:
{% for riak in riaks %}
- {{riak}}::riak_hostname
{% endfor %}
backends:port:
{% for riak in riaks %}
- {{riak}}::riak_port_pb
{% endfor %}
updates:
- with_tags: ['resource=haproxy_config']
values:
config:protocol:
- haproxy_riak_config_http::protocol
- haproxy_riak_config_pb::protocol
config:listen_port:
- haproxy_riak_config_http::listen_port
- haproxy_riak_config_pb::listen_port
config:name:
- haproxy_riak_config_http::name
- haproxy_riak_config_pb::name
config:backends:
- haproxy_riak_config_http::backends
- haproxy_riak_config_pb::backends