Playbook Ansible to install a Docker Swarm cluster at Digital Ocean
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
ansible.cfg
do-swarm.yml
hosts
vars.yml

README.md

version Twitter

Playbook Ansible to install a Docker Swarm cluster at Digital Ocean

Requirements

  • Ansible 2.7
pip install ansible==2.7

Playbook Variables

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

Run

ansible-playbook do-swarm.yml -e do_token="<DO TOKEN>"

Futur features

  • 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)

Features V1.0

  • Init playbook
  • Create droplets
  • Create cluster Docker Swarm with single manager

License

Apache 2.0 Licence

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Author Information

This role was created in 11/10/2018 by PG3