项目作者: subuk

项目描述 :
Your own personal IaaS cloud
高级语言: JavaScript
项目地址: git://github.com/subuk/vmango.git
创建时间: 2015-09-09T07:19:55Z
项目社区:https://github.com/subuk/vmango

开源协议:MIT License

下载


vmango

Vmango is a virtual machines management web interface written using Go.

The main goal of project is not to provide a hypervisor configuration tool,
because that problem already solved by many configuration management systems
like Ansible or Puppet, but provide a convenient way to manage virtual
machines on existing hypervisors.

Current features:

  • SSH keys management and injection
  • Volume management
  • KVM machines via libvirt
  • Web console
  • Support for cloud OS images (with cloud-init installed)
  • Custom userdata for cloud-init
  • Bridged network

Installation

There are two RPM repositories:

  • vmango for the latest tagged release, it may be considered stable
  • vmango-devel contains packages built automatically from the latest commit in master branch

CentOS 7 and 8

  1. Enable copr reposotory, use subuk/vmango-devel for the latest version, subuk/vmango for stable
  2. Install package
  3. Edit configuration file /etc/vmango.conf
  4. Start and enable systemd service vmango
  1. yum install -y yum-plugin-copr && yum copr -y enable subuk/vmango
  2. yum install -y vmango
  3. systemctl enable --now vmango

Ubuntu 18.04

  1. Follow instructions on vmango or vmango-devel ppa page https://launchpad.net/~subuk/+archive/ubuntu/vmango
  2. Install package
  3. Edit configuration file /etc/vmango.conf
  1. sudo add-apt-repository ppa:subuk/vmango
  2. sudo apt-get install vmango

Hypervisor configuration

Install libvirt and qemu-kvm.

Ubuntu:

  1. sudo apt-get install libvirt-bin qemu-kvm qemu-system

Centos:

  1. yum install -y libvirt qemu-kvm
  2. systemctl enable --now libvirtd

Allow your user to access libvirt socket:

  1. sudo usermod -aG libvirtd [username]
  2. newgrp libvirtd

Download vm images to default libvirt pool location:

  1. cd /var/lib/libvirt/images/
  2. wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1901.qcow2
  3. wget https://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img

Define default volume pool (if not exists) and start it:

  1. virsh pool-define-as default dir --target /var/lib/libvirt/images/
  2. virsh pool-start default
  3. virsh pool-autostart default

Local run

Copy vmango.dist.conf to vmango.conf and change configuration if needed.

Run app

  1. make && ./bin/vmango web

View it on http://localhost:8080 (login with admin / admin by default)

Dependencies for Ubuntu 14.04+

Install libvirt and kvm

  1. sudo apt-get install libvirt-dev libvirt-bin qemu-kvm qemu-system genisoimage

Install Go compiler.
Configure libvirt as described above.
Now you can use your own computer as hypervisor.

Dependencies for MacOS

Install Go compiler, libvirt C library and mkisofs util (for configdrive creation)

  1. brew install go
  2. brew install libvirt
  3. brew install dvdrtools

You need a linux hypervisor somewhere in the world, because libvirt doesn’t support MacOS.
Make sure to add ?socket option to remote libvirt urls.

Build RPM

With docker for Centos 7:

  1. ./dockerbuild.sh centos-7 make rpm

Locally:

  1. make rpm

Build DEB

With docker for Ubuntu 18.04:

  1. ./dockerbuild.sh ubuntu-1804 make deb

Locally:

  1. make deb