abiquo

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

README

Docker Machine Driver for Abiquo

This is a driver for Docker Machine, enabling it to create Docker hosts on Abiquo based clouds.

Requirements

Installation

Download the binary from follwing link and put it within your PATH (ex. /usr/local/bin)

https://github.com/abiquo/docker-machine-driver-abiquo/releases/latest

Usage

Run docker-machine create without options to get the list of available parameters

$ docker-machine create -d abiquo
Usage: docker-machine create [OPTIONS] [arg...]

Create a machine

Description:
   Run 'docker-machine create --driver name' to include the create flags for that driver in the help text.

Options:

   --abiquo-access-token                              Abiquo API OAuth access token [$ABIQUO_API_ACCESS_TOKEN]
   --abiquo-access-token-secret                       Abiquo API OAuth access token [$ABIQUO_API_ACCESS_TOKEN_SECRET]
   --abiquo-api-insecure                              Abiquo API SSL verification [$ABIQUO_API_INSECURE]
   --abiquo-api-password                              Abiquo API password [$ABIQUO_API_PASSWORD]
   --abiquo-api-url                                   Abiquo API URL [$ABIQUO_API_URL]
   --abiquo-api-username                              Abiquo API username [$ABIQUO_API_USERNAME]
   --abiquo-app-key                                   Abiquo API OAuth app key [$ABIQUO_API_APP_KEY]
   --abiquo-app-secret                                Abiquo API OAuth app secret [$ABIQUO_API_APP_SECRET]
   --abiquo-cpus "1"                                  CPUs for the VM
   --abiquo-disk-controller                           Disk controller subtype to use in VM
   --abiquo-disk-controller-type                      Disk controller to use in VM [IDE, SCSI, VIRTIO]
   --abiquo-disk-size "0"                             Additional harddisk size in MB
   --abiquo-disk-tier                                 Disk tier to use for VM's disks
   --abiquo-hwprofile                                 Hardware profile for the VM
   --abiquo-network                                   Abiquo Network name
   --abiquo-public-ip                                 Attach a public IP to the VM.
   --abiquo-ram "1024"                                RAM in MB for the VM
   --abiquo-ssh-key                                   Path to the SSH key file to use for SSH access
   --abiquo-ssh-user                                  User name for SSH access
   --abiquo-template-name                             Template name
   --abiquo-user-data                                 User Data to inject to VM
   --abiquo-vapp "Docker Machine"                     Abiquo Virtualappliance
   --abiquo-vdc                                       Abiquo VirtualDatacenter

License and Authors

Copyright:: 2014, Abiquo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

View Source
const Version string = "v0.0.11"

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

Types

type Driver

type Driver struct {
	*drivers.BaseDriver
	Id       string
	ApiURL   string
	Insecure bool

	ApiUser           string
	ApiPass           string
	AppKey            string
	AppSecret         string
	AccessToken       string
	AccessTokenSecret string

	TemplateName      string
	VirtualDatacenter string
	VirtualAppliance  string
	NetworkName       string
	PublicIp          bool
	Cpus              int
	Ram               int
	HardwareProfile   string
	UserData          string

	DiskController     string
	DiskControllerType string
	DiskTier           string
	DiskSize           int

	Debug        bool
	DebugLogFile string
}

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)

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

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

PreCreate 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