socketplane

command module
v0.0.0-...-47a274d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

README

#SocketPlane

Circle CI Coverage Status

Developers don't want to care about VLANs, VXLANs, Tunnels or TEPs. People responsible for managing the infra expect it to be performant and reliable. SocketPlane provides a networking abstraction at the socket-layer in order to solve the problems of the network in a manageable fashion.

SocketPlane Technology Preview

This early release is just a peek at some of the things we are working on and releasing to the community as open source. As we are working upstream with the Docker community to bring in native support for network driver/plugin/extensions, we received a number of request to try the proposed socketplane solution with existing Docker versions. Hence we came up with a temporary wrapper command : socketplane that is used as a front-end to the docker CLI commands. This enables us to send hooks to the SocketPlane Daemon.

In this release we support the following features:

  • Open vSwitch integration
  • ZeroConf multi-host networking for Docker
  • Elastic growth of a Docker/SocketPlane cluster
  • Support for multiple networks
  • Distributed IP Address Management (IPAM)

Overlay networking establishes tunnels between host endpoints, and in our case, those host endpoints are Open vSwitch. The advantage to this scenario is the user doesn't need to worry about subnets/vlans or any other layer 2 usage constraints. This is just one way to deploy container networking that we will be presenting. The importance of Open vSwitch is performance and the defacto APIs for advanced networking.

Our 'ZeroConf' technology is based on multicast DNS. This allows us to discover other SocketPlane cluster members on the same segment and to start peering with them. This allows us to elastically grow the cluster on demand by simply deploying another host - mDNS handles the rest. Since multicast availability is hit and miss in most networks, it is aimed at making it easy to deploy Docker and SocketPlane to start getting familiar with the exciting marriage of advanced, yet sane networking scenario with the exciting Docker use cases. We will be working with the community on other clustering technologies such as swarm that can be in used in conjunction to provide a more provisioning oriented clustering solutions.

Once we've discovered our neighbors, we're able to join an embedded [Consul] instance, giving us access to an eventually consistent key/value store for network state.

We support mutiple networks, to allow you to divide your containers in to subnets to ease the burden of enforcing firewall policy in the network.

Finally, we've implemented a distributed IP address management solution that enables non conflicting address assignment throughout a cluster.

Note: As we previously mentioned, it's not an ideal approach, but it allows people to start kicking the tyres as soon as possible. All of the functionality in socketplane.sh will move in to our Golang core over time.

[ See Getting Started Demo Here ] ( https://www.youtube.com/watch?v=ukITRl58ntg )

[ See Socketplane with a LAMP Stack Demo Here ] ( https://www.youtube.com/watch?v=5uzUSk3NjD0 )

Installation

Vagrant

A Default Vagrant file has been provided to setup a a demo system. By default three Ubuntu 14.04 VM hosts will be installed each with an installed version of Socketplane.

You can change the number of systems created as follows:

export SOCKETPLANE_NODES=1
#or
export SOCKETPLANE_NODES=10

To start the demo systems:

git clone https://github.com/socketplane/socketplane
cd socketplane
vagrant up

The VM's are named socketplane-{n}, where n is a number from 1 to SOCKETPLANE_NODES || 3

Once the VM's are started you can ssh in as follows:

vagrant ssh socketplane-1
vagrant ssh socketplane-2
vagrant ssh socketplane-3

You can start Docker containters in each of the VM's and they will all be in a default network.

sudo socketplane run -itd ubuntu

You can also see the status of containers on a specific host VM by typing:

sudo socketplane info

If you want to create multiple networks you can do the following:

sudo socketplane network create web 10.2.0.0/16

sudo socketplane run -n web -itd ubuntu

You can list all the created networks with the following command:

sudo socketplane network list

For more options use the HELP command

sudo socketplane help

Non-Vagrant install / deploy

If you are not a vagrant user, please follow these instructions to install and deploy socketplane. While Golang, Docker and OVS can run on many operating systems, we are currently running tests and QA against Ubuntu and Fedora.

Note: If you are using Virtualbox, please take care of the following before proceeding with the installation :

  • Clustering over NAT adapter will not work. Hence, the Virtualbox VMs must have either Host-Only Adapter (or) Internal Network (or) Bridged adapter installed for clustering to work.

  • The VMs/Hosts must have unique hostname. Make sure that /etc/hosts in the VMs have the unique hostname updated.

    Fist Node: curl -sSL http://get.socketplane.io/ | sudo BOOTSTRAP=true sh

    Subsequent Nodes: curl -sSL http://get.socketplane.io/ | sudo sh

or

Fist Node:
wget -qO- http://get.socketplane.io/ | sudo BOOTSTRAP=true sh

Subsequent Nodes:
wget -qO- http://get.socketplane.io/ | sudo sh

Warning: The BOOTSTRAP=true should be used on the first node only. Without it, it won't work. If used on subsequent nodes, bad things will happen.

This should ideally start the Socketplane agent container as well. You can use sudo docker ps | grep socketplane command to check the status. If, the agent isnt already running, you can install it using the following command :

sudo socketplane install

Next start an image, for example a bash shell:

sudo socketplane run -i -t ubuntu /bin/bash

You can also see the status of containers on a specific host VM by typing:

sudo socketplane info

If you want to create multiple networks you can do the following:

sudo socketplane network create web 10.2.0.0/16

sudo socketplane run -n web -itd ubuntu

You can list all the created networks with the following command:

sudo socketplane network list

For more options use the HELP command

sudo socketplane help

Useful Agent Commands

The Socketplane agent runs in its own container and you might find the following commands useful :

  1. Socketplane agent troubleshooting/debug logs :

     sudo socketplane agent logs
    
  2. Socketplane agent stop :

     sudo socketplane agent stop
    
  3. Socketplane agent start :

     sudo socketplane agent start
    

Hacking

See HACKING.md

Contact us

For bugs please file an issue. For any assistance, questions or just to say hi, please visit us on IRC, #socketplane at irc.freenode.net

Stay tuned for some exciting features coming soon from the SocketPlane team.

License

Copyright 2014 SocketPlane, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Code is released under the Apache 2.0 license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cenkalti/hub
Package hub provides a simple event dispatcher for publish/subscribe pattern.
Package hub provides a simple event dispatcher for publish/subscribe pattern.
_workspace/src/github.com/cenkalti/rpc2
Package rpc2 provides bi-directional RPC client and server similar to net/rpc.
Package rpc2 provides bi-directional RPC client and server similar to net/rpc.
_workspace/src/github.com/cenkalti/rpc2/jsonrpc
Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec for the rpc2 package.
Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec for the rpc2 package.
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/docker/libcontainer/netlink
Packet netlink provide access to low level Netlink sockets and messages.
Packet netlink provide access to low level Netlink sockets and messages.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/hashicorp/go-checkpoint
checkpoint is a package for checking version information and alerts for a HashiCorp product.
checkpoint is a package for checking version information and alerts for a HashiCorp product.
_workspace/src/github.com/hashicorp/go-msgpack/codec
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
_workspace/src/github.com/hashicorp/golang-lru
This package provides a simple LRU cache.
This package provides a simple LRU cache.
_workspace/src/github.com/hashicorp/hcl
hcl is a package for decoding HCL into usable Go structures.
hcl is a package for decoding HCL into usable Go structures.
_workspace/src/github.com/hashicorp/memberlist
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
_workspace/src/github.com/inconshreveable/muxado
muxado is an implementation of a general-purpose stream-multiplexing protocol.
muxado is an implementation of a general-purpose stream-multiplexing protocol.
_workspace/src/github.com/laher/goxc/config
config package handles invocation settings for goxc, which can be set using a combination of cli flags plus json-based config files.
config package handles invocation settings for goxc, which can be set using a combination of cli flags plus json-based config files.
_workspace/src/github.com/laher/goxc/core
Some general utility functions for goxc
Some general utility functions for goxc
_workspace/src/github.com/laher/goxc/typeutils
helps with type coercion and merging maps
helps with type coercion and merging maps
_workspace/src/github.com/miekg/dns
Package dns implements a full featured interface to the Domain Name System.
Package dns implements a full featured interface to the Domain Name System.
_workspace/src/github.com/miekg/dns/idn
Package idn implements encoding from and to punycode as speficied by RFC 3492.
Package idn implements encoding from and to punycode as speficied by RFC 3492.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/socketplane/bonjour
bonjour This is a simple Multicast DNS-SD (Apple Bonjour) library written in Golang.
bonjour This is a simple Multicast DNS-SD (Apple Bonjour) library written in Golang.
_workspace/src/github.com/socketplane/go-fastping
Package fastping is an ICMP ping library inspired by AnyEvent::FastPing Perl module to send ICMP ECHO REQUEST packets quickly.
Package fastping is an ICMP ping library inspired by AnyEvent::FastPing Perl module to send ICMP ECHO REQUEST packets quickly.
_workspace/src/github.com/vishvananda/netlink
Package netlink provides a simple library for netlink.
Package netlink provides a simple library for netlink.
_workspace/src/github.com/vishvananda/netlink/nl
Package nl has low level primitives for making Netlink calls.
Package nl has low level primitives for making Netlink calls.
_workspace/src/github.com/vishvananda/netns
Package netns allows ultra-simple network namespace handling.
Package netns allows ultra-simple network namespace handling.
_workspace/src/golang.org/x/net/internal/iana
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
_workspace/src/golang.org/x/net/ipv4
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
_workspace/src/golang.org/x/net/ipv6
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL