runtime

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: Apache-2.0

README

Miren Runtime

Test Release Changelog License

A container orchestration system built on containerd for running secure, isolated applications with etcd-backed state management.

Overview

The Miren runtime provides a platform for deploying and managing containerized applications with strong isolation guarantees. It features an entity-based architecture with etcd as the distributed state store for managing applications, versions, sandboxes, and infrastructure components.

Key Features

  • Secure Isolation: Strong container isolation using containerd
  • Distributed State: etcd backend for reliable, distributed state management
  • Multi-tenant: Support for projects and isolated environments
  • HTTP Ingress: Built-in routing for HTTP traffic to applications
  • Hot Reload: Applications can be updated without downtime
  • CLI Tool: Comprehensive command-line interface for all operations

Architecture

Core Components
  • Entity Store: Central state management using etcd
  • Sandbox Controller: Manages isolated execution environments
  • App Server: Handles application lifecycle and deployments
  • Ingress Controller: Routes HTTP traffic to applications
  • Build Server: Handles application builds and image management
Entity Types
  • Apps: Application definitions with configuration
  • App Versions: Specific versions of applications with container specs
  • Sandboxes: Isolated execution environments running app versions
  • Routes: HTTP routing rules for ingress
  • Projects: Multi-tenant isolation boundaries

Getting Started

Prerequisites
  • Go 1.25+ (required for building)
  • iso (optional, for containerized development environment)
Development Setup
# Clone the repository
git clone https://github.com/mirendev/runtime.git
cd runtime

# Start development environment with all dependencies
make dev

# Or with tmux for split terminals
make dev-tmux

The development environment automatically sets up:

  • containerd for container runtime
  • etcd for state storage
Building
# Build the miren binary
make bin/miren

# Build with debug symbols
make bin/miren-debug

# Build release version
make release
Running Tests
# Run all tests
make test

# Run tests in a specific package
hack/it <package>

# Run a specific test
hack/run <package> <test-name>

CLI Usage

Application Management
# Initialize a new application
miren init

# Deploy an application
miren deploy

# List all applications
miren apps

# Get application details
miren app <app-name>

# View application logs
miren logs <app-name>
Sandbox Management
# List all sandboxes
miren sandbox list

# Filter sandboxes by status
miren sandbox list --status running

# Execute command in sandbox
miren sandbox exec <sandbox-id> -- <command>

# Get sandbox metrics
miren sandbox metrics <sandbox-id>
Configuration Management

Cluster configurations are stored in ~/.config/miren/clientconfig.yaml.

# Show current configuration
miren config info

# Switch active cluster
miren config set-active <cluster-name>

# Load additional configuration
miren config load <config-file>

Application Configuration

Applications are configured using YAML files:

name: myapp
container:
  - name: web
    image: myapp:latest
    command: ["/app/server"]
    env:
      PORT: "8080"
    resource:
      memory: "256Mi"
      cpu: "100m"
route:
  - hostname: "myapp.example.com"
    path: "/"
    port: 8080

Development

Building from Source
# Build the miren binary
make bin/miren
Code Style
# Run linters on changed files
make lint-changed

Directories

Path Synopsis
api
addon
Package addon provides entity definitions for the addon system.
Package addon provides entity definitions for the addon system.
app
storage
Package storage provides entity definitions for disk provisioning and management.
Package storage provides entity definitions for disk provisioning and management.
cli
cmd
miren command
components
base
Package base provides a shared framework for managing containerd-based service components.
Package base provides a shared framework for managing containerd-based service components.
buildkit
Package buildkit provides a component for managing a persistent BuildKit daemon using containerd.
Package buildkit provides a component for managing a persistent BuildKit daemon using containerd.
etcd
Package etcd provides a component for managing an etcd server using containerd.
Package etcd provides a component for managing an etcd server using containerd.
lsvd/cmd/lsvd-server command
Command lsvd-server is a separate process that manages LSVD volumes and mounts.
Command lsvd-server is a separate process that manages LSVD volumes and mounts.
victorialogs
Package victorialogs provides a component for managing a VictoriaLogs server using containerd.
Package victorialogs provides a component for managing a VictoriaLogs server using containerd.
victoriametrics
Package victoriametrics provides a component for managing a VictoriaMetrics server using containerd.
Package victoriametrics provides a component for managing a VictoriaMetrics server using containerd.
controllers
This package contains end-to-end tests, all of which are meant to be tagged with the e2e build tag.
This package contains end-to-end tests, all of which are meant to be tagged with the e2e build tag.
hack
cmd/testfmt command
cmd/torture command
lve
lve/cmd/lve command
pkg/nbdnl
Package nbdnl controls the Linux NBD driver via netlink.
Package nbdnl controls the Linux NBD driver via netlink.
pkg/treemap
Package treemap provides a generic key-sorted map.
Package treemap provides a generic key-sorted map.
pkg
cel
color
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
dns
git
hey command
Command hey is an HTTP load generator.
Command hey is an HTTP load generator.
hey/requester
Hey supports two output formats: summary and CSV
Hey supports two output formats: summary and CSV
imagerefs
Package imagerefs centralizes all Docker image references used throughout the project.
Package imagerefs centralizes all Docker image references used throughout the project.
logfilter
Package logfilter provides a simple query syntax for filtering logs.
Package logfilter provides a simple query syntax for filtering logs.
nbd
perf
Package perf provides access to the Linux perf API.
Package perf provides access to the Linux perf API.
rpc
rpc/cmd/rpcgen command
saga
Package saga implements the Saga pattern for distributed operations with crash recovery.
Package saga implements the Saga pattern for distributed operations with crash recovery.
set
slogout
Package slogout provides adapters to route container output through slog.Logger instead of directly to stdout/stderr.
Package slogout provides adapters to route container output through slog.Logger instead of directly to stdout/stderr.
subsystem
Package subsystem provides infrastructure for building composable server subsystems.
Package subsystem provides infrastructure for building composable server subsystems.
subsystem/metrics
Package metrics provides a subsystem for building metrics collection components.
Package metrics provides a subsystem for building metrics collection components.
subsystem/observability
Package observability provides a subsystem for building observability components.
Package observability provides a subsystem for building observability components.
tasks/run command
ui
Package ui provides common UI components for the miren CLI
Package ui provides common UI components for the miren CLI
servers
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL