GithubHelp home page GithubHelp logo

ozlevka-work / ansible-docker-swarm-role Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomasjpfan/ansible-docker-swarm-role

0.0 1.0 0.0 10 KB

Configures a Docker Swarm cluster.

Home Page: https://galaxy.ansible.com/thomasjpfan/docker-swarm/

License: MIT License

Makefile 24.24% Shell 1.99% Python 73.77%

ansible-docker-swarm-role's Introduction

Ansible Docker Swarm

Build Status

Configures a Docker Swarm cluster.

Requirements

  • docker installed on hosts

Role Variables

# Port docker swarm will communicate on
docker_swarm_port: 2377

# Network interface to use
docker_swarm_network_interface: "eth0"

Usage

When starting a docker swarm the following ports must be open:

  • 2377/tcp (docker_swarm_port)
  • 7946/tcp
  • 7946/udp
  • 4789/udp
  • 50/esp

This information can be found on docker's documentation.

Docker Manager and Workers

This role configures hosts in group docker_swarm_manager to be manager nodes and hosts in group docker_swarm_worker to be worker nodes:

[docker_swarm_manager]
tests_server1_1
tests_server3_1

[docker_swarm_worker]
tests_server2_1
tests_server4_1

Docker Swarm Labels

Swarm labels can be added to nodes by setting the docker_swarm_label to a list of strings:

...
[docker_swarm_manager]
tests_server1_1 docker_swarm_labels="{'db':'true'}"
tests_server3_1 docker_swarm_labels="{'dog':'big'}"

[docker_swarm_worker]
tests_server2_1 docker_swarm_labels="{'docker':'17.12', 'type':'queue'}"
tests_server4_1
...

Testing

This project uses ansible-docker-runner to run tests in a docker container.

  1. Start Container for testing:
make setup_test
  1. Run Tests
make test
  1. Stop up container
make clean_up

License

MIT

ansible-docker-swarm-role's People

Contributors

thomasjpfan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.