cloudstack

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 10 Imported by: 0

README

Docker Machine CloudStack Driver

Docker Machine CloudStack Driver is a driver for Docker Machine. It allows to create Docker hosts on Apache CloudStack and Accelerite CloudPlatform.

Requirements

Installation

Download the binary from follwing link and put it within your PATH (ex. /usr/local/bin)

https://github.com/andrestc/docker-machine-driver-cloudstack/releases/latest

Usage

docker-machine create -d cloudstack \
  --cloudstack-api-url CLOUDSTACK_API_URL \
  --cloudstack-api-key CLOUDSTACK_API_KEY \
  --cloudstack-secret-key CLOUDSTACK_SECRET_KEY \
  --cloudstack-template "Ubuntu Server 14.04" \
  --cloudstack-zone "zone01" \
  --cloudstack-service-offering "Small" \
  --cloudstack-expunge \
  docker-machine

Acknowledgement

The driver is originally written by @svanharmelen and @atsaki.

Documentation

Index

Constants

View Source
const Version string = "v0.7.0"

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	Id                   string
	ApiURL               string
	ApiKey               string
	SecretKey            string
	HTTPGETOnly          bool
	JobTimeOut           int64
	UsePrivateIP         bool
	UsePortForward       bool
	PublicIP             string
	PublicIPID           string
	DisassociatePublicIP bool
	SSHKeyPair           string
	PrivateIP            string
	CIDRList             []string
	FirewallRuleIds      []string
	Expunge              bool
	Template             string
	TemplateID           string
	ServiceOffering      string
	ServiceOfferingID    string
	DeleteVolumes        bool
	DiskOffering         string
	DiskOfferingID       string
	DiskSize             int
	Network              string
	NetworkID            string
	Zone                 string
	ZoneID               string
	NetworkType          string
	UserDataFile         string
	UserData             string
	Project              string
	ProjectID            string
	Tags                 []string
	DisplayName          string
}

func (*Driver) Create

func (d *Driver) Create() error

Create a host using the driver's config

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver as it is registered

func (*Driver) GetCreateFlags

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

GetCreateFlags registers the flags this driver adds to "docker hosts create"

func (*Driver) GetIP

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

GetIP returns the IP that this host is available at

func (*Driver) GetSSHHostname

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

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

func (*Driver) GetState

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

GetState returns the state that the host is in (running, stopped, etc)

func (*Driver) GetURL

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

GetURL returns a Docker compatible host URL for connecting to this host e.g. tcp://1.2.3.4:2376

func (*Driver) Kill

func (d *Driver) Kill() error

Kill stops a host forcefully

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreate allows for pre-create operations to make sure a driver is ready for creation

func (*Driver) Remove

func (d *Driver) Remove() error

Remove a host

func (*Driver) Restart

func (d *Driver) Restart() error

Restart a host.

func (*Driver) SetConfigFromFlags

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

SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags

func (*Driver) Start

func (d *Driver) Start() error

Start a host

func (*Driver) Stop

func (d *Driver) Stop() error

Stop a host gracefully

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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