pcextreme

package module
v0.0.0-...-12a7539 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: MIT Imports: 14 Imported by: 0

README

docker-machine-driver-pcextreme

CircleCI Go Report Card

A docker-machine driver for the PCextreme Aurora cloud The driver is based on several generic Cloudstack modules as this is what the public API is using.

Installation

Either compile from source:

go get github.com/radriaanse/docker-machine-driver-pcextreme
go install github.com/radriaanse/docker-machine-driver-pcextreme

Or grab the binary release and make sure to place it in your $PATH.

Run the following to make sure everything is installed correctly:

docker-machine create --driver pcextreme

Usage

API credentials can be found in the control panel under 'Aurora Compute' -> 'Users'.

Create a basic machine using defaults:

docker-machine create \
  --driver pcextreme \
  --pcextreme-api-key "<key>"
  --pcextreme-api-secret "<secret>"

With some cloud-init userdata:

docker-machine create \
  --driver pcextreme \
  --pcextreme-api-key "<key>"
  --pcextreme-api-secret "<secret>"
  --pcextreme-service-offering "Stamina 4G"
  --pcextreme-template "Ubuntu 18.04"
  --pcextreme-userdata "./cloud-config"

Use a custom template:

docker-machine create \
  --driver pcextreme \
  --pcextreme-api-key "<key>"
  --pcextreme-api-secret "<secret>"
  --pcextreme-service-offering "Stamina 4G"
  --pcextreme-template "Archlinux 2018.10"

Options

TODO

Acknowledgement

The driver is originally written by @svanharmelen, @atsaki, @andrestc & @dahendel.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

NewDriver creates the driver with it's specified config

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	ID                string
	APIEndpoint       string
	APIURL            string
	APIRegion         string
	APIKey            string
	SecretKey         string
	HTTPGETOnly       bool
	JobTimeOut        int64
	SSHKeyPair        string
	CIDRList          []string
	Template          string
	TemplateID        string
	ServiceOffering   string
	ServiceOfferingID string
	DeleteVolumes     bool
	DiskOffering      string
	DiskOfferingID    string
	DiskSize          int
	Zone              string
	ZoneID            string
	UserDataFile      string
	UserData          string
	Tags              []string
	DisplayName       string
}

Driver implements the libmachine/drivers.Driver interface

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)

GetSSHHostname returns a hostname used for connecting via SSH

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

GetSSHUsername returns an username used for connecting via SSH

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

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