cloudstack

package module
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 19 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.1.14"

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

NewDriver creates new driver instance

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	ID                   string
	APIURL               string
	APIKey               string
	SecretKey            string
	IBuser               string
	IBpassword           string
	HTTPGETOnly          bool
	JobTimeOut           int64
	UsePrivateIP         bool
	UsePortForward       bool
	PublicIP             string
	PublicIPID           string
	DisassociatePublicIP bool
	MacAddress           string
	SSHKeyPair           string
	SSHPrivateKeyBase64  string
	SSHKeyPath           string
	SSHManage            bool
	PrivateIP            string
	CIDRList             []string
	FirewallRuleIds      []string
	Expunge              bool
	Template             string
	TemplateID           string
	ServiceOffering      string
	ServiceOfferingID    string
	DeleteVolumes        bool
	DiskOffering         string
	DiskOfferingID       string
	DiskSize             int
	DiskRootSize         int
	Network              string
	NetworkID            string
	NetworkCidr          string
	Zone                 string
	ZoneID               string
	NetworkType          string
	UserDataFile         string
	UserData             string
	Project              string
	ProjectID            string
	TMTags               string
	Tags                 []string
	DomainName           string
	DisplayName          string
}

Driver is the new cloudstack driver

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) GetMachineName added in v0.1.8

func (d *Driver) GetMachineName() string

func (*Driver) GetSSHHostname

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

GetSSHHostname sets hostname to the host ip

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

GetSSHUsername gets the ssh user

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) GoSleep added in v0.1.10

func (d *Driver) GoSleep(sec int)

func (*Driver) Kill

func (d *Driver) Kill() error

Kill stops a host forcefully

func (*Driver) PostInfoblox added in v0.1.9

func (d *Driver) PostInfoblox(url string, data []byte) error

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck 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