Code Monkey home page Code Monkey logo

docker-swarm-vagrant's Introduction

docker-swarm-vagrant

Firing up a docker swarm cluster with one command!

This project aims to be a simple and fast solution to create and configure a whole Docker Swarm cluster. without user interaction as several virtual machines.

How it works

VirtualBox, Vagrant and Ansible have to be installed before you can create the Docker swarm cluster

After installing the previous mentioned dependencies, the cluster can be started as follows.

# Start the creation and configuration of the cluster
vagrant up --provision
# Check the current state of the VMs
vagrant status

On each VM is a Docker Engine running in "Swarm Mode". There are Swarm Managers and Swarm Workers. The Managers have IPs like 10.0.10.{i} and hostnames like manager-{i} (where {i} is the number of the manager). The workers have IPs like 10.0.11.{i} and hostnames like worker-{i}. All nodes (managers and workers) are in the same IPv4 subnet 10.0.0.1/16.

To SSH into a node, use vagrant ssh. E.g. vagrant ssh manager-1

There is also Avahi/mDNS installed on every VM. Therefore hostnames like manager-{i}.local will be resolved to the correct IPs of the VM and can be used by the host system, if avahi is also installed on the host.

The swarm manager manager-1 is the leading manager of the swarm cluster. On this node is also Portainer, a management UI for Docker, installed. It can be reached at http://manager-1.local:9000/ through a webbroser. Portainer is also capable of managing the Docker swarm as a whole, instead of only the Docker engine on manager-1.

Feedback

Bug reports, feature requests, pull requests and feedback in general is always welcome!

License

MIT
Copyright © 2017 Simon Schürg

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.