projecteru2 / core

Eru, a simple, stateless, flexible, production-ready orchestrator designed to easily integrate into existing workflows. Can run any virtualization things in long or short time.

Home Page:https://eru.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eru

Codacy Badge

Eru is a stateless, flexible, production-ready resource scheduler designed to easily integrate into existing systems.

Eru can use multiple engines to run anything for the long or short term.

This project is Eru Core. The Core use for resource allocation and manage resource's lifetime.

Suggest use go 1.20 and above.

Testing

Run make test

Compile

  • Run make build if you want binary.
  • Run ./make-rpm if you want RPM for el7. However we use FPM for packing, so you have to prepare it first.

Developing

Run make deps for generating vendor dir.

You can use our footstone image for testing and compiling.

GRPC

Generate golang grpc definitions.

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
make grpc

Run it

$ eru-core --config /etc/eru/core.yaml.sample

or

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

Dockerized Core manually

Image: projecteru2/core

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

Build and Deploy by Eru itself

After we implemented bootstrap in eru, now you can build and deploy eru with cli tool.

  1. Test source code and build image
<cli_execute_path> --name <image_name> http://bit.ly/EruCore

Make sure you can clone code. After the fresh image was named and tagged, it will be auto pushed to the remote registry which was defined in config file.

  1. Deploy core itself
<cli_execute_path> workloads deploy --pod <pod_name> [--node <node_name>] --entry core --network <network_name> --image <projecteru2/core>|<your_own_image> --file <core_config_yaml>:/core.yaml [--count <count_num>] [--cpu 0.3 | --mem 1024000000] http://bit.ly/EruCore

Now you will find core was started in nodes.

About

Eru, a simple, stateless, flexible, production-ready orchestrator designed to easily integrate into existing workflows. Can run any virtualization things in long or short time.

https://eru.dev

License:MIT License


Languages

Language:Go 95.9%Language:Python 3.6%Language:Makefile 0.3%Language:Shell 0.2%Language:Dockerfile 0.1%