Creates a docker swarm cluster. With portainer and haproxy https://docs.docker.com/engine/swarm/
Go to file
Andrea Dell'Amico 024c1e25c8 More custom options for the haproxy backends. 2020-10-06 18:23:49 +02:00
defaults Support more haproxy configuration scenarios. 2020-10-03 18:22:58 +02:00
handlers Do not fail if the haproxy container is not running. 2020-10-01 19:33:58 +02:00
meta First commit 2020-09-30 17:14:29 +02:00
tasks Use a shell command to update the haproxy networks. 2020-10-05 18:54:59 +02:00
templates More custom options for the haproxy backends. 2020-10-06 18:23:49 +02:00
tests Initial commit 2020-09-24 16:01:51 +02:00
vars Refinements of the haproxy configuration. Another attempt to get the network configuration 2020-10-05 18:01:11 +02:00
.gitignore Initial commit 2020-09-24 16:01:51 +02:00
LICENSE Initial commit 2020-09-24 16:01:51 +02:00
README.md Add information to the README file. 2020-09-30 17:20:41 +02:00

README.md

Role Name

A role that configures a docker swarm cluster, adding portainer CE and haproxy

Role Variables

The most important variables are listed below:

docker_swarm_cluster_haproxy_install: True
# mesh, keepalive, global
docker_swarm_haproxy_installation_type: 'keepalive'
docker_swarm_haproxy_networks:
  - '{{ docker_swarm_portainer_network }}'
#
docker_swarm_expose_api_via_haproxy: True
docker_swarm_expose_api_hostname: 'swarm.example.com'
# Portainer
docker_swarm_cluster_portainer_install: True
docker_swarm_portainer_hostname: 'portainer-swarm.example.com'
docker_swarm_portainer_additional_constraints: []
#  - 'node.hostname != docker01'

docker_swarm_portainer_network: 'agent_network'
docker_swarm_portainer_http_port: '9000'
docker_swarm_portainer_service_port: '8000'

docker_swarm_haproxy_additional_services: []
#  - { acl_name: 'service', acl_rule: 'hdr_dom(host) -i service.example.com', service_name: 'service-', service_replica_num: '1', service_port: '9999', service_overlay_network: 'service-network' }

Dependencies

  • docker
  • keepalived, when haproxy is installed in HA host mode

License

EUPL-1.2

Author Information

Andrea DellAmico, andrea.dellamico@isti.cnr.it