Skip to main content

proxmox-deploy is cli-based deployment tool for Proxmox

Project description

Use this tool to deploy cloud-init enabled images from various Linux distributions on Proxmox.

Proxmox does not support cloud-init enabled images out of the box. It’s possible to create template from manually installed VMs. However, with the availability of ready to deploy images from most major Linux vendors, why should you install a VM manually?

How it works

cloud-init depends on two things:

  1. A minimal base installation of the distribution, usually in the form of a raw or qcow2 image. I call this a cloud image.

  2. The cloud-init package installed in the image.

cloud-init was originally made for Amazon EC2 and OpenStack. These platforms have native support for cloud-init, and provide a datasource that cloud-init can use to configure the VM. However, there are few alternative datasources available that will work, even if the platform itself has no native support for cloud-init.

proxmox-deploy uses the NoCloud datasource. For this approach, the VM must have a copy of the cloud image as the first disk, and a read-only vfat or iso9660 filesystem as the second disk. On this second disk, there must be two files: user-data and meta-data.

proxmox-deploy takes care of generating the user-data and meta-data files based on user input. proxmox-deploy also takes care of creating a Proxmox VM and uploading the cloud image and cloud-init image into the proper datastore. All that’s left afterwards is turning on the VM.

How to install

All dependencies are installable using pip. To install globally, execute as root:

# pip install proxmox-deploy

Or to install into a virtualenv (as a normal user):

$ virtualenv env
$ . env/bin/activate
$ pip install proxmox-deploy

Make sure to activate your virtualenv before using or upgrading the tool later:

$ . env/bin/activate

To later upgrade it:

$ pip install --upgrade proxmox-deploy

How to use

After installing, simply use:

$ proxmox-deploy --proxmox-host <hostname> --cloud-images-dir <images directory>

And answer the interactive questions.

Tested cloud images

I have tested proxmox-deploy with the following cloud images:

Distribution

Version

Status

Ubuntu

14.04 15.10

The -amd64-disk1.img images work.

Fedora Server

23

The qcow2 image works.

openSUSE

13.2

The -OpenStack-Guest.x86_64.qcow2 image works, provided the VM has at least 512 MB RAM. The minimal disk size is 10 GB. However, the first NIC is called eth1, so make sure to select eth1 to configure. There is no suse user, login as root.

CentOS

6

7

The CentOS 6 image fails to boot, hanging at “Booting from hard disk”.

The CentOS 7 -GenericCloud.qcow2.xz image works. The minimal disk size will be 8G.

Debian

8

Neither the qcow2 nor the raw image works. The first boot results in a kernel panic and subsequent boots won’t run cloud-init, rendering the VM unreachable.

FreeBSD

10.1 cloud

10.1 vm

Does not work, cloudbase-init-bsd has no support for the NoCloud datasource.

The official VM images boot at least, but cloud-init is not available. It will boot with with DHCP and a default user/password.

All distributions provide a default user with the name of the distro (ubuntu, fedora, centos, debian, freebsd), except openSUSE which only has a root user.

Dependencies

  • Proxmox VE 4.1

  • Python 2.7

  • proxmoxer as Proxmox API client

  • openssh-wrapper for communicating with the Proxmox API and executing commands.

  • Jinja2 for generating the user-data and meta-data files.

  • configobj for reading configuration files.

  • pytz for timezone names.

  • genisoimage (Linux) or mkisofs (FreeBSD) command.

Do note that we need to access the Proxmox server via SSH, to perform the various tasks. We also use the pvesh and pvesm commands over SSH to interface with the Proxmox API and datastores respectively. proxmox-deploy will not ask for passwords to login, so a proper SSH agent and SSH key access must be configured before hand.

Changelog

0.2

  • Support for cloud-init Chef handoff (no autorun yet).

  • Improve EnumQuestion output by listing and sorting options.

  • Add option for automatically starting VMs after deployment.

  • Choose defaults for node and storage selection.

  • Support FreeBSD mkisofs command.

0.1

  • Initial release

License

proxmox-deploy is licensed under the GPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxmox-deploy-0.2.tar.gz (17.4 kB view details)

Uploaded Source

Built Distributions

proxmox_deploy-0.2-py2.7.egg (44.0 kB view details)

Uploaded Source

proxmox_deploy-0.2-py2-none-any.whl (26.8 kB view details)

Uploaded Python 2

File details

Details for the file proxmox-deploy-0.2.tar.gz.

File metadata

File hashes

Hashes for proxmox-deploy-0.2.tar.gz
Algorithm Hash digest
SHA256 289109ced6a8d30e3be70c9020dfb25791b1fa5972b65115d99e168a5e3bbb44
MD5 ebe7e66b093eab4db43b043ed45204fe
BLAKE2b-256 595a25814e3514723120ae9fbfff17c9546e9fc28754646bc64a6e0fde7e59dd

See more details on using hashes here.

File details

Details for the file proxmox_deploy-0.2-py2.7.egg.

File metadata

File hashes

Hashes for proxmox_deploy-0.2-py2.7.egg
Algorithm Hash digest
SHA256 9c5ac9e6ec1a0c2c9b80d65bcda2a85151e655337af1f695ac398b701ba5aded
MD5 abe26b3bccd7ed1caf7d01e7b18ccc9f
BLAKE2b-256 0c050a74e1046a42ddf6d0e65ec67ee53fd6684941238af59d83c08c5f0707a6

See more details on using hashes here.

File details

Details for the file proxmox_deploy-0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for proxmox_deploy-0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 699c0781c2c0f6cc2d542c386db96cd2d59d1381e6b1286da81e13a5ac145228
MD5 d8cef23495d01734e6bf0661848050b2
BLAKE2b-256 3e69d0acb2298201e3b41b7b4dfed262244db95777acd65acdacf803b2dfd9f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page