vultr

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2016 License: MIT Imports: 14 Imported by: 0

README

Docker Machine driver plugin for Vultr

Latest Version Github All Releases CircleCI License

Provision Vultr cloud instances using the docker-machine command line tool.

Installation

Requirement: Docker Machine >= 0.5.1

Download the docker-machine-driver-vultr 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-vultr).

Usage instructions

Grab your API key from the Vultr control panel and pass that to docker-machine create with the --vultr-api-key option.

Example for creating a new machine running RancherOS:

docker-machine create --driver vultr --vultr-api-key=abc123 rancheros-machine

Example for creating a new machine running Ubuntu 14.04:

docker-machine create --driver vultr --vultr-api-key=abc123 --vultr-os-id=160 ubuntu-machine

Command line flags:

  • --vultr-api-key: required Your Vultr API key.
  • --vultr-ssh-user: SSH username.
  • --vultr-region-id: Region the VPS will be created in (DCID). See available Region IDs.
  • --vultr-plan-id: Plan to use for this VPS (VPSPLANID). See available Plan IDs.
  • --vultr-os-id: Operating system ID to use (OSID). See available OS IDs.
  • --vultr-ros-version: RancherOS version to use if an OSID was not specified (e.g. 'v0.6.0', 'latest').
  • --vultr-pxe-script: PXE boot script ID. Requires the 'custom OS' ('--vultr-os-id=159')
  • --vultr-ssh-key-id: Use an existing SSH key in your Vultr account instead of generating a new one.
  • --vultr-ipv6: Enable IPv6 support for the VPS.
  • --vultr-private-networking: Enable private networking support for the VPS.
  • --vultr-backups: Enable automatic backups for the VPS.
  • --vultr-userdata: Path to file with cloud-init user-data.

If the OS ID is not specified, the driver defaults to using RancherOS as operating system for the instance. A particular RancherOS version can be selected using the --vultr-ros-version flag.

PXE deployment

You can boot a custom OS using a PXE boot script that you created in your Vultr account panel by supplying it's ID with the --vultr-pxe-script flag and setting --vultr-os-id to 159. The operating system must support Cloud-init and be configured to use the ec2 datasource type.

Environment variables and default values:

CLI option Environment variable Default
--vultr-api-key VULTR_API_KEY -
--vultr-ssh-user VULTR_SSH_USER root
--vultr-region-id VULTR_REGION 1 (New Jersey)
--vultr-plan-id VULTR_PLAN 29 (768 MB RAM,15 GB SSD)
--vultr-os-id VULTR_OS -
--vultr-ros-version VULTR_ROS_VERSION v0.5.0
--vultr-pxe-script VULTR_PXE_SCRIPT -
--vultr-ssh-key-id VULTR_SSH_KEY -
--vultr-ipv6 VULTR_IPV6 false
--vultr-private-networking VULTR_PRIVATE_NETWORKING false
--vultr-backups VULTR_BACKUPS false
--vultr-userdata VULTR_USERDATA -
Find available plans for all Vultr locations

Check out vultr-status.appspot.com for a live listing of the available plans per region. Get the applicable --vultr-region-id and --vultr-plan-id parameters with the click of a button.

vultr-status website

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
	APIKey            string
	MachineID         string
	PrivateIP         string
	OSID              int
	RegionID          int
	PlanID            int
	SSHKeyID          string
	VultrPublicKey    string
	ROSVersion        string
	IPv6              bool
	Backups           bool
	PrivateNetworking bool
	ScriptID          int
	HasCustomScript   bool
	UserDataFile      string
	// 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

DriverName returns the name of the driver

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) GetSSHKeyPath added in v1.1.0

func (d *Driver) GetSSHKeyPath() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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