Git Product home page Git Product logo

agent's Introduction

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.git
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/fs/cgroup/:/sys/fs/cgroup/ \
  -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> --pod <pod_name> --entry agent --network <network_name> --image <projecteru2/agent>|<your_own_image> --count <equal_to_nodes_num> [--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.

agent's People

Contributors

cmgs avatar timfeirg avatar tonicmuroq avatar wrfly avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.