Git Product home page Git Product logo

diplomat's Introduction

Diplomat

Build Status

Highly experimental gRPC server providing the also experimental v2 envoy-api, with information backed by Consul

This project is implemented wth Rust

Usage

Diplomat is shipped as a standalone native binary and is configured via a TOML configuration file. Each xDS action can be invoked on the command line for debugging purposes, but to run the service in producution you should use sometihing like:

$ RUST_LOG=info diplomat --config /path/to/config.toml serve

Using the individual xDS APIs is just as simple, with the additional params passed directly on the command line as arguments:

$ diplomat --config /path/to/config.toml eds --service-name foo

Development

As gRPC relies on Protocol Buffers, you will need to ensure that you have the protoc tooling avaialble on your development machine.

Install Rust

Before you start with the rest of this guide, be sure to Install Rust for your appropriate platform.

Installing Protobuf

On OSX install protobuf with Homebrew:

$ brew install protobuf
$ brew install cmake
$ brew install go
# for local dev testing only, can be skipped just to build
$ brew install consul

On Linux, a few additional steps are needed. Sadly, using apt-get install protobuf-compiler does not provide a recent enough version of the protoc compiller. The Envoy .proto files require at least version 3 of the compiller.

$ sudo apt-get install build-essential cmake git libssl-dev golang-go

Then the steps to insall protoc:

# download and unzip the needed tools
$ curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
$ unzip protoc-3.4.0-linux-x86_64.zip -d protoc3
# move the binary onto your $PATH
$ mv protoc3/bin/* /usr/local/bin && chmod 775 /usr/local/bin/protoc
# move the common proto includes onto the include path
$ mv protoc3/include/* /usr/local/include/

Fetching dependencies

Once you have the compiller installed, there is a one-time operation that is needed to fetch the various upstream dependencies for the version of protocol buffers. This has been encoded into the projects make file, so you simply need to run:

$ make proto

This will fetch to github.com and move all the gubbins which was downloaded into a local vendor folder. If for some reason you need to update these files over time, simply run:

$ make clean-full && make proto

Development Builds

# produce a development build (do not use in production)
$ cargo build

# run compilation whenever the source tree changes (useful for dev feedback)
$ cargo watch

Release Builds

Release builds are automatically built for this project and posted on Github Releases for Linux amd64 machines. If you need to build your own release-class binaray for another platform, simply use:

$ make release

By default all builds are devel builds and contains symbols, so making a dedicated release is important.

diplomat's People

Contributors

timperrett 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.