GithubHelp home page GithubHelp logo

hibiki31 / virty Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 3.0 27.89 MB

Web interface of Libvirt-API for easy deployment.

Dockerfile 0.22% Python 45.68% JavaScript 2.30% HTML 17.58% Shell 0.05% Vue 34.07% Mako 0.10%

virty's Introduction

Virty

Docker Image CI Docker publish api

KVM management web application for low cost and immediate deployment. Manage nodes with SSH access using Libvirt-API, Ansible, etc.

Nodes are Linux with SSH connectivity and provisioning can be done through the UI.

Disclaimer

The author is not responsible for any damage caused by the use of this software.

Quick Start

Nothing needs to be edited. Start with Docker-compose and connect to localhost:8765.

mkdir virty
cd virty
wget https://raw.githubusercontent.com/hibiki31/virty/master/docker-compose.example.yml
mv docker-compose.example.yml docker-compose.yml
docker-compose up -d

Preparation of managed nodes

Select the text editor to use (optional).

sudo update-alternatives --config editor

Grant sudo privileges without password to the user connecting to SSH.

sudo visudo
-- end --
username ALL=(ALL) NOPASSWD: ALL

Use public key authentication. The key registered here will be added on the dashboard.

ssh-copy-id user@host

Open vSwitch (Optional)

Configuration

name value
Bridge name ovs-br0
Physical interface eth0
Native VLAN 100
VLAN to configure IP 200
IP 192.168.200.1

Package (Ubuntu)

sudo apt update
sudo apt install openvswitch-common openvswitch-switch
sudo systemctl status openvswitch-switch.service

Package (CentOS)

yum install -y openvswitch python-openvswitch
systemctl start openvswitch
systemctl enable openvswitch

Creating Bridges

ovs-vsctl add-br ovs-br0
ovs-vsctl add-port ovs-br0 eth0
ovs-vsctl set port ovs-br0 tag=200
ovs-vsctl set port eth0 tag=100 vlan_mode=native-untagged
ovs-vsctl show

Configure IP (Ubuntu)

network:
  ethernets:
    eth0:
      dhcp4: false
    ovs-br0:
      dhcp4: false
      addresses:
        - 192.168.200.1/24
      gateway4: 192.168.200.254
      nameservers:
        addresses: [ 192.168.200.254 ]
  version: 2

Backup

docker-compose exec db pg_dump -U postgres mydatabase > virty_db_`date -Iseconds`.dump

virty's People

Contributors

hibiki31 avatar dependabot[bot] avatar

Stargazers

 avatar yukamoja avatar reishoku avatar Mark CH avatar Ryosuke Iwadate avatar Kohei Kanda avatar Masanori Tani avatar Tomoyuki KOYAMA avatar パン太 avatar t-umeda avatar  avatar ASID avatar  avatar  avatar Shotaro Koshoji avatar しお avatar Takahiro INAGAKI avatar

Watchers

 avatar  avatar

virty's Issues

UIリファクタリング

VM一覧

https://virty-dev.hinagiku.me/vms

  • API 電源ON, OFF実装
  • New 一覧から直接コンソールを開く

VM詳細

  • API 電源ON, OFF実装
  • New 一覧から直接コンソールを開く

参考

コンソールの開き方は、以下のURLにVMのUUIDを埋め込み別タブで開くだけ

/novnc/vnc.html?resize=remote&autoconnect=true&path=novnc/websockify?token=${VMのUUID}

Next.js移行に伴うAPIの修正

新UI(Next.js)では、OpenAPI Generatorを用いてAPIを叩いている。
それに伴い使用するAPIにはOpenAPIの定義を記述して欲しい。
また、今後必要な機能などがあればコメントに追加するので対応して欲しい。

UI修正

  • vm作成時のネットワークが削除できない
  • vmのdescribe画面からownerの変更が出来ると直感的
  • vmのlistのタイルの背景色明るく

Documentation

Hi can you please share some documentation for the web ui to setup basic nodes volumes network images etc everything so that we can i can get started with it i am having trouble adding the nodes and everything i started the application using these commands but now i am stuck, i am not able to do anything, can you please guide me please please please please please, i sued this commadn mkdir virty
cd virty
wget https://raw.githubusercontent.com/hibiki31/virty/master/docker-compose.example.yml
mv docker-compose.example.yml docker-compose.yml
docker-compose up -d adn i am doing it on a digital ocean droplet

Thank you in advance

[VM作成ダイアログ] OVSタイプ以外でもポート選択が表示されている

VM作成時にNICを指定するが、OVSタイプ以外はポートが存在しない。
OVSタイプ以外はnullを指定する。

image

 {
    "name": "vbr-7a2fda",
    "uuid": "80daed44-0ca7-45fc-9166-888fbf618c5f",
    "type": "route",
    "dhcp": null,
    "description": null,
    "active": null,
    "bridge": "vbr-7a2fda",
    "autoStart": null,
    "portgroups": [],
    "nodeName": "test-r640-01",
    "updateToken": "1699456173.843766"
  },

タスクモデルの修正

タスクの最終更新日時が欲しい。
カラム名はpostTimeに合わせてupdatedTimeとか。
また、タスクを実行していない場合のrunTimenullが望ましい。

関連issue

#63

ログインしたユーザが所属しているVMだけを表示する機能が欲しい

VMを作るときは1)VM作成者(ログインしてるユーザ), 2)VM作成者が所属しているグループのタグをつけ、VMの一覧取得時にはログインしているユーザが所属しているグループのタグがついたVMだけを表示するみたいなのを考えている。

作るグループは↓みたいなのを想定

  • admin
  • yamato
  • seccamp

ユーザごとに権限が必要かもしれないが今は考えていない(面倒なので)

UI改善点

  • 詳細ページで電源管理できない
  • アンマウントボタン作る
  • ログイン画面のログアウト消す

VMの削除ができない

VMを削除するボタンを押したが一向に終わらないので、別タブを開いてTaskをみたら以下のエラー文が出ていた。

Requested operation is not valid: Refusing to undefine while domain managed save image exists

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.