kregel/homestead 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kregel/homestead

Composer 安装命令:

composer require kregel/homestead

包简介

A Laravel Nova tool.

关键字:

README 文档

README

Latest Version on Packagist Total Downloads

Have you ever just wanted an interface for managing your virtual machines, and not have it look like it came out of the early 2000s? Look no further. This package aims to satisfy a very very very very small niche portion of hobbyists who both have a Laravel Nova download available, and need to manage virtual machines.

This package does currently support remote management, so assuming you have all the ports open to the server this app is hosted from, and the user you're connecting as has permissions to access all the files, you could host this app on a DigitalOcean server and manage a VM server in your house. 😉

Quick Nav

What's the alternative?

Well, for this specific piece of software, I'm not aware of many alternatives... (They probably exist...)

Virtual machine access via novnc

See other screenshots

Goal

Get very basic create/read/update/delete functionality for just creating new VMs on a host.

  • Create (#1)
  • Read
  • Update
  • Delete
  • Start VMs
  • Stop VMs
  • Force stop VMs
  • Access Via VNC
  • Restart VM
  • SSH remote management
  • SSH private key authentication
  • Password Authentication
  • Multiple hypervisors
  • Custom networking
  • Edit disks of the VM (increase size, change format?)

Bonus:

  • Add pass through devices?
  • Add snapshots? (Looks like it could be possible through libvirt)
  • Tag the VMs with things, and the be able to manage the tags in the UI.
  • Add a way to let the VMs download isos from a remote source.
  • Add a way to manage ISOs so your VMs don't have to reach out to an external server for downloading the ISOs
  • View Guest CPU stats and display those in graphs on the VM's Show page.
  • Test driver LXC - Linux Containers
  • Test driver OpenVZ
  • Test driver QEMU
  • Test driver VirtualBox
  • Test driver VMware ESX
  • Test driver VMware Workstation/Player
  • Test driver Xen
  • Test driver Microsoft Hyper-V
  • Test driver Virtuozzo
  • Test driver Bhyve - The BSD Hypervisor
  • Qcow2 disk encryption for QEMU

Before we begin.

This is just an admin dashboard for hypervisors. A hypervisor control panel if you will. You do not need qemu, or virt-manager on the webserver you serve this from. However, you do need to use the libvirt library that comes with this package. The library built into this package has been patched, and updated to have fewer hidden error messages and fix some bugs.

Installing this package

composer require kregel/nova-homestead

Letting Nova know about it's existence.

// In your app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        // ...
        new \Kregel\Homstead\Homestead(),
    ];
}

Installing libvirt-php.

Pre installation build tools

sudo apt install build-essential autoconf automake libtool bison re2c pkg-config libvirt-dev libxml2-dev xsltproc libxml2-utils libmagickwand-dev

Also, make sure your PHP instance has imagick installed and enabled..

git clone git@github.com:austinkregel/libvirt-php
cd libvirt-php
./autogen.sh
make
sudo make install

Installing a VNC Client

In order to view the output of your VM directly, you'll want to use this VNC client. I have only personally tested this out with novnc on Ubuntu 19.04 for QEMU.

sudo apt update
sudo apt install snapd
sudo snap install novnc

Managing VNC

At the moment, my understanding is that to view a VM's tty session we have to spin up a new instance of novnc to proxy that VM's output to your broswer. At the moment, I'm not sure how to support that. If you know how to manage this, please make an issue or a PR!.

So for the moment, I just test with 1 VM and I have 1 instance of novnc running that I start manually. It's kind of a pain I know, but it works for now.

Permissions

Ensure that the user has access to the group libvirt-qemu. Usually this mean run the program as root, but if you know another way, give that a shot.

Developing/Contributing to this project

Please see CONTRIBUTING for details.

Release notes

As this projects gets built out further and further, you can keep track of the releases on Changelager.

libvirt-php auto complete

At the moment there's a script called build-doc.php which will extract all methods from the libvirt library and put it into the .phpstorm.meta.php file. The logic of what happens within those methods can only be find in the ./docker/php/libvirt-php/src directory in the original C/C++ code.

Abstraction

The underlying APIs of this package don't require Laravel Nova and can be used outside of it. You'll just need to ensure illuminate/support at any version >5.0.

Security

If you discover any security related issues, please email security@metabit.services instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Support

If you enjoy my content, please consider supporting me on Kofi.

kregel/homestead 适用场景与选型建议

kregel/homestead 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 01 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「nova」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 kregel/homestead 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 kregel/homestead 我们能提供哪些服务?
定制开发 / 二次开发

基于 kregel/homestead 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-21