GithubHelp home page GithubHelp logo

pycloudplatform's Introduction

ANNOUNCEMENT

I am planning to get this project to be part of the Hacktoberfest event coming soon next month. There is no particular order of things to add/achieve, but priority is given to:

  • Improve code quality (it is so bad that I refuse to acknowledge that I made this)
  • Add all missing features outlined below as they have been ready for months and I don't even have time to even make it working in here lol.
  • User auditing
  • Caching (using Redis/Memcached)
  • Ability to run background processes (you can create VMs while editing settings kinda way)
  • "Development" mode (where you can use the platform without logged in

Contributors are welcome, feel free to ask questions on the issue tracker of this project if you have any questions!

IMPORTANT

This repository is still in progress on importing to GitHub and refining to remove all hardcoded entries to make it environment-agnostic. Using this repository requires ZFS to be installed due to the way the program is developed.

pycloudplatform

Simple libvirt web frontend for deploying VMs. Code is tested to be working on Python 3.7, libvirt 4.0, ZFS 0.7.9 and Ubuntu 18.04. More OS support is planned for future expansion.

What is this project?

It is part of my final year project to develop a web-based virtual machine management that interacts with libvirt library.

But why? There's so many alternatives like VMware ESXi/Proxmox/VirtualBox/VMware Workstation/Virtual Machine Manager/<insert your hypervisor here>

  • It is for my final year project (I don't have any extra ideas I can do lol)
  • I love using libvirt and KVM, but command line is a bit eh...
  • Most hypervisors require you to have a desktop environments (except VMware ESXi)
  • virsh is good, but then, command line (read point 2)
  • I need a project that I really need to make it work (too many dead projects that never seen the light)

How to run it?

  • Install Python >=3.7
  • Make sure ZFS is installed and zfs-pool-ubuntu/kvm-images dataset exist
  • sudo apt install libvirt-bin virtinst bridge-utils libosinfo-bin libguestfs-tools virt-top python3.7-dev libvirt-dev
  • git clone this project
  • cd into the folder
  • create a virtualenv with Python 3.7 version
  • pip install -r requirements.txt
  • set up MySQL server, create necessary users, database (name of database has to be pycloudplatform and allow full permissions for the user to that database
  • copy instance/config.example.py to instance/config.py and modify based on the instructions given in the file
  • flask db init
  • flask db migrate
  • flask db upgrade
  • export FLASK_CONFIG=development
  • python run.py

Implementation state

Implemented features

  • Creating virtual machines (from template/snapshot only)
  • Starting virtual machines
  • Power off virtual machines
  • Shut down virtual machines
  • Snapshot virtual machines (through ZFS snapshot and requires VM to be powered off)

Planned features

  • Cloud-Init support
  • Hot-add and hot-remove vCPU and RAM
  • Live resize virtual disks (only upsizing, downsizing is tricky to set up)
  • Add in additional storage methods (rather than being hard-coded to ZFS only)
  • Add more hypervisor support

Missing features

  • Custom virtual machine creation (requires user to manually deploy VMs)
  • libvirt-based VM snapshot
  • Tons of things I can't think of right now

TODO

  • Unspaghetti the code (it's really bad)
  • Remove all hard-coding especially on the storage side
  • Improve code naming and organization
  • DOCUMENTATION
  • Refactor the code to assume standard storage (ext4-based virtual disks)
  • <insert yet to be seen features that I can't think of>

Known issues

  • Installation steps are incomplete. This will be fixed after most of the hardcoding has been eliminated
  • VM operations has a significant delay because all operations are synchronous

License

MIT

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.