Git Product home page Git Product logo

python-agent's Introduction

#pyagent

Build Status

This agent runs on compute nodes in a Rancher cluster. It receives events from the Rancher server, acts upon them, and returns response events.

Deployment notes

This agent is typically deployed inside a container on Rancher compute nodes. See the Rancher project for details.

Setup and Develiopment notes

On Mac OS X

Steps to get the tests running and passing:

  1. Have boot2docker up and running
  2. Install libvirt and pkg-config (they're needed to cleanly install requirements.txt)
$ brew install libvirt
$ brew install pkg-config
  1. Create virtual environment and install python dependencies:
$ mkdir venv && virtualenv venv && . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -r test-requirements.txt
  1. Run the tests:
mkdir $HOME/cattle-home
$ CATTLE_DOCKER_USE_BOOT2DOCKER=true DOCKER_TEST=true CATTLE_HOME=$HOME/cattle-home \
py.test tests

Or you can do the equivalent in PyCharm. An explanation of those environment variables:

  • CATTLE_DOCKER_USE_BOOT2DOCKER=true tells the docker client to use the connection settings derived from boot2docker shellinit. You need this because boot2docker has TLS enabled by default.
  • DOCKER_TEST=true tells the test framework to run the docker tests. They're disabled by default. We'll probably turn them on by default in the future.
  • CATTLE_HOME is needed for some temporary files that are written (locks, specifically)

python-agent's People

Contributors

ibuildthecloud avatar cjellick avatar cloudnautique avatar wlan0 avatar

Watchers

James Cloos avatar Pranav Saxena 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.