Skip to content

NEXETLLC/webvirtbackend

 
 

Repository files navigation

WebVirtBackend

WebVirtBackend is an open-source Django-based backend for managing virtual machines in a KVM (Kernel-based Virtual Machine) environment. It is designed to be used with WebVirtCloud, a web interface for managing virtual machines. This project is packaged as a Docker Compose environment for easy deployment.

Getting Started

Prerequisites

  • Docker
  • Docker Compose

Installation

  1. Clone the repository
git clone https://github.com/webvirtcloud/webvirtbackend.git
  1. Change into the cloned directory:
cd webvirtbackend
  1. Build the Docker image:
docker compose build
  1. Run the Docker container:
docker compose up -d
  1. Run the database migrations:
docker compose exec backend python3 manage.py migrate
  1. Load the initial data:
docker compose exec backend python3 manage.py loaddata initial_data
  1. Access the admin site:

Open your web browser and go to http://localhost:8000/admin. You can log in with the following credentials:

  • Username: admin@webvirt.cloud
  • Password: admin

Settings

You can configure the backend by editing the webvirtcloud/settings/local.py file for modifying the default settings. The default settings are defined in webvirtcloud/settings/base.py.

Development

Load the test user:

docker compose exec backend python3 manage.py loaddata account/fixtures/user.json

Swagger

The Swagger API documentation is available at http://localhost:8000/swagger/.

Credntials

The API endpoints are available at http://localhost:8000/api/. You can use them to create, delete, and manage virtual machines. You can log in with the following credentials:

  • Username: user@webvirt.cloud
  • Password: 1qaz2wsx
  • Token: fcc69bfad35527d087bf22a8a84a4f6c3b75387877c78ae3050e9e8036ef

Example API requests:

curl -H "Authorization: Bearer fcc69bfad35527d087bf22a8a84a4f6c3b75387877c78ae3050e9e8036ef" http://localhost:8000/api/v1/virtances/

Contributing

If you want to contribute to WebVirtBackend, please read the contributing guidelines first (Coming soon).

License

WebVirtBackend is released under the Apache 2.0 Licence.

About

Backend for WebVirtCloud project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 35.8%
  • JavaScript 34.6%
  • HTML 26.6%
  • CSS 3.0%