Git Product home page Git Product logo

libswarm's Introduction

Libswarm

libswarm is a toolkit for composing network services.

It defines a standard interface for services in a distributed system to communicate with each other. This lets you:

  1. Compose complex architectures from reusable building blocks
  2. Avoid vendor lock-in by swapping any service out with another

An extensive library of services is included, and you can also write your own using a simple API.

Here are some examples of what you can do with libswarm:

  • Aggregate all your Docker containers across multiple hosts and infrastructure providers, as if they were running on a single host.

  • Bridge your in-house DNS-based service discovery with that new shiny Consul deployment, without getting locked into either.

  • Swap in a new clustering and service discovery system, without changing any application code.

  • Collect logs across an in-house Mesos cluster, a Cloudfoundry deployment and individual servers staggered in 3 different datacenters, forward them to your legacy syslog deployment, then perform custom analytics on them.

  • Simulate your entire service topology in a single process, then scale it out simply by re-arranging adapters.

  • Organize your application as loosely coupled services from day 1, without over-engineering.

Installation

First get the go dependencies:

go get github.com/docker/libswarm/...

Then you can compile swarmd with:

go install github.com/docker/libswarm/swarmd

If $GOPATH/bin is in your PATH, you can invoke swarmd from the CLI.

$ swarmd -h
NAME:
   swarmd - Compose distributed systems from lightweight services

USAGE:
   swarmd [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   help, h	Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --version, -v	print the version
   --help, -h		show help

Built-in services

Docker server

Maintainer: Ben Firshman

This service runs a Docker remote API server, allowing the Docker client and other Docker tools to control libswarm services.

Docker client

Maintainer: Aanand Prasad

This service can be used to control a Docker Engine from libswarm services. It takes one argument, the Docker host to connect to. For example: dockerclient tcp://10.1.2.3:4243

SSH tunnel

Help wanted!

Etcd

Help wanted!

Geard

Clayton Coleman

Fork-exec

Solomon Hykes

Mesos

Help wanted!

Shipyard

Brian Goff

Fleet

Help wanted!

Google Compute

Brendan Burns

Rackspace Cloud

John Hopper

Orchard

Maintainer: Aanand Prasad

Control an Orchard host from libswarm. It takes two arguments, an Orchard API token and the name of the Orchard host to control.

Amazon EC2

Help wanted!

Consul

Help wanted!

OpenStack Nova

Help wanted!

Digital Ocean

Help wanted!

SoftLayer

Help wanted!

ZeroRPC

Help wanted!

Debug

The debug service simply catches all messages and prints them on the terminal for inspection.

Testing libswarm with swarmd

Libswarm ships with a simple daemon which can control services in your distributed system.

Usage example:

Run swarmd without arguments to list available services:

./swarmd

Pass a service name as argument to load it:

./swarmd fakeclient

You can pass arguments to the service, like a shell command:

./swarmd 'dockerserver tcp://localhost:4243'

You can call multiple services. They will be executed in parallel, with the output of each backend connected to the input of the next, just like unix pipelines.

This allows for very powerful composition.

./swarmd 'dockerserver tcp://localhost:4243' 'debug' 'dockerclient unix:///var/run/docker.sock'

Creators

Solomon Hykes

Copyright and license

Code and documentation copyright 2013-2014 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.

libswarm's People

Contributors

aanand avatar alexlarsson avatar bfirsh avatar brendandburns avatar cpuguy83 avatar dmcgowan avatar fermayo avatar nathanleclaire avatar proppy avatar relistan avatar smarterclayton avatar tianon avatar

Watchers

 avatar  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.