Also connect the client to the haproxy network

This commit is contained in:
Andrea Dell'Amico 2020-10-14 18:35:46 +02:00
parent 3fff8966fa
commit c0fbf5463e
3 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,7 @@ The most important variables are listed below:
``` yaml
open_asfa_compose_dir: '/srv/open_asfa_stack'
open_asfa_docker_service_name: 'open-asfa'
open_asfa_docker_stack_name: 'open-asfa'
open_asfa_docker_service_server_name: 'asfa-server'
open_asfa_docker_service_client_name: 'asfa-client'
open_asfa_docker_server_image: 'lucabrl01/asfa-server'

View File

@ -1,6 +1,6 @@
---
open_asfa_compose_dir: '/srv/open_asfa_stack'
open_asfa_docker_service_name: 'open-asfa'
open_asfa_docker_stack_name: 'open-asfa'
open_asfa_docker_service_server_name: 'asfa-server'
open_asfa_docker_service_client_name: 'asfa-client'
open_asfa_docker_server_image: 'lucabrl01/asfa-server'

View File

@ -24,7 +24,10 @@
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack.yml'
- name: Connect the OpenASFA service to the haproxy-public network
command: docker service update --network-add {{ open_asfa_haproxy_public_net }} {{ open_asfa_docker_service_name }}_{{ open_asfa_docker_service_server_name }} --update-delay 30s --update-parallelism 1
command: docker service update --network-add {{ open_asfa_haproxy_public_net }} {{ item }} --update-delay 30s --update-parallelism 1
with_items:
- '{{ open_asfa_docker_stack_name }}_{{ open_asfa_docker_service_server_name }}'
- '{{ open_asfa_docker_stack_name }}_{{ open_asfa_docker_service_client_name }}'
ignore_errors: True
when: open_asfa_behind_haproxy