ranchervm

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

README

Docker Machine driver for RancherVM

Latest Version License

Prerequisites

Installation

For Unix systems, run the following command:

NAME=docker-machine-driver-ranchervm && OS=`uname -s` && ARCH=`uname -m` && INSTALLPATH=/usr/local/bin/${NAME} && \
VERSION=`curl -sSfL https://raw.githubusercontent.com/llparse/${NAME}/master/VERSION` && \
curl -sSfL https://github.com/llparse/${NAME}/releases/download/${VERSION}/${NAME}-${OS}-${ARCH} \
  -o /tmp/${NAME} && chmod +x /tmp/${NAME} && sudo mv /tmp/${NAME} ${INSTALLPATH}

For other platforms, download the binary from the release page or build it yourself.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

NewDriver constructs a new RancherVM Driver

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	Endpoint           string
	InsecureSkipVerify bool
	AccessKey          string
	SecretKey          string
	CPU                int
	MemoryMiB          int
	Image              string
	SSHKeyName         string
	SSHKeyDelete       bool
	EnableNoVNC        bool
	NodeName           string

	LonghornBacking        bool
	LonghornVolumeSize     string
	LonghornFrontend       string
	LonghornReplicaCount   int
	LonghornReplicaTimeout int
	// contains filtered or unexported fields
}

Driver is the RancherVM Driver struct

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

func (*Driver) GetCreateFlags

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

GetCreateFlags returns the mcnflag.Flag slice representing the flags that can be set, their descriptions and defaults.

func (*Driver) GetIP

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

GetIP returns an IP or hostname that this host is available at e.g. 1.2.3.4 or docker-host-d60b70a14d3a.cloudapp.net

func (*Driver) GetSSHHostname

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

GetSSHHostname returns hostname 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 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) ResolveStorePath added in v1.0.1

func (d *Driver) ResolveStorePath(file string) string

ResolveStorePath returns a unique or shared store path

func (*Driver) Restart

func (d *Driver) Restart() error

Restart a host. This may just call Stop(); Start() if the provider does not have any special restart behaviour.

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