core

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 25 Imported by: 0

README

core

Eru core is a stateless gRPC resource scheduler: it holds cluster metadata in etcd or redis, allocates resources through pluggable resource plugins, and deploys workloads onto Docker containers or yavirt virtual machines through a single CoreRPC API.

Documentation: projecteru2.github.io/core (source in docs/).

test lint

Highlights

  • One gRPC API — the CoreRPC service covers pods, nodes, workloads, images, networks, files and status streams; long-running calls (deploy, build, logs, exec) are server streams
  • Stateless, multi-instance — every instance keeps its state in etcd or redis and coordinates through distributed locks, so instances can be added and removed freely
  • Multiple engines — Docker (tcp://, unix://), yavirt VMs (virt-grpc://), systemd-managed containerd (systemd://) and a mock engine, selected per node by endpoint scheme
  • Resource pluginscpumem is built in; external plugins are ordinary executables in resource_plugin.dir, invoked with a subcommand and JSON on stdin (see resource-extend for gpu and storage)
  • Deployment strategiesAUTO, FILL, EACH, GLOBAL and DRAINED decide how a deploy count is spread over the candidate nodes
  • WAL-based recovery — allocations, workload creation and processing counters are journaled to a local bbolt WAL and replayed on start, so a crash mid-deploy does not leak resources
  • Service discovery + client library — instances register themselves in the store and push the live address list over WatchServiceStatus; the Go client in client/ consumes it
  • Embedded etcd--embedded-storage runs a single-member in-process etcd for a dev instance

Quick start

make build

# with an external etcd
./eru-core --config core.yaml.sample

# or a self-contained dev instance (in-process etcd under $TMPDIR/eru-core-etcd)
./eru-core --config core.yaml.sample --embedded-storage

The config path also comes from ERU_CONFIG_PATH:

export ERU_CONFIG_PATH=/path/to/core.yaml
eru-core

Container image — ghcr.io/projecteru2/core (also published as projecteru2/core):

docker run -d \
  --name eru_core_$HOSTNAME \
  --net host \
  --restart always \
  -v <HOST_CONFIG_DIR_PATH>:/etc/eru \
  ghcr.io/projecteru2/core \
  /usr/bin/eru-core

See Installation and Configuration for the rest.

  • agent — per-node daemon that reports node and workload status back to core
  • cli — command line client for the core API
  • resource-extend — external resource plugins (gpu, storage)
  • quickstart — a local Eru stack to try things against
  • footstone — shared base images

The virt engine still ships and its libyavirt dependency still resolves, but yavirt is an archived runtime and is no longer developed.

Development

make build    # build the eru-core binary (CGO_ENABLED=0)
make test     # go vet on linux+darwin, then tests with -race and coverage
make lint     # golangci-lint on linux+darwin
make fmt      # gofumpt + goimports
make mock     # regenerate mocks from .mockery.yml
make grpc     # regenerate gRPC bindings from rpc/gen/core.proto
make all      # deps, fmt, lint, test, build

make help lists every target.

License

This project is licensed under the MIT License. See LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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