solar/examples/resources/haproxy.yml
Evgeniy L 98bb9923a2 Implement ensure mechanism for containers
Added workaround to stop containers which should
not be on the node, accouding to a file with list
of services which is filled in by ansible's tasks.

It allows to implement scale-down and resource
migration.
2015-04-23 16:07:31 +03:00

33 lines
717 B
YAML

id: haproxy
class: haproxy
type: resource
handler: ansible
version: v1
actions:
run: simple/haproxy/run.yml
remove: simple/haproxy/remove.yml
input:
name: solar.haproxy-test
image: 'haproxy:1.5'
services:
- service_name: keystone-admin
bind: '*:8080'
backends:
'with_tags': ['service/keystone']
'item':
'remote_name': '{{ item.name }}'
'remote_addr': '{{ item.node.ip }}:{{ item.admin_port }}'
- service_name: keystone-pub
bind: '*:8081'
backends:
with_tags: ["service/keystone"]
item:
remote_name: '{{ item.name }}'
remote_addr: '{{ item.node.ip }}:{{ item.public_port }}'
tags: [service/haproxy]