Skip to content

andrewn6/infralink

Repository files navigation

Infralink

Infralink is a minimal, local-first orchestrator. A small daemon (infralinkd) exposes an HTTP API for declaring "apps" (workload specs) and dispatching them to a pluggable backend. A CLI (infralink) drives the daemon.

Status: v0.1.0 — local-only, single-node. Podman and Nomad backends, plus an in-memory mock for tests.

Quickstart

# build the workspace
cargo build --workspace --release

# install the binaries
cargo install --path daemon
cargo install --path cli

# start the daemon (mock backend, no runtime required)
INFRALINK_BACKEND=mock infralinkd &

# define an app, deploy it, query it
infralink apps create web --image nginx:latest --port 8080:80
infralink apps deploy web
infralink apps status web
infralink apps logs web --tail 20
infralink apps stop web

For a real container, point INFRALINK_BACKEND=podman at a running Podman or Docker socket and re-run infralink apps deploy webcurl localhost:8080 should hit nginx.

Backends

Backend When to use Required env / config
mock Tests, CI, the demo above none
podman Local containers via Podman/Docker Auto-detects /var/run/docker.sock, $XDG_RUNTIME_DIR/podman/podman.sock, or override with INFRALINK_PODMAN_SOCKET=/path/to/sock
nomad Single-node Nomad agent INFRALINK_NOMAD_ADDR=http://127.0.0.1:4646 (default)

Switch backends with INFRALINK_BACKEND={mock,podman,nomad} or by editing backend = "..." in the config file.

Configuration

On first run, infralinkd writes a default config to ~/.infralink/config.toml (override the location with $INFRALINK_CONFIG):

backend = "podman"
listen_addr = "127.0.0.1:8080"
data_dir = "/Users/you/.infralink"

[podman]
# socket = "/run/user/1000/podman/podman.sock"

[nomad]
addr = "http://127.0.0.1:4646"

Environment overrides take precedence over the file:

Variable Effect
INFRALINK_CONFIG Path to the config file
INFRALINK_BACKEND mock / podman / nomad
INFRALINK_LISTEN_ADDR e.g. 0.0.0.0:8080
INFRALINK_DATA_DIR Where SQLite state lives
INFRALINK_PODMAN_SOCKET Path to a Docker/Podman-compatible socket
INFRALINK_NOMAD_ADDR Nomad agent base URL
INFRALINK_LOG_FORMAT pretty (default) or json
RUST_LOG tracing-subscriber EnvFilter (e.g. info,infralinkd=debug)

GET /healthz actively probes the configured backend and returns 200 ok / 503 backend_unavailable / 500 error.

Architecture

See the design spec and milestone plan for the full picture:

The workspace has three crates:

  • core/WorkloadSpec, the Backend trait, Config.
  • daemon/ (infralinkd) — axum HTTP server, SQLite state, backend impls.
  • cli/ (infralink) — clap subcommands that talk to the daemon.

Roadmap

  • v0.1.x — bug fixes, more integration coverage against real Podman/Nomad.
  • v0.2 — multi-replica deployments, blue/green, log streaming.
  • v0.3 — multi-node (gossip + remote backends), ingress, secrets.

License

MIT OR Apache-2.0.

About

Fast, simple, cloud-agnostic container orchestration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors