Playbook Ansible to install a Docker Swarm cluster at Digital Ocean
- Ansible 2.7
pip install ansible==2.7
All variables of the playbook can be found in vars.yml
- do_token : token Digital Ocean lien
- droplets : list of droplets to deploy, first of the list will be the manager
- do_region : datacenter location . Listing:
curl -X GET --silent "https://api.digitalocean.com/v2/regions?per_page=999" -H "Authorization: Bearer <DO TOKEN>" |jq -r '{name: .regions[].name, regions_id: .regions[].slug}'
- do_size : droplet size. Listing:
curl -X GET --silent "https://api.digitalocean.com/v2/sizes?per_page=999" -H "Authorization: Bearer <DO TOKEN>" |jq -r '.sizes[] .slug' | sort
- ssh_pubkey : Digital ocean name public key
ansible-playbook do-swarm.yml -e do_token="<DO TOKEN>"
- Number management of manager for Docker Swarm ref
- Reverse proxy with service discovery ref
- Digitlan Ocean load balancer ref (no Ansible module currently available to create)
- Init playbook
- Create droplets
- Create cluster Docker Swarm with single manager
This project is licensed under the Apache 2.0 license - see the LICENSE file for details.
This role was created in 11/10/2018 by PG3