GithubHelp home page GithubHelp logo

kryndex / felix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from projectcalico/felix

0.0 2.0 0.0 8.94 MB

Project Calico's per-host agent Felix, responsible for programming routes and security policy.

Home Page: http://projectcalico.org/

License: Apache License 2.0

Makefile 1.69% Go 95.19% Shell 3.12%

felix's Introduction

Build Status Coverage Status Slack Status IRC Channel

Project Calico

Note that the documentation in this repo is targeted at Calico contributors.

Documentation for Calico users is here:
http://docs.projectcalico.org

This repository contains the source code for Project Calico's per-host daemon, Felix.

How can I get support for contributing to Project Calico?

The best place to ask a question or get help from the community is the calico-users #slack. We also have an IRC channel.

Who is behind Project Calico?

Tigera, Inc. is the company behind Project Calico and is responsible for the ongoing management of the project. However, it is open to any members of the community โ€“ individuals or organizations โ€“ to get involved and contribute code.

Contributing

Thanks for thinking about contributing to Project Calico! The success of an open source project is entirely down to the efforts of its contributors, so we do genuinely want to thank you for even thinking of contributing.

Before you do so, you should check out our contributing guidelines in the CONTRIBUTING.md file, to make sure it's as easy as possible for us to accept your contribution.

How do I build Felix?

Felix mostly uses Docker for builds. We develop on Ubuntu 16.04 but other Linux distributions should work (there are known Makefile that prevent building on OS X).
To build Felix, you will need:

  • A suitable linux box.
  • To check out the code into your GOPATH.
  • Docker >=1.12
  • GNU make.
  • Plenty of disk space (since the builds use some heavyweight full-OS containers in order to build debs and RPMs).

Then, as a one-off, run

make update-tools

which will install a couple more go tools that we haven't yet containerised.

Then, to build the calico-felix binary:

make bin/calico-felix

or, the calico/felix docker image:

make calico/felix

How can I run Felix's unit tests?

To run all the UTs:

make ut

To start a ginkgo watch, which will re-run the relevant UTs as you update files:

make ut-watch

To get coverage stats:

make cover-report

or

make cover-browser

How can a subset of the go unit tests?

If you want to be able to run unit tests for specific packages for more iterative development, you'll need to install

  • GNU make
  • go >=1.7

then run make update-tools to install ginkgo, which is the test tool used to run Felix's unit tests.

There are several ways to run ginkgo. One option is to change directory to the package you want to test, then run ginkgo. Another is to use ginkgo's watch feature to monitor files for changes:

cd go
ginkgo watch -r

Ginkgo will re-run tests as files are modified and saved.

How do I build packages/run Felix?

Docker

After building the docker image (see above), you can run Felix and log to screen with, for example:

docker run --privileged \
           --net=host \
           -v /run:/run \
           -e FELIX_LOGSEVERITYSCREEN=INFO \
           calico/felix

Notes:

  • --privileged is required because Felix needs to execute iptables and other privileged commands.
  • --net=host is required so that Felix can manipulate the routes and iptables tables in the host namespace (outside its container).
  • -v /run:/run is required so that Felix shares the global iptables file lock with other processes; this allows Felix and other daemons that manipulate iptables to avoid clobbering each other's updates.
  • -e FELIX_LOGSEVERITYSCREEN=INFO tells Felix to log at info level to stderr.

Debs and RPMs

The Makefile has targets for building debs and RPMs for different platforms. By using docker, the build does not need to be run on the target platform.

make deb
make rpm

The packages (and source packages) are output to the dist directory.

felix's People

Contributors

fasaxc avatar lukasa avatar matthewdupre avatar liljenstolpe avatar alexwlchan avatar caseydavenport avatar wmuizelaar avatar tomdee avatar djlwilder avatar bcreane avatar lwr20 avatar robbrockbank avatar heschlie avatar nwoodmsft avatar davelangridge avatar gunjan5 avatar song-jiang avatar ozdanborne avatar matmeredith avatar trimbiggs avatar artem-panchenko avatar elfchief avatar mikespreitzer avatar mgleung avatar mikev avatar djosborne avatar ahrkrak avatar saumoh avatar paultiplady avatar logan2211 avatar

Watchers

James Cloos 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.