Giter Club home page Giter Club logo

swarmist's Introduction

Warning: This project is not actively maintained. If you are looking for more up-to-date UI tools for managing your Docker Swarm cluster, consider using a more complete solution, like Swarmpit or Portainer.

Swarmist

Simple GUI for Docker Swarm Mode

Screenshot

How to Run

Locally

docker run -it -v /var/run/docker.sock:/var/run/docker.sock -p 4000:4000 jsalonen/swarmist

Against Remote Swarm

Create an SSH tunnel to manager node:

ssh -NL localhost:2375:/var/run/docker.sock [email protected]

Start swarmist and connect to tunneled port:

DOCKER_HOST=http://localhost:2375 npm start

As a Swarm Mode Service

docker service create \
  --name swarmist \
  --constraint node.role==manager \
  --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
  --publish 4000:4000 jsalonen/swarmist

How to Develop

Install dependencies:

  npm install
  cd client && npm install && cd -

Run development server:

  npm start

Point your browser to:

  http://localhost:4000/

In order to see swarm statistics, you need to connect your UI to running swarm cluster.

Testing Against Local Swarm Node

Simplest way to develop is to test against a local swarm node.

Ensure you have Docker installed locally:

  docker --version

Initiate swarm:

  docker swarm init

Test replicated services by deploying Voting App Example:

  cd ..
  git clone https://github.com/dockersamples/example-voting-app
  cd example-voting-app
  docker stack deploy --compose-file docker-stack.yml vote

Test global service by creating service in global mode (here: simple top monitor):

  docker service create --name top --mode global alpine top

Testing Against Swarm Cluster in AWS

Probably the simplest way to test against AWS testnet is to deploy Docker for AWS Stack.

Navigate to https://docs.docker.com/docker-for-aws/ and deploy a stack with CloudFormation

Find out public address of any manager node and ssh into it:

  ssh -i [yourkeypair.pem] [email protected]

Verify that docker is working and setup replicated services, for instance:

  docker --version
  docker service create --name top --mode global alpine top

Now tunnel remote docker socket to a local port:

  ssh -N -L 23750:/var/run/docker.sock [email protected]

And finally start swarmist against this port as follows:

  DOCKER_HOST=localhost:23750 npm start

Information from remote swarm cluster should appear in the UI

TODO

Other pending swarm improvements: https://github.com/docker/docker/issues?utf8=%E2%9C%93&q=is%3Aopen%20label%3Aarea%2Fswarm%20label%3Akind%2Fenhancement

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.