98bb9923a2
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.
33 lines
717 B
YAML
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]
|