Categorygithub.com/vultr/docker-machine-driver-vultr
module
2.1.0+incompatible
Repository: https://github.com/vultr/docker-machine-driver-vultr.git
Documentation: pkg.go.dev

# README

docker-machine-driver-vultr

Vultr Driver for docker-machine and Rancher Node Driver

Install as a docker-machine driver

docker-machine is required, see the installation documentation.

Then install the docker-machine-driver-vultr driver by copying the build to /usr/local/bin/.

Install as a Rancher Node Driver

Use overlay2 as the storage engine

Installing from source

If you would rather build from source, you will need to have a working go 1.11+ environment,

eval $(go env)
export PATH="$PATH:$GOPATH/bin"
curl -O "https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.11/docker-machine-Linux-x86_64"
cp docker-machine-Linux-x86_64 /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

And then compile the docker-machine-driver-vultr driver:

go get -u github.com/vultr/docker-machine-driver-vultr@latest
cd $GOPATH/src/github.com/vultr/docker-machine-driver-vultr
make install

Run

You will need a Vultr APIv4 Personal API key. Is only available in members area https://my.vultr.com/settings/#settingsapi, you need to create an account (https://www.vultr.com/register/) to get there

You will also need to use the 19.03.9 install enginer as shown in the example below

docker-machine create -d vultr --vultr-api-key=<vultr-api-key> --engine-install-url "https://releases.rancher.com/install-docker/19.03.9.sh" <machine-name>

Options

ArgumentEnvDefaultDescription
vultr-api-keyVULTR_API_KEYNonerequired Vultr API key (see here)
vultr-server-typeVULTR_SERVER_TYPE1Vultr Server Type ( 1-SSD, 2-BareMetal, 3-DedicatedCloud)
vultr-regionVULTR_REGION1 (New Jersey)VPS DCID (Region) (see here)
vultr-vps-plan-idVULTR_VPS_PLAN_ID201 (1024 MB RAM,25 GB SSD,1.00 TB BW)VPS Plan ID (see here)
vultr-os-idVULTR_OS_ID270 (Ubuntu 18.04 x64)VPS Operating System ID (see here)
vultr-ipxe-chain-urlVULTR_IPXE_CHAIN_URLNone(optional) If you've selected the 'custom' operating system, this can be set to chainload the specified URL on bootup, via iPXE
vultr-iso-idVULTR_ISO_IDNone(optional) If you've selected the 'custom' operating system, this is the ID of a specific ISO to mount during the deployment
vultr-script-idVULTR_SCRIPT_IDNone(optional) If you've not selected a 'custom' operating system, this can be the SCRIPTID of a startup script to execute on boot
vultr-snapshot-idVULTR_SNAPSHOT_IDNone(optional) If you've selected the 'snapshot' operating system, this should be the SNAPSHOTID (see v1/snapshot/list) to restore for the initial installation
vultr-app-idVULTR_APP_IDNone(optional) If launching an application (OSID 186), this is the APPID to launch
vultr-reserved-ip-v4VULTR_RESERVED_IP_V4None(optional) IP address of the floating IP to use as the main IP of this server
vultr-ip-v6VULTR_IP_V6None(optional) If true, an IPv6 subnet will be assigned to the machine (where available)
vultr-auto-backupsVULTR_AUTO_BACKUPSNone(optional) If true, automatic backups will be enabled for this server (these have an extra charge associated with them)
vultr-private-networkVULTR_PRIVATE_NETWORKNone(optional) If true, private networking support will be added to the new server
vultr-network-idVULTR_NETWORK_IDNone(optional) List of private networks to attach to this server. Use either this field or enable_private_network, not both
vultr-notify-activateVULTR_NOTIFY_ACTIVATENone(optional) If true, an activation email will be sent when the server is ready
vultr-ddos-protectionVULTR_DDOS_PROTECTIONNone(optional) If true, DDOS protection will be enabled on the subscription (there is an additional charge for this)
vultr-userdataVULTR_USERDATANone(optional) Base64 encoded user-data
vultr-labelVULTR_LABELNone(optional) This is a text label that will be shown in the control panel
vultr-hostnameVULTR_HOSTNAMENone(optional) The hostname to assign to this server
vultr-tagVULTR_TAGNone(optional) The tag to assign to this server
vultr-firewall-group-idVULTR_FIREWALL_GROUP_IDNone(optional) The firewall group to assign to this server
vultr-sshkey-idVULTR_SSHKEY_IDNone(optional) List of SSH keys to apply to this server on install (only valid for Linux/FreeBSD)

Debugging

Detailed run output will be emitted when using the docker-machine --debug option.

docker-machine --debug  create -d vultr --vultr-api-key=<vultr-api-key> machinename

Examples

Simple Example

docker-machine create -d vultr --vultr-api-key=<vultr-api-key> vultr
eval $(docker-machine env vultr)
$ docker-machine ls
NAME      ACTIVE   DRIVER   STATE     URL                         SWARM   DOCKER     ERRORS
vultr     -        vultr    Running   tcp://207.246.87.114:2376           v19.03.5

$ docker-machine rm vultr
About to remove vultr
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Successfully removed vultr

Required Ports

By default, Vultr images have UFW enabled with only port 22 open. The default cloud-init script in this driver completely disables UFW, however, for production environments we recommend only opening specific ports as needed.

The port requirements for Rancher can be found here: https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/installation-requirements/port-requirements

# Packages

No description provided by the author
No description provided by the author