Feat/improve env bootstraping - #4
Merged
Merged
Conversation
Added functionality to manage shell rc files for Bash, Zsh, and Fish, including generating, updating, reading, and removing managed blocks. Introduced unit tests for block generation to ensure idempotency and syntax correctness across different shell types. This enhances the usability of the homelab-cli by automating shell configuration management.
Implemented GPU detection from lspci output, supporting NVIDIA, AMD, and Intel vendors. Added parsing logic and helper functions in the gpu package. Included unit tests for various GPU scenarios to ensure accurate detection and handling of different outputs. This enhances the homelab-cli's capability to identify graphics hardware.
…ackage management Introduced new components for managing various build tools (C/C++ toolchain, CMake, GNU Make), version control (Git), and language packages (Rust, Scala, Python, Node.js, etc.) in the homelab-cli. Each component includes installation checks, installation scripts, and path management for seamless integration. This enhances the CLI's capability to manage development environments effectively.
…sets Added a comprehensive stack management system for installable developer components, including orchestration for dependency resolution and installation. Implemented presets for common development environments and provided functionality for merging custom presets. Introduced unit tests to ensure correct behavior of the orchestration and preset functionalities, enhancing the homelab-cli's capability to manage diverse development setups effectively.
Introduced a new Weaviate service to the homelab-cli, providing a vector database with a GraphQL API. The service includes configuration options for HTTP port and API key, enhancing the CLI's capabilities for managing vector databases.
Introduced the Valkey service to the homelab-cli, providing a Redis-compatible in-memory datastore. The service includes configuration options for host port and password, enhancing the CLI's capabilities for managing caching solutions.
Introduced the Tempo service to the homelab-cli, providing a distributed tracing backend. The service includes configuration options for HTTP port, enhancing the CLI's capabilities for observability solutions.
Introduced new service configurations for ClickHouse, Grafana, Loki, MinIO, MongoDB, MySQL, NATS, PostgreSQL, Prometheus, Qdrant, RabbitMQ, Redis, and Weaviate. Each service includes environment variables, port mappings, and volume configurations, enhancing the CLI's capabilities for managing a diverse set of data storage, monitoring, and messaging solutions.
Introduced a new package to register multiple services including ClickHouse, Grafana, Loki, MinIO, MongoDB, MySQL, NATS, PostgreSQL, Prometheus, Qdrant, RabbitMQ, Redis, Tempo, Valkey, and Weaviate. This package facilitates the integration of these services into the homelab-cli, enhancing its capability to manage a diverse set of data storage, monitoring, and messaging solutions.
Introduced the Redis service to the homelab-cli, providing an in-memory key-value store. The service includes configuration options for host port and password, enhancing the CLI's capabilities for managing caching solutions.
Introduced the RabbitMQ service to the homelab-cli, providing an AMQP message broker with a management UI. The service includes configuration options for AMQP and management ports, as well as default user and password settings, enhancing the CLI's capabilities for managing messaging solutions.
Introduced the Qdrant service to the homelab-cli, providing a vector similarity search engine. The service includes configuration options for HTTP and gRPC ports, as well as an optional API key, enhancing the CLI's capabilities for managing vector search solutions.
Introduced the Prometheus service to the homelab-cli, providing metrics collection and alerting capabilities. The service includes configuration options for the HTTP port, enhancing the CLI's observability features.
Introduced the PostgreSQL service to the homelab-cli, providing a relational database with support for optional plugins such as pgvector, postgis, and timescaledb. The service includes configuration options for host port, superuser credentials, and a default database, enhancing the CLI's capabilities for managing database solutions. Unit tests have been added to verify service registration and configuration behavior.
Introduced the NATS service to the homelab-cli, providing a cloud-native messaging system. The service includes configuration options for client and monitor ports, enhancing the CLI's capabilities for managing messaging solutions.
Introduced the MySQL service to the homelab-cli, providing a MySQL 8 relational database. The service includes configuration options for host port, root user credentials, root password, and a default database, enhancing the CLI's capabilities for managing database solutions.
Introduced the MongoDB service to the homelab-cli, providing a document database. The service includes configuration options for host port, root user credentials, and root password, enhancing the CLI's capabilities for managing database solutions.
Introduced the MinIO service to the homelab-cli, providing S3-compatible object storage. The service includes configuration options for API and console ports, as well as root user credentials, enhancing the CLI's capabilities for managing storage solutions.
Introduced the Loki service to the homelab-cli, providing a log aggregation system. The service includes configuration options for the HTTP port, enhancing the CLI's observability features.
Introduced the Grafana service to the homelab-cli, providing metrics and logs visualization capabilities. The service includes configuration options for HTTP port, admin user, and password, enhancing the CLI's observability features.
Introduced the ClickHouse service to the homelab-cli, providing a column-oriented OLAP database. The service includes configuration options for HTTP port, default user, and password, enhancing the CLI's capabilities for managing database solutions.
Added a comprehensive services management system to the homelab-cli, enabling users to manage compose-backed services effectively. This includes the implementation of service registration, orchestration, and configuration handling. Key features include support for service dependencies, initialization, and lifecycle management (up/down). Additionally, various utility functions for handling templates, environment variables, and network management have been introduced, enhancing the CLI's capabilities for managing complex service stacks.
Added a new package for interactive stdin prompting, enabling users to input configuration values during service initialization. This includes a Prompter interface with methods for string, password, boolean, and selection inputs. Additionally, a schema validation function ensures required fields are present for non-interactive initialization. Unit tests have been included to verify the functionality of the prompting methods and schema validation.
Enhanced the configuration model by introducing a new StackConfig type and additional fields in ServicesConfig, including Network, Instances, and Presets. Updated default values for services to use "auto" for Runtime and added necessary defaults for new fields. Adjusted tests to reflect the changes in configuration structure.
Updated the data and observability command structures in the CLI to improve service management. Introduced new commands for starting and listing data services, including Postgres, ClickHouse, and MinIO. Enhanced observability commands to manage Prometheus, Grafana, and Loki stacks. Added support for dry run operations and improved command descriptions for clarity. Removed the deprecated toolchain command and consolidated stack management under a new stack command structure.
Updated the CLI command structure by removing the deprecated toolchain command and introducing the new stack command under the foundation category. This change enhances the organization of commands related to service management.
Modified the version number in the install script usage instructions from v0.1.0 to v0.2.0 to reflect the latest release. This change ensures users are directed to the correct version during installation.
Updated the README to reflect the new features and capabilities of the `lab` CLI, including a comprehensive overview of homelab automation, installation instructions, and a detailed provisioning workflow. Added new documentation files for provisioning a new machine and a services catalog, outlining the management of compose-backed services. Enhanced command descriptions and configuration details to improve user guidance and clarity.
Introduced a new command `test-integration` in the Makefile to run compose integration tests with the integration tag. This addition enhances the testing capabilities of the project, allowing for more comprehensive validation of service interactions outside of CI.
Added new dependencies for `github.com/mattn/go-isatty` and `golang.org/x/term`, and updated the version of `golang.org/x/sys` to v0.47.0. This ensures compatibility with the latest features and improvements in the respective libraries.
Changed the maintainer contact in the .goreleaser.yaml file from a placeholder to Bart Rosa's email address. This update ensures accurate attribution and communication for the project.
…ease Expanded the CHANGELOG to include new features and changes for the v0.3.0 release, detailing the introduction of the `lab stack` command, the `lab services` framework, and various stack components and services. Updated the CONTRIBUTING guide to specify the version of golangci-lint used in the CI process, ensuring clarity for contributors.
…on scripts Introduced new Docker Compose templates for Arcadedb and Nebulagraph services, including detailed configurations for containers, health checks, and environment variables. Added a post-initialization script for Nebulagraph to ensure proper setup and registration of storage hosts, enhancing the deployment process for these services.
…module Updated the service registration in the register.go file to include Arcadedb and Nebulagraph, enhancing the service management capabilities of the application. This change ensures that these new services are properly registered and available for use.
Added the NebulaGraph service implementation, including its registration, configuration schema, and initialization logic. Introduced comprehensive unit tests to validate service registration, template rendering, and post-initialization behavior, enhancing the reliability and usability of the service within the application.
Added the ArcadeDB service implementation, including its registration, configuration schema, and initialization logic. Introduced comprehensive unit tests to validate service registration, template rendering, and password validation, enhancing the reliability and usability of the service within the application.
Implemented the ExposeBind function to determine host bind addresses based on service exposure modes, including LAN and Tailscale. Added new service presets for "graphrag" and "graph-lab" in the presets module, enhancing service management capabilities. Introduced unit tests for preset resolution to ensure correct functionality.
Updated the vector command's short and long descriptions to include support for graph databases with vector search. Modified the list command to reflect the addition of ArcadeDB and NebulaGraph, improving clarity on the services available and their categories. This enhances user experience and documentation for vector-capable services.
Introduced new service categories for graph databases, including ArcadeDB and NebulaGraph, along with their respective service presets "graphrag" and "graph-lab". Updated documentation to reflect these additions, enhancing user guidance on initializing and managing graph database services within the application. This update improves the overall functionality and usability of the lab stack.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR turns
homelab-clifrom a provisioning-focused tool (v0.2) into a full developer environment platform: installable stack components, compose-backed local services, and graph databases for GraphRAG workloads — all from one binary.Branch:
feat/improve-env-bootstrapingScope: 39 commits · 107 files · +6,691 / −267 lines
Baseline preserved:
lab iso,lab bootstrap essentials, self-update, install script — no regressions on v0.1/v0.2 flows.After merge, a typical fresh-machine workflow looks like:
What's new
lab stack(rename fromlab toolchain)lab stackreplaceslab toolchainwith aliasestoolchainandtc(backward compatible).minimal,basic,backend,frontend,systems,jvm,ml,data,gpu-nvidia,gpu-amd,full.~/.bashrc,~/.zshrc,~/.config/fish/config.fish.lab stack gpu) fromlspcioutput.lab servicesframeworkReplaces the v0.1 stub with a full compose orchestrator:
golang.org/x/term— only new dependency).homelab-net, embedded templates, secret handling,.envchmod 600.init,up,down,restart,status,connect,logs,rm, preset list/show.17 compose-backed services
Postgres supports plugin combinations (pgvector, postgis, timescaledb) via embedded Dockerfile when 2+ plugins are selected.
Grafana auto-provisions datasources (prometheus, loki, tempo, postgres, clickhouse) with soft-fail if a target is down.
Graph databases (Apache 2.0)
Two sovereign-friendly graph engines, selected after a 2026 license review (Neo4j GPLv3, FalkorDB SSPL, Memgraph/ArangoDB BSL excluded):
New presets:
graphrag— arcadedb + qdrant + minio + postgres (multi-modal AI stack)graph-lab— arcadedb + nebulagraph (side-by-side comparison, no port collision)New service category:
graph(lab services list --category graph).Optional
PostUpperinterface — NebulaGraph runs post-init aftercompose upwithout breaking existing services.High-level wrappers
lab obs up/down→ observability presetlab vector up <id>→ forwards tolab services up(qdrant, weaviate, arcadedb, nebulagraph)lab data up <id>→ postgres, clickhouse, minioConfiguration
Extended
~/.config/homelab-cli/config.yaml:Breaking default:
services.runtimechanged frompodman→auto.Documentation
README.md— dev environment + services walkthroughdocs/commands.md— fulllab stackandlab servicesreferencedocs/configuration.md—stack:andservices:sectionsdocs/services.md— catalog of all 17 services, graph licensing rationale, embedded graph alternatives (Kuzu/LadybugDB)CHANGELOG.md— v0.3 Developer Environment + Graph Databases entriesDesign decisions
compose buildonupwhen 2+ plugins are selected (no single upstream image covers all combinations).--set version=….24.11.x; warning logged if enabled on unverified versions. TODO: confirm plugin in official image.SHOW HOSTS+ password probing (no marker files).enable_auth=trueby default; post-init rotatesroot/nebula→ random.envpassword.lab vector up arcadedb— forwards without blocking;connectnotes that ArcadeDB is multi-model, not a dedicated vector DB.Test plan
make cigreen (fmt, vet, lint, test, build)lab stack list— 26+ components in 7 categorieslab stack install --preset ml --yes— installs without errorslab stack path refresh— idempotent shell rc blocklab toolchain install python --yes— alias workslab services list— 17 services with statuslab services init postgres --set plugins=pgvector,postgis --yes— generates compose + Dockerfile +.env(600)lab services up --preset observability --yes— prometheus, loki, tempo, grafana healthylab services init arcadedb --set databases=knowledge_graph --yes && lab services up arcadedbcurl http://127.0.0.1:2480/api/v1/ready→ 200lab services connect arcadedb— full endpoint listlab services init nebulagraph --yes && lab services up nebulagraph— 4 containers healthy, post-init registers storaged0lab services up --preset graphrag --yes— all 4 services uplab services up --preset graph-lab --yes— both graph DBs parallel, no port conflictlab vector up arcadedb— wrapper forwards correctlylab obs up— observability presetlab bootstrap essentials --dry-run,lab iso list,lab self-update --checkMigration notes
lab toolchain install golab stack install go(alias still works)services.runtime: podmanservices.runtime: auto(explicit override still supported)lab services ensure ml-stackOut of scope (follow-up PRs)
--nodes 3)lab stack(LadybugDB/bighorn when stable)lab services logscompose integration (partial stub remains)make test-integrationtarget added, not run in default CI)