CloseStack
is a simple libvirt http wrapper. Written in Django.
CloseStack
allows you to manage KVM vms by HTTP API. It is suitable for the following scenarios:
- Single Host Machine
- Multiple Host Machines, but you do not want to deploy OpenStack
- Simple VM Lifecycle(create, destroy, undefine only)
- CentOS 7(other linux distros may work too)
- Python 3.6+
- Django 2.0+
- uwsgi 2.0
- jsonschema 2.6.0+
- libvirt-python 4.3.0+
- uhashring 1.1+
Let's use Centos 7 as an example. (please help us to test on Ubuntu or other linux distros)
To install libvirt-python, we should install libvirt-devel and python-devel fisrt:
yum install -y libvirt-devel python-devel
Then download codes and install requirements(venv is recommended, and make sure all the following steps are executed in venv):
git clone https://github.com/pyajs/closestack.git
cd closestack
pip install -r requirements.txt
Install uwsgi:
pip install uwsgi
Modify configs in config.py
(instruction included) and uwsgi.ini
file.
Start the server with command:
uwsgi uwsgi.ini