Coder Social home page Coder Social logo

cn-sample-service's Introduction

CN sample service

Build Status Coverage Status Go Report Card GoDoc GitHub license

The CN sample service showcases the extensibility of vpp-agent and cn-infra. Both vpp-agent and cn-infra have their own examples but this dedicated repository demonstrates the dependency management and building using makefiles. Use this repository as skeleton for your software projects (copy&paste it at the very beginning).

sample_service

The sample service repository contains:

  • Hello World! microservice - minimalistic extension of the vpp-agent
  • REST & Cassandra microservice - comming soon (it is supposed to showcase REST API calls that work with Cassandra)
  • Plugins from vpp-agent and cn-infra
  • Core from cn-infra - lifecycle management of plugins (loading, initialization, unloading)

Quickstart

The basic steps to setup a project:

Initialize a tool for management dependencies. This example uses glide. We assume that glide is already installed if not, follow the instruction in its README.

glide init

Modify the content of the glide.yaml that defines dependencies of the project. It is recommanded to pin dependencies to a particular commit id or a tag. The initial content might look like this:

package: cn-sample-service
import:
- package: github.com/ligato/vpp-agent
  version: 9b1e57b07a1dbda7e76f2fb0a7e2f584eb568b92

Download initial set of dependencies

glide install --strip-vendor

Once the initial set of dependencies is downloaded we can move to the writing of custom plugin. The common tasks related to project development such as building, updating of dependencies, running of static analysis and so on... can be automated using Makefile. Take a look at the Makefile in this repository.

Makefile

Source codes in this repository have own Makefile. This Makefile can be modified and extended based on requirements of a particular software project. You can see that there are included targets from vpp-agent Makefile to minimize repetitive lines in Makefile.

Glide

Glide.yaml contains import of the vpp-agent therefore vendor directory in source codes of this repository will contain all transitive dependencies of the vpp-agent. Note, if you use just subset of these vendor packages golang will statically build/link only the subset (not all packages in vendor).

cn-sample-service's People

Contributors

mpundlik avatar lukasmacko avatar jozef-slezak 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.