Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willis7/role-swarm
Ansible role for Docker Swarm
https://github.com/willis7/role-swarm
ansible ansible-role ansible-roles
Last synced: 1 day ago
JSON representation
Ansible role for Docker Swarm
- Host: GitHub
- URL: https://github.com/willis7/role-swarm
- Owner: willis7
- Created: 2018-05-01T13:49:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-07T21:18:37.000Z (over 2 years ago)
- Last Synced: 2024-04-24T12:07:01.792Z (8 months ago)
- Topics: ansible, ansible-role, ansible-roles
- Language: Ruby
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Docker Swarm
=========Create Docker Swarm clusters with Ansible.
Requirements
------------It's assumed that Docker will be installed on each of the hosts to be included in the cluster.
Role Variables
--------------`install_type` is the most important variable in this cookbook as it will decide the role the host will play in the Swarm . The options here are `first_manager`, `manager` or `worker`.
Example Playbook
----------------``` yaml
- name: Set first swarm manager
hosts: swarm-first-manager
become: true
roles:
- {role: swarm, install_type: first_manager}- name: Add managers
hosts: swarm-manager
become: true
roles:
- {role: swarm, install_type: manager}- name: Add workers
hosts: swarm-worker
become: true
roles:
- {role: swarm, install_type: worker}
```Testing
-------Dependencies:
* Vagrant
* Virtualbox
* RubyThis project uses [Test Kitchen][tk] to create, provision and test the role using [Inspec][is]. With the dependencies installed you can run the tests with:
* `make install` - download all test dependencies
* `make test` - test (destroy, create, converge, setup, verify and destroy) one or more instancesAuthor Information
------------------* Sion Williams ([email protected])
Additional Resources
--------------------* [ansible role development](https://blog.superk.org/home/ansible-role-development)
[tk]: https://kitchen.ci/
[is]: https://www.inspec.io/
[cis]: https://www.cisecurity.org/benchmark/docker/