shipyard

package module
v2.0.8+incompatible Latest Latest
Warning

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

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

README

Shipyard Build Status

Composable Docker Management

Shipyard enables multi-host, Docker cluster management. It uses the Citadel toolkit for cluster resourcing and scheduling. Shipyard has been dramatically simiplified and only requires access to the Docker Remote API and a RethinkDB instance.

Quick Start

  • Start a data volume instance of RethinkDB:
docker run -it -d --name shipyard-rethinkdb-data \
  --entrypoint /bin/bash shipyard/rethinkdb -l
  • Start RethinkDB with using the data volume container:
docker run -it -P -d --name shipyard-rethinkdb \
  --volumes-from shipyard-rethinkdb-data shipyard/rethinkdb
  • Start the Shipyard controller:
docker run -it -p 8080:8080 -d --name shipyard \
  --link shipyard-rethinkdb:rethinkdb shipyard/shipyard

You can then use the Shipyard CLI to interact:

  • docker run --rm -it shipyard/shipyard-cli

This will drop you into a shell with the Shipyard executable. Use shipyard login to login to the Shipyard instance. Use shipyard add-engine to add an engine and get started. See the docs for more information.

Use shipyard help to see full options.

Documentation

Full docs are available at http://shipyard-project.com

Components

There are four components to Shipyard:

Controller

The Shipyard controller talks to a RethinkDB instance for data storage (user accounts, engine addresses, events, etc). It also serves the API and web interface (see below). The controller uses Citadel to communicate to each host and handle cluster events.

API

Everything in Shipyard is built around the Shipyard API. It enables actions such as starting, stopping and inspecting containers, adding and removing engines and more. It is a very simple RESTful JSON based API.

CLI

The Shipyard CLI is a Docker inspired command line interface to a Shipyard cluster. It has been built from the ground up to support every feature that Shipyard offers.

UI

The Shipyard UI is a web interface to the Shipyard cluster. It uses the Shipyard API for all interaction. It is an AngularJS app that is served via the Controller.

Contributing

Controller

To get a development environment you will need:

  • Go 1.3+
  • Node.js: (npm for bower to build the Angular frontend)

Run the following:

  • install Godep: go get github.com/tools/godep
  • cd into the controller directory and run make deps to get the Go dependencies
  • run npm install -g bower to install bower
  • cd into the static directory and run bower install
  • run make build to build the binary
  • run ./controller -h for options

CLI

For CLI hacking you will need:

  • Go 1.3+

Run the following:

  • install Godep: go get github.com/tools/godep
  • run make deps to get the Go dependencies
  • run make build to build the binary
  • run ./cli -h for options

License

Shipyard is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

Documentation

Index

Constants

View Source
const VERSION = "2.0.8"

Variables

View Source
var (
	ErrUnauthorized = errors.New("unauthorized")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       string       `json:"id,omitempty" gorethink:"id,omitempty"`
	Username string       `json:"username,omitempty" gorethink:"username"`
	Password string       `json:"password,omitempty" gorethink:"password"`
	Tokens   []*AuthToken `json:"-" gorethink:"tokens"`
	Role     *Role        `json:"role,omitempty" gorethink:"role"`
}

type AuthToken

type AuthToken struct {
	Token     string `json:"auth_token,omitempty" gorethink:"auth_token"`
	UserAgent string `json:"user_agent,omitempty" gorethink:"user_agent"`
}

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

func NewAuthenticator

func NewAuthenticator(salt string) *Authenticator

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(password, hash string) bool

func (*Authenticator) GenerateToken

func (a *Authenticator) GenerateToken() (string, error)

func (*Authenticator) Hash

func (a *Authenticator) Hash(password string) (string, error)

type ClusterInfo

type ClusterInfo struct {
	Cpus           float64 `json:"cpus,omitempty"`
	Memory         float64 `json:"memory,omitempty"`
	ContainerCount int     `json:"container_count,omitempty"`
	EngineCount    int     `json:"engine_count,omitempty"`
	ImageCount     int     `json:"image_count,omitempty"`
	ReservedCpus   float64 `json:"reserved_cpus,omitempty"`
	ReservedMemory float64 `json:"reserved_memory,omitempty"`
	Version        string  `json:"version,omitempty"`
}

type Engine

type Engine struct {
	ID             string          `json:"id,omitempty" gorethink:"id,omitempty"`
	SSLCertificate string          `json:"ssl_cert,omitempty" gorethink:"ssl_cert,omitempty"`
	SSLKey         string          `json:"ssl_key,omitempty" gorethink:"ssl_key,omitempty"`
	CACertificate  string          `json:"ca_cert,omitempty" gorethink:"ca_cert,omitempty"`
	Engine         *citadel.Engine `json:"engine,omitempty" gorethink:"engine,omitempty"`
	Health         *Health         `json:"health,omitempty" gorethink:"health,omitempty"`
	DockerVersion  string          `json:"docker_version,omitempty"`
}

func (*Engine) Certificate

func (e *Engine) Certificate() (*tls.Certificate, error)

func (*Engine) Ping

func (e *Engine) Ping() (int, error)

type Event

type Event struct {
	Type      string             `json:"type,omitempty"`
	Container *citadel.Container `json:"container,omitempty"`
	Engine    *citadel.Engine    `json:"engine,omitempty"`
	Time      time.Time          `json:"time,omitempty"`
	Message   string             `json:"message,omitempty"`
	Tags      []string           `json:"tags,omitempty"`
}

type Extension

type Extension struct {
	ID          string          `json:"id,omitempty" gorethink:"id,omitempty"`
	Name        string          `json:"name,omitempty" gorethink:"name"`
	Image       string          `json:"image,omitempty" gorethink:"image"`
	Author      string          `json:"author,omitempty" gorethink:"author"`
	Description string          `json:"description,omitempty" gorethink:"description"`
	Version     string          `json:"version,omitempty" gorethink:"version"`
	Url         string          `json:"url,omitempty" gorethink:"url"`
	Config      ExtensionConfig `json:"config" gorethink:"config"`
}

type ExtensionConfig

type ExtensionConfig struct {
	ContainerName     string            `json:"container_name,omitempty" gorethink:"container_name"`
	Cpus              float64           `json:"cpus,omitempty" gorethink:"cpus"`
	Memory            float64           `json:"memory,omitempty" gorethink:"memory"`
	Environment       map[string]string `json:"environment,omitempty" gorethink:"environment"`
	Links             map[string]string `json:"links,omitempty" gorethink:"links"`
	Args              []string          `json:"args,omitempty" gorethink:"args"`
	Volumes           []string          `json:"volumes,omitempty" gorethink:"volumes"`
	Ports             []*citadel.Port   `json:"ports,omitempty" gorethink:"ports"`
	DeployPerEngine   bool              `json:"deploy_per_engine" gorethink:"deploy_per_engine"`
	PromptArgs        []string          `json:"prompt_args,omitempty" gorethink:"prompt_args"`
	PromptEnvironment []string          `json:"prompt_env,omitempty" gorethink:"prompt_env"`
}

type Health

type Health struct {
	Status       string `json:"status,omitempty" gorethink:"status,omitempty"`
	ResponseTime int64  `json:"response_time,omitempty" gorethink:"response_time,omitempty"`
}

type Role

type Role struct {
	ID   string `json:"id,omitempty" gorethink:"id"`
	Name string `json:"name,omitempty" gorethink:"name"`
}

type ServiceKey

type ServiceKey struct {
	Key         string `json:"key,omitempty" gorethink:"key"`
	Description string `json:"description,omitempty" gorethink:"description"`
}

type Usage

type Usage struct {
	ID              string  `json:"id,omitempty"`
	Version         string  `json:"version,omitempty"`
	NumOfEngines    int     `json:"num_of_engines,omitempty"`
	NumOfImages     int     `json:"num_of_images,omitempty"`
	NumOfContainers int     `json:"num_of_containers,omitempty"`
	TotalCpus       float64 `json:"total_cpus,omitempty"`
	TotalMemory     float64 `json:"total_memory,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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