Skip to content

Latest commit

 

History

History
124 lines (83 loc) · 7.08 KB

File metadata and controls

124 lines (83 loc) · 7.08 KB

Docker/Rancher Machine driver for Proxmox VE

This is a Docker/Rancher Machine driver for Proxmox VE.

Demonstration

Click to view the video 👇

YouTube video demonstrating the driver in Rancher

Installation

Rancher

  1. In local cluster explorer (i.e. the cluster where Rancher is deployed) go to Apps > Repositories > Create and create repository with following settings:

    • Name: pve-node-driver
    • Description: Node Driver for Proxmox Virtual Environment
    • Target: http(s) URL to an index generated by Helm
    • Index URL: https://stellatarum.github.io/docker-machine-driver-pve
    • Authentication: None
  2. Go to Extensions > Available and install Proxmox VE Node Driver

  3. Go to Cluster Management > Drivers > Node Drivers > Pve > Edit config and add your Proxmox domain to Whitelist Domains

Rancher in air-gapped environment

  1. Download all required files on your jump machine:

    1. Set a variable with version to download (see releases for available versions):

      export PVE_NODE_DRIVER_VERSION="1.0.0"
    2. Add Helm repository:

      helm repo add pve-node-driver https://stellatarum.github.io/docker-machine-driver-pve
    3. Download the Helm Chart:

      helm pull pve-node-driver/pve-node-driver --version "${PVE_NODE_DRIVER_VERSION}"
    4. Download driver binary:

      wget $(helm show values --jsonpath "{.nodeDriver.url}" "./pve-node-driver-${PVE_NODE_DRIVER_VERSION}.tgz")
    5. Download UI Extension:

      mkdir -p ./ui-extension/plugin \
      && wget --directory-prefix=$PWD/ui-extension $(helm show values --jsonpath "{.uiPlugin.endpoint}" "./pve-node-driver-${PVE_NODE_DRIVER_VERSION}.tgz")/files.txt \
      && wget --directory-prefix=$PWD/ui-extension/plugin --base $(helm show values --jsonpath "{.uiPlugin.endpoint}" "./pve-node-driver-${PVE_NODE_DRIVER_VERSION}.tgz")/ -i $PWD/ui-extension/files.txt
  2. Upload driver binary and UI Extension to a HTTP server within your environment

  3. Install the Helm Chart with following values adjusted:

    nodeDriver:
      url: >-
        <YOUR URL>/docker-machine-driver-pve
    uiPlugin:
      endpoint: >-
        <YOUR URL>/ui-extension

Docker/Rancher Machine

Download docker-machine-driver-pve from latest release and put it in your PATH.

Template requirements

This driver requires a Proxmox VE template with:

  • qemu-guest-agent,
  • cloud-init initialization enabled,
  • empty CD/DVD drive (NOT PVE's CloudInit Drive) on IDE, SATA or SCSI bus,
  • DHCP enabled network interface.

The template must be placed in the same resource pool where the machines will be deployed (i.e. --pve-resource-pool).

You can use sample Ubuntu Server template for development and testing.

Configuration

Flag Environment variable Default value Description
--pve-url PVE_URL N/A (required) Proxmox VE URL (e.g. https://<PROXMOX VE ADDRESS>:8006).
--pve-insecure-tls PVE_INSECURE_TLS false Disables Proxmox VE TLS certificate verification.
--pve-token-id PVE_TOKEN_ID N/A (required) Proxmox VE API Token ID (including username and realm, e.g. root@pam!rancher).
--pve-token-secret PVE_TOKEN_SECRET N/A (required) Proxmox VE API Token secret.
--pve-resource-pool PVE_RESOURCE_POOL N/A (required) Proxmox VE Resource Pool name.
--pve-template PVE_TEMPLATE N/A (required) ID of the Proxmox VE template.
--pve-iso-device PVE_ISO_DEVICE N/A (required) Bus/Device of the CD/DVD Drive to mount cloud-init ISO to (e.g. scsi1).
--pve-network-interface PVE_NETWORK_INTERFACE N/A (required) Bus/Device of the network interface to read machine's IP address from (e.g. net0).
--pve-ssh-user PVE_SSH_USER service Username for the SSH user that will be created via cloud-init.
--pve-ssh-port PVE_SSH_PORT 22 Port to use when connecting to the machine via SSH.
--pve-processor-sockets PVE_PROCESSOR_SOCKETS unset If set, number of processor sockets to configure for the machine.
--pve-processor-cores PVE_PROCESSOR_CORES unset If set, number of processor cores to configure for the machine.
--pve-memory PVE_MEMORY unset 1 If set, amount of memory in MiB to configure for the machine.
--pve-memory-balloon PVE_MEMORY_BALLOON unset 1 If set, minimum amount of memory in MiB to configure for the machine.
If set to 0, disables memory ballooning.

1 - If only one of --pve-memory or --pve-memory-balloon is specified, the other one will automatically be defaulted to the same value except if --pve-memory-balloon is set to 0.

Contributing

See DEVELOPMENT.md for development guidelines.

License

Distributed under the Apache License 2.0. See LICENSE for more information.

Contact

You can contact us by e-mail: contact@stellatarum.com