Commit graph

15 commits

Author SHA256 Message Date
Till Wegmueller
b53ccfb4e2
Chore cargo fmt
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 16:14:57 +01:00
Till Wegmueller
102f4a1c52
Add step slugification and category-based NDJSON logging
- Introduce `slugify_step_name` to generate URL-friendly step name slugs.
- Attach per-step categories to NDJSON logs for better traceability.
- Update stdout and stderr logging with step-specific categories.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 16:00:51 +01:00
Till Wegmueller
633f658639
chore: format code with cargo fmt
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 15:43:18 +01:00
Till Wegmueller
08eb82d7f7
Introduce GNU tar (gtar) support and workflow setup enhancements; bump version to 0.1.16
- Add detection and usage of GNU `tar` for platforms where BSD `tar` is incompatible with required options.
- Refactor `job.sh` to delegate all environment setup to newly introduced per-OS setup scripts.
- Add initial support for workflow setups via `workflow.kdl`, running pre-defined setup scripts before executing workflow steps.
- Integrate step-wise execution and logging for workflows, with structured NDJSON output for detailed traceability.
- Increment orchestrator version to 0.1.16.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 15:17:03 +01:00
Till Wegmueller
2c73c80619
Introduce workflow.jobs support and script path overrides; bump version to 0.1.14
- Add parsing and execution support for `.solstice/workflow.kdl` with job-specific configurations, including `runs_on`, `script path`, and `workflow_job_id`.
- Enable job grouping via `group_id` for cohesive workflow processing.
- Update orchestrator to pass workflow-specific parameters to `cloud-init` for finer control over execution.
- Refactor enqueue logic to handle multiple jobs per workflow with fallback to single job when no workflow is defined.
- Enhance dependencies for workflow parsing by integrating `base64`, `regex`, and `uuid`.
- Increment orchestrator version to 0.1.14 for release.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 14:37:35 +01:00
Till Wegmueller
7cc6ff856b
Refactor runner setup and diagnostics; improve tooling support and NDJSON logging
- Enhance runner logging with status-specific messages and structured JSON fields for better traceability.
- Add SHA256 object format detection and initialization for Git repos when applicable.
- Improve shell script execution by adding verbose mode and safe commands handling.
- Extend package installation scripts to support Clang and related tooling across multiple environments.
- Increment orchestrator version for release.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 12:50:20 +01:00
Till Wegmueller
df1a3126b1
Refactor tool checks and log categorization for improved clarity and backend portability; bump version to 0.1.14
- Enhance runner tool check diagnostics with more descriptive output and JSON fields for better observability.
- Replace raw SQL queries in `logs-service` with ORM-based logic for portable and backend-agnostic log categorization.
- Add error category aggregation and structured summary reporting in logs-service.
- Improve environment variable fallback mechanics for runner workdir selection.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 12:28:22 +01:00
Till Wegmueller
7fc4e8edb7
Introduce logs-service for structured job logs management; bump version to 0.1.13
- Add `logs-service` crate as a separate microservice to handle job log storage, retrieval, and categorization.
- Update orchestrator to redirect log endpoints to the new service with optional permanent redirects using `LOGS_BASE_URL`.
- Enhance log persistence by introducing structured fields such as category, level, and error flags.
- Implement migration to add new columns and indexes for job logs.
- Add ANSI escape sequence stripping and structured logging for cleaner log storage.
- Improve SSH log handling with interleaved stdout/stderr processing and pty request support.
- Revise Docker files and compose setup to include logs-service, with support for PostgreSQL and secure connections.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 11:48:09 +01:00
Till Wegmueller
c2fefb5167
Add per-job SSH key support, refactor scheduler for SSH-based job execution, and remove unused runner endpoint
- Introduce fields in `JobContext` for per-job SSH configuration, including user, key paths, and PEM contents.
- Update the scheduler to support SSH-based execution of jobs, including VM lifecycle management and SSH session handling.
- Add utility functions for SSH execution, guest IP discovery, and runner deployment.
- Remove the unused `/runners/{name}` HTTP endpoint and its associated logic.
- Simplify router creation by refactoring out disabled runner directory handling.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-15 18:37:30 +01:00
Till Wegmueller
6631ce4d6e
Add insecure TLS support, CA bundle handling, and package update for SunOS environments
This commit introduces the following updates:
- Adds an environment variable (`SOLSTICE_ALLOW_INSECURE`) to enable insecure TLS as a fallback for curl.
- Improves CA certificate handling and automatic installation on SunOS using IPS or pkgin.
- Extends fallback logic for repository fetching to cover scenarios with missing CA bundles.
- Updates Solstice job script dependencies to include `cmake`.
2025-11-02 20:48:05 +01:00
Till Wegmueller
b84e97e513
Enhance runner with log streaming details, fallback repository fetch, and improved error handling
This commit improves the runner's functionality by adding:
- Detailed log streaming with request ID, stdout, and stderr line counts.
- Fallback mechanisms for repository fetch using HTTP archive when git commands fail.
- Enhanced error reporting for missing job scripts and reading errors.
- Updates to ensure compatibility with SunOS environments and non-interactive shells.
2025-11-02 20:36:13 +01:00
Till Wegmueller
033f9b5ab0
Format 2025-11-01 14:56:46 +01:00
Till Wegmueller
9bac2382fd
Remove unused imports across multiple crates 2025-11-01 12:16:07 +01:00
Till Wegmueller
855aecbb10
Add gRPC support for VM runner log streaming and orchestrator integration
This commit introduces gRPC-based log streaming between the VM runner (`solstice-runner`) and orchestrator. Key updates include:
- Implemented gRPC server in the orchestrator for receiving and processing runner logs.
- Added log streaming and job result reporting in the `solstice-runner` client.
- Defined `runner.proto` with messages (`LogItem`, `JobEnd`) and the `Runner` service.
- Updated orchestrator to accept gRPC settings and start the server.
- Modified cloud-init user data to include gRPC endpoint and request ID for runners.
- Enhanced message queue logic to handle job results via `publish_job_result`.
- Configured `Cross.toml` for cross-compilation of the runner.
2025-11-01 12:14:50 +01:00
Till Wegmueller
a71f9cc7d1
Initial Commit
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-10-25 20:01:08 +02:00