PHPackages                             netserva/fleet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. netserva/fleet

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

netserva/fleet
==============

NetServa Fleet Management Plugin - VSite-&gt;VNode-&gt;VHost infrastructure tracking

v3.0.1(5mo ago)011MITPHPPHP ^8.2

Since Nov 4Pushed 5mo agoCompare

[ Source](https://github.com/netserva/fleet)[ Packagist](https://packagist.org/packages/netserva/fleet)[ Docs](https://netserva.org)[ RSS](/packages/netserva-fleet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (1)

NetServa Fleet Management Plugin
================================

[](#netserva-fleet-management-plugin)

A comprehensive infrastructure management plugin for NetServa that tracks and manages your VSite→VNode→VHost hierarchy across mixed infrastructure environments.

Overview
--------

[](#overview)

NetServa Fleet provides unified management for:

- **VSites** - Hosting providers/locations (local Incus, BinaryLane VPS, customer hardware)
- **VNodes** - Physical/virtual servers
- **VHosts** - VM/CT instances (complete virtualized environments, not just web vhosts)

Key Features
------------

[](#key-features)

### 🏗️ Three-Tier Infrastructure Hierarchy

[](#️-three-tier-infrastructure-hierarchy)

- **VSite** (hosting provider/location) → **VNode** (server) → **VHost** (VM/CT instance)
- Supports mixed infrastructure: local Incus, local Proxmox, BinaryLane VPS, customer hardware
- Role-based node classification: compute, network, storage, mixed

### 🔍 SSH-Based Discovery

[](#-ssh-based-discovery)

- Automatic system information discovery via SSH
- Graceful error handling for unreachable nodes
- Role-specific discovery commands for different node types
- Scheduled scanning with configurable frequency

### 📊 Comprehensive Management Interface

[](#-comprehensive-management-interface)

- Full Filament 4.0 admin interface for fleet management
- Real-time discovery status and system information
- Bulk operations for discovery and management
- Integration with existing NetServa SSH host management

### 📁 NetServa Integration

[](#-netserva-integration)

- Import existing infrastructure from `var/` directory structure
- Sync with NetServa 54-variable environment files
- Support for `/srv/` filesystem layout standard
- Integration with existing SSH host configurations

Installation
------------

[](#installation)

1. Add to your Laravel application's composer.json:

```
"repositories": [
    {
        "type": "path",
        "url": "./packages/netserva-fleet"
    }
]
```

2. Install the package:

```
composer require netserva/netserva-fleet
```

3. Run migrations:

```
php artisan migrate
```

4. Publish configuration (optional):

```
php artisan vendor:publish --tag=fleet-config
```

Usage
-----

[](#usage)

### Import Existing Infrastructure

[](#import-existing-infrastructure)

Import from your existing `var/` directory structure:

```
# Dry run to see what would be imported
php artisan fleet:import --dry-run

# Import all infrastructure
php artisan fleet:import

# Import specific vnode only
php artisan fleet:import --vnode=mgo

# Force overwrite existing data
php artisan fleet:import --force
```

### Discovery Management

[](#discovery-management)

Discover system information via SSH:

```
# Discover all nodes that need scanning
php artisan fleet:discover

# Discover specific vnode
php artisan fleet:discover --vnode=mgo

# Force discovery even if not scheduled
php artisan fleet:discover --force

# Test SSH connections only
php artisan fleet:discover --test-ssh
```

### Web Interface

[](#web-interface)

Access the fleet management interface at `/admin/fleet-vsites` in your Filament admin panel.

Configuration
-------------

[](#configuration)

### VSite Directory Mappings

[](#vsite-directory-mappings)

Configure how `var/` directory names map to VSites in `config/fleet.php`:

```
'vsites' => [
    'directory_mappings' => [
        'mgo' => ['provider' => 'local', 'technology' => 'incus', 'location' => 'workstation'],
        'nsorg' => ['provider' => 'binarylane', 'technology' => 'vps', 'location' => 'sydney'],
    ],
],
```

### Discovery Commands

[](#discovery-commands)

Customize discovery commands for different node roles:

```
'discovery' => [
    'discovery_commands' => [
        'compute' => [
            'hostname -f',
            'uname -a',
            'cat /proc/cpuinfo | grep "processor" | wc -l',
            // ... more commands
        ],
        'network' => [
            'hostname',
            'uptime',
            'ip addr show',
        ],
    ],
],
```

Architecture
------------

[](#architecture)

### Database Schema

[](#database-schema)

#### fleet\_vsites (Hosting Providers)

[](#fleet_vsites-hosting-providers)

- Tracks hosting providers and technologies
- Unique constraint on provider+technology+location
- Capabilities and API endpoint configuration

#### fleet\_vnodes (Servers)

[](#fleet_vnodes-servers)

- Physical/virtual servers with SSH access
- Role-based classification and discovery
- System information and discovery status
- Links to SSH host configurations

#### fleet\_vhosts (VM/CT Instances)

[](#fleet_vhosts-vmct-instances)

- Complete virtualized environments
- NetServa environment variable integration
- Instance type and resource tracking
- File system integration with var/ directory

### Discovery Architecture

[](#discovery-architecture)

- **Role-based discovery**: Different commands for compute/network/storage nodes
- **Graceful failure handling**: Continue discovery even if some commands fail
- **SSH-only approach**: All discovery via SSH with proper error handling
- **Scheduled scanning**: Configurable frequency with automatic retry for failures

### Error Handling

[](#error-handling)

- SSH connection failures are logged but don't stop discovery
- Command failures are tracked per-node for debugging
- Partial discovery results are saved (get what we can)
- Failed nodes are scheduled for retry at shorter intervals

Testing
-------

[](#testing)

Run the test suite:

```
# Run all fleet tests
php artisan test packages/netserva-fleet/tests

# Run specific test groups
php artisan test --group=fleet
php artisan test --group=discovery
php artisan test --group=import
```

NetServa Compliance
-------------------

[](#netserva-compliance)

This plugin follows NetServa standards:

- ✅ Uses NetServa 5-character environment variables (`$NSVAR`, `$NSSSH`, etc.)
- ✅ Supports 54-variable NetServa environment files
- ✅ Compatible with `/srv/` filesystem layout
- ✅ Integrates with existing SSH host management
- ✅ Follows MIT license with consistent headers
- ✅ Uses Pest 4.0 for testing
- ✅ Filament 4.0 admin interface

License
-------

[](#license)

MIT License - see LICENSE file for details.

Support
-------

[](#support)

For issues and feature requests, please use the main NetServa repository issue tracker.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

4

Last Release

170d ago

Major Versions

v0.0.4 → v3.0.12025-11-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/57d5aad943e969e74b0010562cf93d9e2554ab468f44e0c2ed7fdf832875a157?d=identicon)[markc](/maintainers/markc)

---

Top Contributors

[![markc](https://avatars.githubusercontent.com/u/8134?v=4)](https://github.com/markc "markc (21 commits)")

---

Tags

containersshvminfrastructurefleetnetserva

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/netserva-fleet/health.svg)

```
[![Health](https://phpackages.com/badges/netserva-fleet/health.svg)](https://phpackages.com/packages/netserva-fleet)
```

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[nunomaduro/laravel-pot

Set of commands to inspect Laravel's container

991.6k](/packages/nunomaduro-laravel-pot)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
