Eru agent
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
api
common
engine
store
types
utils
watcher
.gitignore
Dockerfile
LICENSE
Makefile
README.md
VERSION
agent.go
agent.yaml.sample
app.yaml
eru-agent.service
glide.lock
glide.yaml
make-release

README.md

Agent

CircleCI Codacy Badge

Agent run on the node.

Features

  • Forward log stream to remote
  • Generate container metrics
  • Bootstrap
  • Auto update containers' status and publish it by core's api.

Build

build binary

make build

build rpm

./make-rpm

build image

docker build -t agent .

Develop

go get github.com/projecteru2/agent
cd $GOPATH/src/get github.com/projecteru2/agent
make deps

Dockerized Agent manually

docker run -d --privileged \
  --name eru_agent_$HOSTNAME \
  --net host \
  --restart always \
  -v /sys:/sys:ro \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /proc/:/hostProc/ \
  -v <HOST_CONFIG_DIR_PATH>:/etc/eru \
  projecteru2/agent \
  /usr/bin/eru-agent

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/3K3GHb

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 agent by eru with specific resource.
<cli_execute_path> container deploy -pod <pod_name> --entry agent --network <network_name> --deploy-method fill --image <projecteru2/agent>|<your_own_image> --count 1 --file <agent_config_yaml>:/etc/eru/agent.yaml [--cpu 0.3 | --mem 1024000000] https://goo.gl/3K3GHb

Now you will find agent was started in each node, and monitor containers status include itself.