bbctl is a CLI tool for provisioning and managing multi-tenant infrastructure on bare metal servers running VyOS v1.5 or Proxmox. Similar to fly.io's flyctl, bbctl provides a seamless experience for deploying, scaling, and managing applications across distributed infrastructure.
The architecture consists of multiple components:
- Command-line interface (CLI) - The user-facing interface with subcommands for resource management
- Terminal User Interface (TUI) - Interactive dashboard for visualizing and managing resources
- API Client - For communicating with infrastructure providers (VyOS, Proxmox)
- Configuration - Local config files for storing settings, credentials, and state
- Resource Controllers - For managing instances, volumes, networks, etc.
- Create directory structure for core components
- Implement VyOS and Proxmox provider interfaces
- Setup test environment with containers
- Implement SSH connectivity to provider hosts
- Basic authentication mechanism
- Complete API for VM/instance management
- Storage (volume) provisioning and attachment
- Network creation and configuration
- IP address management
- Improve dashboard with real-time status updates
- Resource creation wizards
- Detailed views for resources
- Settings management
- User and organization management
- Role-based access control
- Secure credential management
- Encryption for data in transit
- Deployment workflows
- Integration with external CI/CD systems
- Scaling and update policies
Create interfaces for managing VyOS routers:
- SSH-based configuration management using VyOS operational mode
- HTTP API integration for automated provisioning
- Configuration templating for standard network setups
Create interfaces for managing Proxmox clusters:
- REST API integration for VM management
- Resource allocation and monitoring
- Template management for quick deployments
- Create containerized test environments for local development
- Mock API responses for testing without actual infrastructure
- Integration tests with real infrastructure in CI environment
- Implement authentication mechanisms for VyOS and Proxmox
- Secure credential storage in local configuration
- Token-based authentication for API calls
Initial implementation will focus on:
bbctl init- Initialize a new projectbbctl instances- List/create/manage VMsbbctl volumes- Manage storagebbctl networks- Configure virtual networks
bbctl/
├── src/
│ ├── api/
│ │ ├── vyos.rs # VyOS API client
│ │ └── proxmox.rs # Proxmox API client
│ ├── commands/ # CLI command handlers
│ ├── models/ # Data models for resources
│ ├── tui/ # Terminal UI components
│ ├── main.rs # Main entry point
│ └── config.rs # Configuration management
├── tests/
│ ├── integration/ # Integration tests
│ ├── fixtures/ # Test data
│ └── containers/ # Test containers
├── docs/ # Documentation
└── examples/ # Example configurations
- Implement the VyOS API client with basic authentication
- Create test containers for local development
- Implement the core resource models and commands
- Develop mock backends for testing without real infrastructure
- Create initial TUI dashboard components