vscale

package module
v0.0.0-...-ea82cc7 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: MIT Imports: 10 Imported by: 1

README

Build Status

Docker Machine Vscale Driver

This is a plugin for Docker Machine allowing to create Docker hosts on Vscale cloud services.

Installation

To install this plugin manually, download the binary docker-machine-driver-vscale and make it available by $PATH, for example by putting it to /usr/local/bin/:

$ curl -L https://github.com/vahaah/docker-machine-driver-vscale/releases/download/1.1.0/docker-machine-driver-vscale > /usr/local/bin/docker-machine-driver-vscale

$ chmod +x /usr/local/bin/docker-machine-driver-vscale

The latest version of docker-machine-driver-vscale binary is available on the "Releases" page.

For Ubuntu 16.04:

$ sudo curl -L https://github.com/vahaah/docker-machine-driver-vscale/releases/download/1.1.0/docker-machine-driver-vscale.ubuntu.16.04.x64 > /usr/local/bin/docker-machine-driver-vscale

$ sudo chmod +x /usr/local/bin/docker-machine-driver-vscale

Usage

After compile you can use driver for creating docker hosts. Get Vscale access token from your profile then run:

$ docker-machine create -d vscale --vscale-access-token YOUR_VSCALE_ACCESS_TOKEN machine_name

Available options:

  • --vscale-access-token: Access token.
  • --vscale-location: Server location.
  • --vscale-rplan: Server size.
  • --vscale-made-from: Server type
  • --vscale-swap-file: Swap size in MB

Environment variables and default values:

CLI option Environment variable Default
--vscale-access-token VSCALE_ACCESS_TOKEN -
--vscale-location VSCALE_LOCATION spb0
--vscale-rplan VSCALE_RPLAN small
--vscale-made-from VSCALE_MADE_FROM ubuntu_14.04_64_002_master
--vscale-swap-file VSCALE_SWAP_FILE 0

Development

Build from Source

If you wish to work on Vscale Driver for Docker machine, you'll first need Go installed (version 1.5+ is required). Make sure Go is properly installed, including setting up a GOPATH.

Run these commands to build the plugin binary:

$ go get -d github.com/vahaah/docker-machine-driver-vscale
$ cd $GOPATH/github.com/vahaah/docker-machine-driver-vscale
$ make build

After the build is complete, bin/docker-machine-driver-vscale binary will be created. If you want to copy it to the ${GOPATH}/bin/, run make install.

Documentation

Index

Constants

View Source
const Version = "1.1.0"

Version number that is being run at the moment.

Variables

View Source
var GitCommit string

GitCommit that was compiled. This will be filled in by the compiler.

Functions

func FullVersion

func FullVersion() string

FullVersion formats the version to be printed.

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	AccessToken string
	ScaletID    int64
	ScaletName  string
	Rplan       string
	MadeFrom    string
	Location    string
	SSHKeyID    int64
	SwapFile    int
}

func NewDriver

func NewDriver(hostName, storePath string) *Driver

func (*Driver) Create

func (d *Driver) Create() error

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetCreateFlags

func (d *Driver) GetCreateFlags() []mcnflag.Flag

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

func (*Driver) Kill

func (d *Driver) Kill() error

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

func (*Driver) Remove

func (d *Driver) Remove() error

func (*Driver) Restart

func (d *Driver) Restart() error

func (*Driver) SetConfigFromFlags

func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error

func (*Driver) Start

func (d *Driver) Start() error

func (*Driver) Stop

func (d *Driver) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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