Giter Site home page Giter Site logo

baltekgajda / contrail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juniper/contrail

0.0 1.0 0.0 37.51 MB

Contrail repo for core components (go based)

License: Apache License 2.0

Makefile 0.87% Go 95.88% Dockerfile 0.18% Shell 2.82% Smarty 0.17% HTML 0.07%

contrail's Introduction

[POC] Go code base for Contrail projects

This repository holds Go implementation for Contrail projects. The goal of this project is to realize Go-based implementation & etcd based such as Kubernetes in order to improve performance, scale and ease operation.

We are planning to add following sub components.

  • API Server ( python based VNC API Server equivalent)
  • Sync (ifmap, rabbitMQ related code equivalent but depends on etcd)
  • Agent (SchemaTransformer, Device Manager equivalent)
  • Code generation tool (generateDS equivalent)

Currently, this project is POC stage so any external/internal API or design subject to change up to community discussion.

Development setup

Step1. Install Go and docker

Step2. Go get contrail

go get -u github.com/Juniper/contrail

Note that go get -u github.com/Juniper/contrail/cmd/contrailutil fails because we don't commit generated code.

Step3. Install dependencies

make deps

Step4. Generate code

make generate

Step5. Install code

make install

Step6. Install test environment

# setup testenv using docker
make testenv
# you need wait db process up
make reset_db

Note that these commands use docker command and depending on your docker configuration they may require root permissions. See Docker Documentation for more info.

Try

  • Run processes

    contrail -c sample/contrail.yml run 
    

    Note that you can overwrite configuration parameters using environment variable with prefix "CONTRAIL_"

    For example CONTRAIL_DATABASE_DEBUG is overwriting database.debug value.

    CONTRAIL_DATABASE_DEBUG=true contrail -c sample/contrail.yml run

    Individual processes can be enabled or disabled using the configuration parameters.

  • Run CLI

    export CONTRAIL_CONFIG=sample/cli.yml
    # Show Schema
    contrailcli schema virtual_network
    # Create resources
    contrailcli sync sample/sample_resource.yml
    # List resources
    contrailcli list virtual_network --detail
    # Delete resources
    contrailcli delete sample/sample_resource.yml
    

    For more cli command see CLI Usage,

Schema Files

Note that schema stored here is just a cache for helping development. Developers should make sure download latest schema from http://github.com/Juniper/contrail-api-client

JSON version stored in public/schema.json

Templates for code generation based on this schema are stored in tools/templates Template configuration You can add your template on template_config.yaml.

Testing

make test

You can print out full sql trace too.

CONTRAIL_DATABASE_DEBUG=true make test

Commands

Repository holds source code for following CLI applications:

  • contrail - contains API Server, Agent and Sync processes and Cluster service
  • contrailcli - contains API Server command line client
  • contrailschema - code generator by schema definitions
  • contrailutil - contains development utilities

Show possible commands of application:

contrail -h

Show detailed information about specific command:

contrail <command> -h

Keystone Support

API Server supports Keystone V3 authentication and RBAC. API Server has minimal Keystone API V3 support for standalone use case. See a configuration example

How to contribute

We follow openstack way of review. https://docs.openstack.org/infra/manual/developers.html This is our review system. https://review.opencontrail.org

Step1.

Setup gerrit account. Sign CLA.

Step2.

Install git-review.

pip install git-review

Step3.

Send git review command.

git review

Document

See docs folder.

contrail's People

Contributors

nati avatar cijohnson avatar iosetek avatar kbr- avatar vozhyk- avatar mlynekt avatar katrybacka avatar renkam avatar alrighttheresham avatar rrugge avatar mprasannajuniper avatar wurbanski avatar skizhak avatar jdcodi avatar jayanthir avatar kklimonda-cl avatar damianoneill avatar kklimonda avatar shraddhabhise avatar vmahuli avatar czanpure avatar opencontrail-ci-admin avatar

Watchers

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