Tested on Swarm2k, see in swarm2k dir.
In library, Ansible modules :
docker_machine.go
- machinedocker_swarm.go
- swarm (mode)
In playbooks/ some samples to instantiate on AWS
Software requirements
- Ansible 2.2+
- Docker Machine
Provider requirements, for example (EC2):
- pip install boto
- export AWS_ACCESS_KEY
- export AWS_SECRET_KEY
For example (OpenStack)
- export OS_USERNAME
- export OS_PASSWORD
- export OS_TENANT_NAME
- export OS_AUTH_URL
Steps:
-
Compile
library/docker_machine.go
andlibrary/docker_swarm.go
-
Setup env manually or through a play (i.e.
ansible-playbook *setup.yml
) -
Instanciate managers (i.e.
forloop: ansible-playbook -M library *swarm_manager.yml
) -
Instanciate workers (i.e.
forloop: ansible-playbook -M library *swarm_worker.yml
) -
Have fun