How valexsantos/mkit works
MKIt is a small Ruby-based container orchestrator: a client submits service operations, the daemon manages service and pod state, and deployed containers receive stable network/DNS identities and HAProxy routing. The README documents readiness probes, supervision, and rolling replacement without cutting requests. The graph includes the API, orchestration and runtime layers, plus the CLI and dashboard. Some subsystem links rely on README statements or the source index; unsampled implementation details are not assumed.
Main entry points: service.rb Service lifecycle · overview.js Dashboard views · engine.rb Workflow engine · pod_workflows.rb Pod workflows
Components 24
Client interfaces
- MKIt CLI
lib/mkit/client/command_parser.rb - HTTP client
lib/mkit/client/http_client.rb - Web dashboard
lib/mkit/app/public/ui/app.js - Dashboard views
lib/mkit/app/public/ui/js/views/overview.js - DOM rendering
lib/mkit/app/public/ui/js/dom.js - Status badges
lib/mkit/app/public/ui/js/status.js - Display formatting
lib/mkit/app/public/ui/js/format.js - Table rendering
lib/mkit/app/public/ui/js/views/table.js
Daemon control plane
- REST API
lib/mkit/app/controllers/api_controller.rb - Service lifecycle
lib/mkit/app/model/service.rb - Workflow engine
lib/mkit/workflow/engine.rb - Pod workflows
lib/mkit/workflow/pod_workflows.rb - Job manager
lib/mkit/job_manager.rb
Pod runtime
- Pod reconciliation
lib/mkit/pods/pod_reconciler.rb - Container runtime
lib/mkit/container/registry.rb - Docker adapter
lib/mkit/container/docker/api.rb - Container events
lib/mkit/pods/container_listener.rb
Networking and traffic
- Host networking
lib/mkit/mkit_interface.rb - Service DNS
lib/mkit/mkit_dns.rb - HAProxy routing
lib/mkit/workers/haproxy_worker.rb
State and resilience
- Health supervision
lib/mkit/watchdog/monitor.rb - SQLite state
lib/mkit/database.rb - Workflow and pod state
db/migrate
Other components
- Operator
Connections 28
- Operator → MKIt CLI: runs commands
- Operator → Web dashboard: uses dashboard
- MKIt CLI → HTTP client: sends requests
- HTTP client → REST API: calls API
- Web dashboard → REST API: requests data
lib/mkit/app/public/ui/app.js - Web dashboard → Dashboard views: renders views
lib/mkit/app/public/ui/app.js - Dashboard views → DOM rendering: builds elements
lib/mkit/app/public/ui/js/views/overview.js - Dashboard views → Status badges: formats status
lib/mkit/app/public/ui/js/views/overview.js - Dashboard views → Display formatting: formats values
lib/mkit/app/public/ui/js/views/overview.js - Dashboard views → Table rendering: uses tables
- REST API → Service lifecycle: handles service operations
- Service lifecycle → Pod workflows: starts replacement workflows
- Workflow engine → Pod workflows: executes definitions
- Workflow engine → Workflow and pod state: persists run state
db/migrate/013_create_workflow_runs.rb - Workflow engine → Job manager: queues resumptions
lib/mkit/workflow/engine.rb - Job manager → Pod workflows: dispatches work
- Pod workflows → Pod reconciliation: coordinates pod changes
- Pod reconciliation → Container runtime: manages containers
- Container runtime → Docker adapter: selects adapter
- Docker adapter → Container events: receives runtime events
- Container events → Pod reconciliation: reports container events
- Service lifecycle → Host networking: assigns service network
- Service lifecycle → Service DNS: provides service identity
- Service lifecycle → HAProxy routing: configures traffic routing
- Health supervision → Pod reconciliation: keeps pods healthy
- Service lifecycle → SQLite state: stores service state
- Workflow engine → SQLite state: stores workflow state
- Workflow and pod state → SQLite state: defines durable schema