Skip to content

Commit

Permalink
Merge pull request #25 from vultr/rancher-machine
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees authored Jun 27, 2023
2 parents 970411f + 161daf3 commit af4a18e
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 968 deletions.
64 changes: 37 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,32 @@ docker-machine create -d vultr --vultr-api-key=<vultr-api-key> --engine-install-

### Options

| Argument | Env | Default | Description
| --- | --- | --- | ---
| `vultr-api-key` | `VULTR_API_KEY` | None | **required** Vultr API key (see [here](https://www.vultr.com/api/#overview))
| `vultr-server-type` | `VULTR_SERVER_TYPE` | `1` | Vultr Server Type ( 1-SSD, 2-BareMetal, 3-DedicatedCloud)
| `vultr-dc-id` | `VULTR_DC_ID` | `1` (New Jersey) | VPS DCID (Region) (see [here](https://www.vultr.com/api/#regions))
| `vultr-vps-plan-id` | `VULTR_VPS_PLAN_ID` | `201` (1024 MB RAM,25 GB SSD,1.00 TB BW) | VPS Plan ID (see [here](https://www.vultr.com/api/#plans))
| `vultr-os-id` | `VULTR_OS_ID` | `270` (Ubuntu 18.04 x64) | VPS Operating System ID (see [here](https://www.vultr.com/api/#os))
| `vultr-ipxe-chain-url` | `VULTR_IPXE_CHAIN_URL` | None | (optional) If you've selected the 'custom' operating system, this can be set to chainload the specified URL on bootup, via iPXE
| `vultr-iso-id` | `VULTR_ISO_ID` | None | (optional) If you've selected the 'custom' operating system, this is the ID of a specific ISO to mount during the deployment
| `vultr-script-id` | `VULTR_SCRIPT_ID` | None | (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-id` | `VULTR_SNAPSHOT_ID` | None | (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-id` | `VULTR_APP_ID` | None | (optional) If launching an application (OSID 186), this is the APPID to launch
| `vultr-reserved-ip-v4` | `VULTR_RESERVED_IP_V4` | None | (optional) IP address of the floating IP to use as the main IP of this server
| `vultr-ip-v6` | `VULTR_IP_V6` | None | (optional) If true, an IPv6 subnet will be assigned to the machine (where available)
| `vultr-auto-backups` | `VULTR_AUTO_BACKUPS` | None | (optional) If true, automatic backups will be enabled for this server (these have an extra charge associated with them)
| `vultr-private-network` | `VULTR_PRIVATE_NETWORK` | None | (optional) If true, private networking support will be added to the new server
| `vultr-network-id` | `VULTR_NETWORK_ID` | None | (optional) List of private networks to attach to this server. Use either this field or enable_private_network, not both
| `vultr-notify-activate` | `VULTR_NOTIFY_ACTIVATE` | None | (optional) If true, an activation email will be sent when the server is ready
| `vultr-ddos-protection` | `VULTR_DDOS_PROTECTION` | None | (optional) If true, DDOS protection will be enabled on the subscription (there is an additional charge for this)
| `vultr-userdata` | `VULTR_USERDATA` | None | (optional) Base64 encoded user-data
| `vultr-label` | `VULTR_LABEL` | None | (optional) This is a text label that will be shown in the control panel
| `vultr-hostname` | `VULTR_HOSTNAME` | None | (optional) The hostname to assign to this server
| `vultr-tag` | `VULTR_TAG` | None | (optional) The tag to assign to this server
| Argument | Env | Default | Description
|---------------------------|---------------------------| --- | ---
| `vultr-api-key` | `VULTR_API_KEY` | None | **required** Vultr API key (see [here](https://www.vultr.com/api/#overview))
| `vultr-server-type` | `VULTR_SERVER_TYPE` | `1` | Vultr Server Type ( 1-SSD, 2-BareMetal, 3-DedicatedCloud)
| `vultr-region` | `VULTR_REGION` | `1` (New Jersey) | VPS DCID (Region) (see [here](https://www.vultr.com/api/#regions))
| `vultr-vps-plan-id` | `VULTR_VPS_PLAN_ID` | `201` (1024 MB RAM,25 GB SSD,1.00 TB BW) | VPS Plan ID (see [here](https://www.vultr.com/api/#plans))
| `vultr-os-id` | `VULTR_OS_ID` | `270` (Ubuntu 18.04 x64) | VPS Operating System ID (see [here](https://www.vultr.com/api/#os))
| `vultr-ipxe-chain-url` | `VULTR_IPXE_CHAIN_URL` | None | (optional) If you've selected the 'custom' operating system, this can be set to chainload the specified URL on bootup, via iPXE
| `vultr-iso-id` | `VULTR_ISO_ID` | None | (optional) If you've selected the 'custom' operating system, this is the ID of a specific ISO to mount during the deployment
| `vultr-script-id` | `VULTR_SCRIPT_ID` | None | (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-id` | `VULTR_SNAPSHOT_ID` | None | (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-id` | `VULTR_APP_ID` | None | (optional) If launching an application (OSID 186), this is the APPID to launch
| `vultr-reserved-ip-v4` | `VULTR_RESERVED_IP_V4` | None | (optional) IP address of the floating IP to use as the main IP of this server
| `vultr-ip-v6` | `VULTR_IP_V6` | None | (optional) If true, an IPv6 subnet will be assigned to the machine (where available)
| `vultr-auto-backups` | `VULTR_AUTO_BACKUPS` | None | (optional) If true, automatic backups will be enabled for this server (these have an extra charge associated with them)
| `vultr-private-network` | `VULTR_PRIVATE_NETWORK` | None | (optional) If true, private networking support will be added to the new server
| `vultr-network-id` | `VULTR_NETWORK_ID` | None | (optional) List of private networks to attach to this server. Use either this field or enable_private_network, not both
| `vultr-notify-activate` | `VULTR_NOTIFY_ACTIVATE` | None | (optional) If true, an activation email will be sent when the server is ready
| `vultr-ddos-protection` | `VULTR_DDOS_PROTECTION` | None | (optional) If true, DDOS protection will be enabled on the subscription (there is an additional charge for this)
| `vultr-userdata` | `VULTR_USERDATA` | None | (optional) Base64 encoded user-data
| `vultr-label` | `VULTR_LABEL` | None | (optional) This is a text label that will be shown in the control panel
| `vultr-hostname` | `VULTR_HOSTNAME` | None | (optional) The hostname to assign to this server
| `vultr-tag` | `VULTR_TAG` | None | (optional) The tag to assign to this server
| `vultr-firewall-group-id` | `VULTR_FIREWALL_GROUP_ID` | None | (optional) The firewall group to assign to this server
| `vultr-sshkey-id` | `VULTR_SSHKEY_ID` | None | (optional) List of SSH keys to apply to this server on install (only valid for Linux/FreeBSD)
| `vultr-docker-port` | `VULTR_DOCKER_PORT` | `2376` | (optional) Vultr Docker port
| `vultr-ssh-port` | `VULTR_SSH_PORT` | `22` | (optional) SSH Port
| `vultr-ssh-user` | `VULTR_SSH_USER` | `root` | (optional) SSH User
| `vultr-sshkey-id` | `VULTR_SSHKEY_ID` | None | (optional) List of SSH keys to apply to this server on install (only valid for Linux/FreeBSD)


## Debugging

Expand Down Expand Up @@ -105,3 +103,15 @@ 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





25 changes: 14 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
module github.com/vultr/docker-machine-driver-vultr

go 1.13
go 1.20

replace github.com/docker/docker => github.com/docker/engine v1.4.2-0.20190717161051-705d9623b7c1
require (
github.com/docker/machine v0.16.2
github.com/rancher/machine v0.13.0
github.com/sirupsen/logrus v1.9.0
github.com/vultr/govultr/v2 v2.17.2
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/machine v0.16.2
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cast v1.5.0
github.com/vultr/govultr/v2 v2.17.2
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/moby/term v0.5.0 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 // indirect
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gotest.tools v2.2.0+incompatible // indirect
)
Loading

0 comments on commit af4a18e

Please sign in to comment.