Giter Club home page Giter Club logo

cluster's Introduction

Cluster

Controller node cluster management using gRPC and mDNS service discovery. Each node will watch for mDNS entries on the network. When the controller entry is found it will send a checkin message with it's details to the controllers gRPC service. From then on the controller and communicate with all nodes that have checked in.

Usage

Cluster managament application

Usage:
  cluster [command]

Available Commands:
  execute     execute a command on a node
  group       Commands for managing groups withing the cluster
  help        Help about any command
  node        Commands for managing nodes withing the cluster
  ping        Send a ping to each node

Flags:
  -c, --config string   Path to cluster config.db file (default "/Users/username/.cluster/config.db")
  -h, --help            help for cluster
      --version         version for cluster

Use "cluster [command] --help" for more information about a command.

Node

Deploy Node

./cluster node deploy

Find Nodes

./cluster node scan

Rename Node

./cluster node name node1 new_node1

List Nodes

./cluster node list

Name		Hostname	    IP:Port			        Last Seen		        ID
node1		bdd4e94392d2	192.168.1.135:10000	    2018-04-01 13:42:14	    f4f18505b85b
node2		000107e91376	192.168.1.137:10000	    2018-04-01 20:51:14	    3aeac64e3231
node3		8c1a750161ac	192.168.1.150:10000	    2018-04-01 14:04:53	    7a971aec1431
node4		raspberrypi	192.168.1.128:10000	    2018-04-01 13:58:17	    8c8f0945ce28

Node Online Check

./cluster ping node1

NODE		ONLINE
node1		true

Group

Create Group

./cluster group create group1 node1 node2 node3 node4

Create Group

./cluster group create group1 node1 node2 node3 node4

List Groups

./cluster group list

Name		Nodes		Created			        ID
group		4		    2018-04-01 20:27:17	    7bb3f4a7ea8e

Group Details

./cluster group details group1

id: 47282399-3344-4815-916d-7bb3f4a7ea8e
nickname: group1
nodes:
- id: 1312e7bf-b4ff-4ad3-8e70-f4f18505b85b
  nickname: node1
  hostname: bdd4e94392d2
  ip: 192.168.1.135
  serviceport: 10000
  serviceclient: null
  lastseen: 2018-04-01T21:15:29.178787-05:00
  firstseen: 2018-04-01T13:42:14.754074-05:00
- id: 2f13d3cc-12ad-468b-8e97-3aeac64e3231
  nickname: node2
  hostname: 000107e91376
  ip: 192.168.1.137
  serviceport: 10000
  serviceclient: null
  lastseen: 2018-04-01T20:51:14.640109-05:00
  firstseen: 2018-04-01T14:04:03.788414-05:00
- id: 3d1bebe8-34e3-416e-9c0d-7a971aec1431
  nickname: node3
  hostname: 8c1a750161ac
  ip: 192.168.1.150
  serviceport: 10000
  serviceclient: null
  lastseen: 2018-04-01T14:04:53.525019-05:00
  firstseen: 2018-04-01T14:04:53.525019-05:00
- id: b36fa5c7-91b1-4802-b508-8c8f0945ce28
  nickname: node4
  hostname: raspberrypi
  ip: 192.168.1.128
  serviceport: 10000
  serviceclient: null
  lastseen: 2018-04-01T13:58:17.346852-05:00
  firstseen: 2018-04-01T13:58:17.346852-05:00
nodenames:
- node1
- node2
- node3
- node4
createdate: 2018-04-01T20:27:17.824959-05:00

Execute Command On Group

./cluster execute group1 -- lsb_release -da

Response from node2
====================================================================
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.1 (stretch)
Release:	9.1
Codename:	stretch


Response from node1
====================================================================
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.1 (stretch)
Release:	9.1
Codename:	stretch


Response from node3
====================================================================
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.1 (stretch)
Release:	9.1
Codename:	stretch


Response from node4
====================================================================
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.1 (stretch)
Release:	9.1
Codename:	stretch

cluster's People

Contributors

brentahughes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

bitnodesnet

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.