gandi

package module
v0.0.0-...-196c83d Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2016 License: MIT Imports: 10 Imported by: 0

README

Docker Machine driver plugin for Gandi

This plugin adds support for Gandi cloud instances to the docker-machine command line tool.

CircleCI

Installation

Requirement: Docker Machine >= 0.5.1

Download the docker-machine-driver-gandi binary from the release page. Extract the archive and copy the binary to a folder located in your PATH and make sure it's executable (e.g. chmod +x /usr/local/bin/docker-machine-driver-gandi).

Usage instructions

Grab your API key from the Gandi admin and pass that to docker-machine create with the --gandi-api-key option.

Note that Gandi's HVM platform boots your servers with Linux kernel 3.18 by default, so you should choose the overlay storage driver instead of aufs. You can also create custom images and boot with the kernel of your choice.

Example with the default Ubuntu 14.04 LTS image with the overlay storage driver:

docker-machine create --engine-storage-driver overlay \
                      --driver gandi \
                      --gandi-api-key=abc123 \
                      ubuntu-machine

Command line flags:

  • --gandi-api-key: required Your Gandi API key.
  • --gandi-image: Image to use to create machine, default Ubuntu 14.04 64 bits LTS (HVM).
  • --gandi-datacenter: Datacenter where machine will be created, default Bissen.
  • --gandi-memory: machine memory size in MB, default 512.
  • --gandi-core: Number of cores for the machine, default 1.
  • --gandi-url: url to connect to.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatacenterInfo

type DatacenterInfo struct {
	Id   int    `xmlrpc:"id"`
	Name string `xmlrpc:"name"`
}

type DiskCreateRequest

type DiskCreateRequest struct {
	DcId int    `xmlrpc:"datacenter_id"`
	Name string `xmlrpc:"name"`
	Size int    `xmlrpc:"size"`
}

type Driver

type Driver struct {
	*drivers.BaseDriver
	ApiKey     string
	Url        string
	VmID       int
	Image      string
	IPAddress  string
	Datacenter string
	Memory     int
	Core       int

	CaCertPath     string
	PrivateKeyPath string
	SSHUser        string
	SSHPort        int
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(hostName, storePath string) *Driver

func (*Driver) Create

func (d *Driver) Create() error

func (*Driver) DriverName

func (d *Driver) DriverName() string

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)

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

type ImageFilter

type ImageFilter struct {
	Name string `xmlrpc:"label"`
	DcId int    `xmlrpc:"datacenter_id"`
}

type ImageInfo

type ImageInfo struct {
	Id     int    `xmlrpc:"id"`
	Name   string `xmlrpc:"label"`
	Size   int    `xmlrpc:"size"`
	Kernel string `xmlrpc:"kernel_version"`
	DiskId int    `xmlrpc:"disk_id"`
}

type IpAddressInfo

type IpAddressInfo struct {
	Id      int    `xmlrpc:"id"`
	Version int    `xmlrpc:"version"`
	Ip      string `xmlrpc:"ip"`
}

type KeyInfo

type KeyInfo struct {
	Id   int    `xmlrpc:"id"`
	Name string `xmlrpc:"name"`
}

type NetworkInterfaceInfo

type NetworkInterfaceInfo struct {
	Id   int             `xmlrpc:"id"`
	Type string          `xmlrpc:"type"`
	Ips  []IpAddressInfo `xmlrpc:"ips"`
}

type OperationInfo

type OperationInfo struct {
	Id     int    `xmlrpc:"id"`
	Status string `xmlrpc:"step"`
}

type VmCreateRequest

type VmCreateRequest struct {
	DcId       int    `xmlrpc:"datacenter_id"`
	Hostname   string `xmlrpc:"hostname"`
	Memory     int    `xmlrpc:"memory"`
	Cores      int    `xmlrpc:"cores"`
	IpVersion  int    `xmlrpc:"ip_version"`
	SshKey     string `xmlrpc:"ssh_key"`
	RunCommand string `xmlrpc:"run"`
}

type VmInfo

type VmInfo struct {
	Id                int                    `xmlrpc:"id"`
	DcId              int                    `xmlrpc:"datacenter_id"`
	Hostname          string                 `xmlrpc:"hostname"`
	State             string                 `xmlrpc:"state"`
	NetworkInterfaces []NetworkInterfaceInfo `xmlrpc:"ifaces"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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