Code Monkey home page Code Monkey logo

openservicemesh / osm Goto Github PK

View Code? Open in Web Editor NEW
2.6K 59.0 279.0 45.58 MB

Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

Home Page: https://openservicemesh.io/

License: Apache License 2.0

Go 98.19% Shell 0.90% Makefile 0.41% Dockerfile 0.01% Smarty 0.14% C++ 0.20% Starlark 0.16%
service-mesh kubernetes

osm's Introduction

⚠️ The OSM project has been officially archived by the CNCF. There will be no more new development on any repo under the OpenServiceMesh organization.⚠️


Open Service Mesh (OSM)

build report codecov License: MIT release

Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

The OSM project builds on the ideas and implementations of many cloud native ecosystem projects including Linkerd, Istio, Consul, Envoy, Kuma, Helm, and the SMI specification.

Table of Contents

Overview

OSM runs an Envoy based control plane on Kubernetes, can be configured with SMI APIs, and works by injecting an Envoy proxy as a sidecar container next to each instance of your application. The proxy contains and executes rules around access control policies, implements routing configuration, and captures metrics. The control plane continually configures proxies to ensure policies and routing rules are up to date and ensures proxies are healthy.

Core Principles

  1. Simple to understand and contribute to
  2. Effortless to install, maintain, and operate
  3. Painless to troubleshoot
  4. Easy to configure via Service Mesh Interface (SMI)

Documentation

Documentation pertaining to the usage of Open Service Mesh is made available at docs.openservicemesh.io.

Documentation pertaining to development, release workflows, and other repository specific documentation, can be found in the docs folder.

Features

  1. Easily and transparently configure traffic shifting for deployments
  2. Secure service to service communication by enabling mTLS
  3. Define and execute fine grained access control policies for services
  4. Observability and insights into application metrics for debugging and monitoring services
  5. Integrate with external certificate management services/solutions with a pluggable interface
  6. Onboard applications onto the mesh by enabling automatic sidecar injection of Envoy proxy

Project status

Attention: ⚠️ The OSM project has been officially archived. Please reference PR Proposal: OSM for Project Archive ⚠️

Support

See SUPPORT

SMI Specification support

Kind SMI Resource Supported Version Comments
TrafficTarget traffictargets.access.smi-spec.io v1alpha3
HTTPRouteGroup httproutegroups.specs.smi-spec.io v1alpha4
TCPRoute tcproutes.specs.smi-spec.io v1alpha4
UDPRoute udproutes.specs.smi-spec.io not supported
TrafficSplit trafficsplits.split.smi-spec.io v1alpha2
TrafficMetrics *.metrics.smi-spec.io v1alpha1 🚧 In Progress 🚧

OSM Design

Read more about OSM's high level goals, design, and architecture.

Install

Prerequisites

  • Kubernetes cluster running an active Kubernetes releases. The range of supported Kubernetes versions is defined in the OSM Helm chart.
  • kubectl current context is configured for the target cluster install
    • kubectl config current-context

Get the OSM CLI

The simplest way of installing Open Service Mesh on a Kubernetes cluster is by using the osm CLI.

Download the osm binary from the Releases page. Unpack the osm binary and add it to $PATH to get started.

sudo mv ./osm /usr/local/bin/osm

Install OSM

$ osm install

OSM Install Demo

See the installation guide for more detailed options.

Demonstration

The OSM Bookstore demo is a step-by-step walkthrough of how to install a bookbuyer and bookstore apps, and configure connectivity between these using SMI.

Using OSM

After installing OSM, onboard a microservice application to the service mesh.

OSM Usage Patterns

  1. Traffic Management
  2. Observability
  3. Certificates
  4. Sidecar Injection

Community

Connect with the Open Service Mesh community:

Development Guide

If you would like to contribute to OSM, check out the development guide.

Code of Conduct

This project has adopted the CNCF Code of Conduct. See CODE_OF_CONDUCT.md for further details.

License

This software is covered under the Apache 2.0 license. You can read the license here.

osm's People

Contributors

aisuko avatar allenlsy avatar bridgetkromhout avatar dependabot[bot] avatar draychev avatar eduser25 avatar flynnduism avatar jaellio avatar johnsonshi avatar jont828 avatar jsturtevant avatar keithmattix avatar ksubrmnn avatar lachie83 avatar mergify[bot] avatar mudit-01 avatar nillsf avatar nojnhuh avatar nshankar13 avatar phillipgibson avatar ritazh avatar sanyakochhar avatar schristoff avatar shalier avatar shashankram avatar shuheiktgw avatar snehachhabria avatar steeling avatar trstringer avatar whitneygriffith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osm's Issues

Introduce Integration / Functional tests

In AGIC we introduced a few levels of tests:

  1. Unit tests
  2. Functional tests
  3. Integration tests (not in the repo yet)

Creating this issues for us to track progress on creating Functional and Integration tests for the SMC.

Note on the AGIC tests: What is now called functional tests, runs a bunch of components together to ensure that they all mesh together as expected. This we run with go test -v $(go list ./functional_tests/... | grep -v /vendor/); echo $?. This is not quite an integration test because it does not use a k8s cluster or an actual App Gway / ARM API.

A good pointer on writing good tests is the following suite in AGIC
Here are examples of starting the Kubernetes informers.

A good starting point for this task would be to perhaps tackle the pkg/smi module, which is very similar to AGIC.

These examples use the Ginkgo test framework.

ingress story

How to integrate service mesh with external traffic if everything is mTLS enabled

gradual mTLS rollout

When service mesh is rolled out to a brownfield a service may need to be mTLS-optional.
If two existing services A-B are enabled for mTLS, there will be before and after mTLS is enabled. Not all pods will be mTLS ready at the same time. This will result in some old pods connecting to new mTLS pods and most likely 503 errors.
To prevent that we need mTLS-optional for a period of time, where if mTLS does not work we switch to non-mTLS.

What about traffic split, where one group is mTLS the other is not?

how to retrieve certs to onboard VM

The options so far are (and they need to be fleshed out a bit more)

  • web service that we expose
  • smc cli command (see #84)
  • rely on kubectl (link to AzureResource CRD) -- @draychev if you wouldn't mind filling in this workflow
  • integrate with azure Key Vault

bug with issuing root cert

something is wrong when we issue root cert with CA

to debug:
generate with openssl and our tool and compare

add labels

add size labels we'll use manually for now and perhaps add in a bot at some point in the future.

bad certificate error from demo

After running ./demo/run-demo.sh, this is what I'm getting:

$ k logs bookstore-7c7c8f78c4-mh7r7 -n smc envoyproxy
[2020-02-27 22:37:08.327][1][debug][http] [source/common/http/async_client_impl.cc:96] async http request response headers (end_stream=true):
':status', '200'
'content-type', 'application/grpc'
'grpc-status', '14'
'grpc-message', 'upstream connect error or disconnect/reset before headers. reset reason: connection termination'

[2020-02-27 22:37:08.327][1][warning][config] [bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:92] StreamAggregatedResources gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers. reset reason: connection termination
[2020-02-27 22:37:08.327][1][debug][config] [source/common/config/grpc_subscription_impl.cc:85] gRPC update for type.googleapis.com/envoy.api.v2.Listener failed
[2020-02-27 22:37:08.327][1][debug][config] [source/common/config/grpc_subscription_impl.cc:85] gRPC update for type.googleapis.com/envoy.api.v2.Cluster failed
[2020-02-27 22:37:08.327][1][debug][pool] [source/common/http/conn_pool_base.cc:265] [C12] client disconnected, failure reason: TLS error: 268436498:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE

From the bookbuyer:

---[ 159 ]-----------------------------------------
Fetching http://bookstore.mesh/counter
Error fetching http://bookstore.mesh/counter: Get http://bookstore.mesh/counter: dial tcp 127.0.0.1:80: connect: connection refused

Fetching http://bookstore.mesh/incrementcounter
Error fetching http://bookstore.mesh/incrementcounter: Get http://bookstore.mesh/incrementcounter: dial tcp 127.0.0.1:80: connect: connection refused

refactor xDS components to not require kubeconfig

Currently, we're passing the kube config file to generate a kubernetes client within each xDS component that it can communicate with the Kubernetes api server. There are ways of generating a client without passing in a kube config file. We'll need to mount a service account to each xDS pod so that it can authenticate inside the cluster like shown here.

rename repo

open service mesh is the only suggestion as of now. Does anyone else have any suggestions?

Move integration tests behind an API in lieu of kubectl from Github

The current Integration Test is invoked with kubectl + creds baked into Github secrets + some bash.
The Go + Bash code needs to be moved behind some sort of a Test infrastructure, so that we don't expose k8s credentials in Github secrets. Github should be making API calls to the test infrastructure to request for a certain commit to be tested. Logs and results will be streamed back.

program envoys to generate metrics

stream metrics configuration messages to envoy proxies. need to still flesh out this story. making sure not to DDoS / throttle / buffer.

add docs around how to run TrafficSplit

@asridharan had some great suggestions in this PR comment.

  • Minor NIT, can we capitalize the beginning of each of the sentence.
  • An overview section would be really helpful. Users will have to build a lot of context to actually run the demo at this point, and most would be lost without explicitly talking to us. I believe the objective is to show traffic split? Would be good to state the goals and than get into the instructions.

add branch protection policy

require at least 1 review/lgtm
larger PRs must have two reviews but that is at the discretion of the author of the PR for now.

Document workflow using osm and helm/kubectl

Demo outline

  • install control plane on k8s via osm install
  • install demo application v1 using kubectl apply -f
  • Follow SMI workflow for TrafficSplit using demo outlined here

Document steps in cmd/smc/README.md for now

add contributing doc

outlines lgtm policy, commit messages, and general working agreement between maintainers discussed in person

Introduce message broker to broadcast announcements from informers to proxies

Currently a single 'announcement' channel is used across the code to announce topology changes to envoy proxies. Since a Go channel is between 2 endpoints only, it is not possible to announce changes from informers to multiple proxies as is.
Introduce a message broker to distribute announcements from informers to subscribed proxies.

TrafficTarget does not work as expected sometimes

Some of us have observed that traffic target does not work as expected.

Here, only "/counter" is allowed based on the TrafficTarget spec but the demo is allowing
"/incrementcounter" as well.

---[ 29 ]-----------------------------------------
Fetching http://bookstore.mesh/counter
Identity: bookstore-1--25412f8
Counter: 12
Server: envoy
Date: Tue, 03 Mar 2020 17:53:24 GMT
Status: 200 OK

Fetching http://bookstore.mesh/incrementcounter
Identity: bookstore-1--25412f8
Counter: 13
Server: envoy
Date: Tue, 03 Mar 2020 17:53:24 GMT
Status: 200 OK


kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha1
metadata:
name: bookstore-service
namespace: "$K8S_NAMESPACE"
destination:

(todo): use service account

kind: ServiceAccount
name: bookstore-1-serviceaccount
namespace: "$K8S_NAMESPACE"
specs:

  • kind: HTTPRouteGroup
    name: bookstore-service-routes
    matches:
    • counter
      sources:

(todo): use service account

  • kind: ServiceAccount
    name: bookbuyer-serviceaccount
    namespace: "$K8S_NAMESPACE"

fix CI

update azure pipelines file with the test scripts

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.