Coder Social home page Coder Social logo

iq-scm / proxmox-init Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libersoft/proxmox-init

0.0 0.0 0.0 574 KB

Python script to deploy GNU/Linux cloud images, cloud-style, on Proxmox KVM. This is only a proof of concept, check https://github.com/LordGaav/proxmox-deploy or https://github.com/lgaggini/spartacus.

Home Page: https://libersoft.github.io/proxmox-init/

Python 100.00%

proxmox-init's Introduction

proxmox-init

Python script to deploy GNU/Linux cloud images (tested with Ubuntu), cloud-style, on Proxmox KVM. Based on Proxmox API Python (proxmoxer) and cloud-init. Hardware templating of KVM instances is possible by flavors configuration file (inspired by OpenStack flavors). Only local storage support, both directory and LVM Group. Cloud-init is linked to Qemu-KVM machines by [NoCloud datasource] (http://cloudinit.readthedocs.org/en/latest/topics/datasources.html#no-cloud).

Installation

$ git clone https://github.com/libersoft/proxmox-init.git proxmox-init
$ cd proxmox-init
$ pip install requirements.txt

You need also to install genisoimage, needed to create the cloudinit seed datasource.

Configuration

You have to copy proxmox settings from settings/settings.py.dist to settings/settings.py and edit it to reflect your current proxmox configuration.

You can add and modify your hardware flavors in flavors/. In this case you have also to update choices for --flavor cmdline switch in the main script.

You have to copy instance configuration from settings/instance.py.dist to settings/instance.py and edit it to reflect your need.

Current format for configuration is quite rough and not very flexible.

The script assumes you have your ssh key in the authorized_keys of the proxmox node, for the user specified in the settings file.

Usage

usage: proxvm-deploy.py [-h] --vmid VMID --name NAME [--flavor {micro,small}]
                    [--storage {dir,lvm}]

Create a proxmox kvm and cloudinit it.

optional arguments:
    -h, --help            show this help message and exit
    --vmid VMID, -v VMID  Virtual machine id
    --name NAME, -n NAME  Virtual machine name/hostname
    --flavor {micro,small}, -f {micro,small}
                    Virtual machine flavor
    --storage {dir,lvm}, -s {dir,lvm}
                    Virtual machine storage backend

Status

Rough working proof of concept.

Possible Improvements

  • Puppet and chef section in cloudinit template.
  • Ansible-pull launch on instance customization.
  • Support to proxmox remote storage.
  • Settings refactoring, especially network interfaces
  • Extend cmdline arguments to choose base os image, proxmox node, proxmox host anb other.
  • Code reorganization

Random Ideas and maybe

  • Proxmox KVM Ansible module ?

License

Gnu General Public License 3.0

Credits

proxmox-init's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.