core

command module
v0.0.0-...-1a62c48 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 17 Imported by: 0

README

Core

CircleCI Codacy Badge

Eru system core, stateless, resource allocation efficiently.

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.

Under macOS we have to install libgit2 manually, if you using Homebrew please install like this:

# libgit2 version 0.27.x
HOMEBREW_NO_AUTO_UPDATE=1 brew install libgit2
make deps

In linux you can reference our image's Dockerfile. Our server were running under CentOS 7, so if your server was different, something will not same.

On other hand, you can use our footstone image for testing and compiling.

GRPC

Generate golang & python 3 code

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
pip install -U grpcio-tools
make grpc

Current version of dependencies are:

  • google.golang.org/grpc: v1.0.1-GA
  • github.com/golang/protobuf: f592bd283e
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 eru2, now you can build and deploy agent with cli tool.

  1. Test source code and build image
<cli_execute_path> --name <image_name> https://goo.gl/KTGJ9k

Make sure you can clone code by ssh protocol because libgit2 ask for it. So you need configure core with github certs. After the fresh image was named and tagged, it will be auto pushed to the remote registry which was defined in core.

  1. Deploy core itself
<cli_execute_path> container 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] https://goo.gl/KTGJ9k

Now you will find core was started in nodes.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
sdn
rpc
gen
mocks
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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