cloudsigma

package module
v0.0.0-...-212329f Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

README

Docker Machine CloudSigma Driver

Release License Unit Tests Go Report Card

Create Docker machines on CloudSigma.

You need to use your e-mail address as username and password and pass that to docker-machine create with --cloudsigma-username and --cloudsigma-password options.

Usage

$ docker-machine create --driver cloudsigma \
    --cloudsigma-username <YOUR-EMAIL> \
    --cloudsigma-password <YOUR-PASSWORD> \
    MY_COMPUTE_INSTANCE

If you encounter any troubles, activate the debug mode with docker-machine --debug create ....

When explicitly passing environment variables
$ export CLOUDSIGMA_USERNAME=<YOUR-EMAIL>; export CLOUDSIGMA_PASSWORD=<YOUR-PASSWORD>
$ docker-machine create --driver cloudsigma MY_COMPUTE_INSTANCE

Options

  • --cloudsigma-api-location: CloudSigma API location endpoint code.
  • --cloudsigma-cpu: CPU clock speed for the host in MHz.
  • --cloudsigma-cpu-type: CPU type
  • --cloudsigma-drive-name: CloudSigma drive name (latest version will be used).
  • --cloudsigma-drive-size: Drive size for the host in GiB.
  • --cloudsigma-drive-uuid: CloudSigma drive uuid.
  • --cloudsigma-memory: Size of memory for the host in MB.
  • --cloudsigma-password: required Your CloudSigma password.
  • --cloudsigma-ssh-port: SSH port to connect.
  • --cloudsigma-ssh-user: SSH username to connect.
  • --cloudsigma-static-ip: CloudSigma network adapter’s static IP address.
  • --cloudsigma-username: required Your CloudSigma user email.
Environment variables and default values
CLI option Environment variable Default
--cloudsigma-api-location CLOUDSIGMA_API_LOCATION zrh
--cloudsigma-cpu CLOUDSIGMA_CPU 2000
--cloudsigma-cpu-type CLOUDSIGMA_CPU_TYPE -
--cloudsigma-drive-name CLOUDSIGMA_DRIVE_NAME ubuntu
--cloudsigma-drive-size CLOUDSIGMA_DRIVE_SIZE 20
--cloudsigma-drive-uuid CLOUDSIGMA_DRIVE_UUID -
--cloudsigma-memory CLOUDSIGMA_MEMORY 1024
--cloudsigma-password CLOUDSIGMA_PASSWORD -
--cloudsigma-ssh-port CLOUDSIGMA_SSH_PORT 22
--cloudsigma-ssh-user CLOUDSIGMA_SSH_USER cloudsigma
--cloudsigma-static-ip CLOUDSIGMA_STATIC_IP -
--cloudsigma-username CLOUDSIGMA_USERNAME -

Frequently Asked Questions

I get error after restarting the docker machine

If you do not use --cloudsigma-static-ip option, then your machine will become always a new IP address after restarting. You will see something like that by running docker-machine ls command:

$ docker-machine ls
NAME   ACTIVE  DRIVER      STATE    URL                   SWARM    DOCKER    ERRORS
my vm  -       cloudsigma  Running  tcp://185.x.x.x:2376  Unknown  Unable to query docker version: Get https://185.x.x.x:2376/v1.15/version: x509: certificate is valid for 31.x.x.x, not 185.x.x.x

In this case you should regenerate certificates with docker-machine regenerate-certs.

Contributing

We hope you'll get involved! Read our Contributors' Guide for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	APILocation     string
	ClonedDriveUUID string
	CPU             int
	CPUType         string
	DriveName       string
	DriveSize       int
	DriveUUID       string
	Memory          int
	Password        string
	ServerUUID      string
	SSHKeyUUID      string
	StaticIP        string
	Username        string
}

Driver represents a CloudSigma driver type.

func NewDriver

func NewDriver(hostName, storePath string) *Driver

NewDriver creates a CloudSigma driver.

func (*Driver) Create

func (d *Driver) Create() error

Create makes a new host using the driver's config.

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the CloudSigma driver's name.

func (*Driver) GetCreateFlags

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

GetCreateFlags returns the flags that can be set, their descriptions and defaults.

func (*Driver) GetSSHHostname

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

GetSSHHostname returns hostname for use with ssh.

func (*Driver) GetSSHKeyPath

func (d *Driver) GetSSHKeyPath() string

GetSSHKeyPath returns key path for use with 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.

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 deletes a host.

func (*Driver) Restart

func (d *Driver) Restart() error

Restart calls Stop() and Start().

func (*Driver) SetConfigFromFlags

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

SetConfigFromFlags configures the driver with the object returned by RegisterCreateFlags.

func (*Driver) Start

func (d *Driver) Start() error

Start sends 'start' action to start a host.

func (*Driver) Stop

func (d *Driver) Stop() error

Stop sends 'stop' action to 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