• Stars
    star
    286
  • Rank 141,621 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 17 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Choreo Connect is a cloud-native, open-source, and developer-centric API gateway.

Choreo Connect

Build Status License Discord

Choreo Connect is a cloud-native, open-source, and developer-centric API gateway proxy. It provides first-class support for K8s while facilitating an array of API management quality of services (QoS), such as message security rate-limiting, observability, and message mediation.

It is powered by Envoy Proxy!

Why Choreo Connect

Microservices have become the norm for modern application architecture. Workloads of modern applications are spread across many groups of microservices, cloud services and legacy services. The characteristics and behaviors of such heterogeneous services have a massive diversity. Such as authentication mechanisms, message formats, high availability factors and so on. The Choreo Connect is designed to expose heterogeneous microservices as APIs to end consumers using a common API interface based on the Open API Specification. This helps expose microservices using a unified interface to external consumers, internal consumers and partners. It applies the common quality of service attributes on API requests such as security, rate limiting and analytics and also offers a wide range of features which helps organizations to deploy APIs microservice architectures efficiently.

Quick Start Guide

Prerequisites

  • On your machine, you should have installed,
    • docker
    • docker-compose

Let's host our first API on Choreo Connect. We will be exposing the publicly available petstore services via Choreo Connect.

  1. First download the latest CLI tool(APICTL) and the Choreo Connect distributions and extract them to a folder of your choice.

  2. Using your command line client tool add the CLI_HOME folder to your PATH variable.

    export PATH=$PATH:<CLI_HOME>
    
  3. Let's create our first project with name "petstore" by adding the OpenAPI definition of the petstore . You can do that by executing the following command using your command line tool.

    apictl init petstore --oas https://petstore.swagger.io/v2/swagger.json
    

    Note: If you have used a previous version of apictl before, remember to delete the directories .wso2apictl and .wso2apictl.local that are located in /home/<your-pc-username>. Deleting them will make the newer apictl create them again, with content compatible with the current version. You can backup the files before deleting them, in case you had to refer them later.

  4. The project is now initialized. You should notice a directory with name "petstore" being created in the location where you executed the command.

  5. Now let's start the Choreo Connect on docker by executing the docker compose script inside the CC_HOME/docker-compose/choreo-connect/. Navigate to CC_HOME/docker-compose/choreo-connect/ and execute the following command

    docker-compose up -d
    

    Once containers are up and running, we can monitor the status of the containers using the following command

    docker ps | grep choreo-connect-
    

    The user credentials can be configured in the configurations file CC_HOME/docker-compose/choreo-connect/conf/config.tomlinside Choreo Connect distribution. admin:admin is the default accepted credentials by the Choreo Connect adapter.

    Note: Following apictl commands are being executed with -k flag to avoid SSL verification with the Choreo Connect. To communicate via https without skipping SSL verification (without -k flag), add the cert of Choreo Connect into /home/<your-pc-username>/.wso2apictl/certs.

  6. To use apictl with Choreo Connect, let's first add a environment specifically for our Choreo Connect deployment. The environment will hold the adapter URL for further commands.

    apictl mg add env dev --adapter https://localhost:9843
    
  7. Next you can use the following command to login to the above Choreo Connect cluster (in other words login to the Choreo Connect adapter).

    apictl mg login dev -k
    

    or

    apictl mg login dev -u admin -p admin -k
    
  8. Now let's deploy our first API to Choreo Connect using the project created in the step 3. Navigate to the location where the petstore project was initialized. Execute the following command to deploy the API in the Choreo Connect deployment.

    apictl mg deploy api -f petstore -e dev -k
    
  9. The next step would be to invoke the API using a REST tool. Since APIs on the Choreo Connect are by default secured. We need a valid token in order to invoke the API. Let's get a test token from the Choreo Connect using its /testkey endpoint.

    TOKEN=$(curl -X POST "https://localhost:9095/testkey" -d "scope=read:pets" -H "Authorization: Basic YWRtaW46YWRtaW4=" -k -v)
    

    Note: Recommendation is to disable this /testkey endpoint in production environments as it is only for testing purposes.

  10. We can now invoke the API running on the Choreo Connect using cURL as below.

    curl -X GET "https://localhost:9095/v2/pet/findByStatus?status=available" -H "accept: application/json" -H "Authorization:Bearer $TOKEN" -k
    
  11. Try out the following commands with apictl.

    List APIs          - apictl mg get apis -e dev -k
    Undeploy API       - apictl mg undeploy api -n SwaggerPetstore -v 1.0.6 -e dev -k
    Logout             - apictl mg logout dev   
    Remove Environment - apictl mg remove env dev
    

Choreo Connect Components

  • APICTL : The APICTL is used to initiate Choreo Connect projects as well as to deploy APIs in to Choreo Connect environment by developers.

  • Router : The client facing component of the Choreo Connect. The downstream request will reach the proxy component and it will route the request to the desired destination.

  • Enforcer : This component will intercept the request going through the Router and applies security, rate limiting, publish analytics data and etc. Router will forward the request to this component in order to validate and to add additional QoS.

  • Adapter : The component configures the Router, and the enforcer components dynamically during the runtime upon receiving an event for API creation or update.

Architecture

The following diagram illustrates how the Choreo Connect expose microservices using Open API definition as well as exposing APIs from WSO2 API Manager.

Alt text

Choreo Connect Modes

  • Choreo Connect with WSO2 API Manager as a Control Plane

    Choreo Connect can use WSO2 API Manager as its control plane, whether it's in the cloud or on-premise.

  • Choreo Connect as a Standalone Gateway

    Without the API Manager as the control plane, Choreo Connect can be deployed as a standalone gateway. APICTL is a command-line program that can be used to deploy APIs. By incorporating the OpenAPI specifications in APICTL, it is possible to develop API projects.

Documentation

You can refer Choreo Connect Documentation.

More Repositories

1

reference-architecture

The Reference Architecture for Agility is a technology-neutral logical architecture based on a disaggregated cloud-based model.
1,680
star
2

product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
Java
759
star
3

product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
Java
657
star
4

msf4j

WSO2 Microservices Framework for Java (MSF4J)
Java
401
star
5

product-ei

An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system.
Java
316
star
6

cellery

Build run and manage code-first composites on Kubernetes
Go
194
star
7

micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
Java
193
star
8

product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
Java
174
star
9

carbon-apimgt

Java
159
star
10

apk

Official Repository for APK distribution
Java
149
star
11

WSO2-Training

142
star
12

carbon-kernel

Java
138
star
13

docker-apim

Docker and Docker Compose resources for WSO2 API Manager
Jinja
130
star
14

ETAC

A one-page, Visual Canvas for Emerging Technology Evaluation, in the style of “the Business model Canvas".
127
star
15

k8s-api-operator

API Operator for Kubernetes
Go
114
star
16

balana

Java
113
star
17

streaming-integrator

A stream processing runtime that allows connecting any streaming data source to any destination and act on it
Python
112
star
18

jaggery

The delicious Javascript framework
Java
112
star
19

kubernetes-apim

Kubernetes and Helm resources for WSO2 API Manager
Smarty
105
star
20

charon

Java
102
star
21

carbon-identity-framework

Java
101
star
22

wso2-synapse

Java
98
star
23

docker-is

Docker and Docker Compose resources for WSO2 Identity Server
Dockerfile
86
star
24

reference-methodology

Integration projects today follow a time-consuming waterfall model, ill-suited to solving complex integration challenges. In response, WSO2 has developed organizational, project management, and technical expertise to help IT organizations transform integration projects to a more efficient and scalable continuous agile approach.
85
star
25

product-sp

An open source, cloud-native streaming data integration and analytics product optimized for agile digital businesses
Python
82
star
26

cdmf-agent-android

Java
76
star
27

ballerina-integrator

A powerful, simple-to-learn, code-driven approach to programming integrations
Java
70
star
28

docs-apim

Java
70
star
29

identity-apps

TypeScript
67
star
30

istio-apim

Java
65
star
31

carbon-mediation

Java
65
star
32

kubernetes-is

Kubernetes and Helm resources for WSO2 Identity Server
Shell
64
star
33

carbon-analytics

JavaScript
63
star
34

docs-ei

CSS
63
star
35

docs-is

CSS
62
star
36

integration-studio

WSO2 Integration Studio is a development environment used to design integration scenarios and develop them.
Java
60
star
37

product-app-manager

Welcome to the WSO2 App Manager source code! For info on working with the WSO2 App Manager repository and contributing code, click the link below.
HTML
56
star
38

k8s-wso2am-operator

WSO2 API Manager Operator for Kubernetes
Go
55
star
39

analytics-apim

Analytics for APIM
JavaScript
52
star
40

cellery-spec

52
star
41

Linux-training

Host Linux Training public documents
Shell
52
star
42

carbon-device-mgt

Java
51
star
43

developer-studio

WSO2 Developer Studio IDE Public Repository
Java
51
star
44

carbon-dashboards

JavaScript
51
star
45

caramel

A bootstrap project to create fully dynamic websites using jaggery
JavaScript
50
star
46

carbon-commons

Java
49
star
47

identity-api-server

Java
49
star
48

soap-to-rest

Library capable of converting SOAP backend service to REST backends
Java
48
star
49

security-tools

Java
48
star
50

product-es

Welcome to the WSO2 Enterprise Store source code! For info on working with the WSO2 Enterprise Store repository and contributing code, click the link below.
Java
48
star
51

apim-apps

WSO2 API Manager portals web UI apps
JavaScript
47
star
52

kubernetes-pipeline

This project contains the Helm resources required to deploy CI/CD Pipeline in a Kubernetes environment for WSO2 products.
Dockerfile
47
star
53

cellery-controller

Go
46
star
54

carbon-business-process

Java
46
star
55

carbon-data

Data services and related components
Java
46
star
56

streaming-integrator-tooling

Java
45
star
57

carbon-analytics-common

Java
45
star
58

cellery-samples

JavaScript
45
star
59

cellery-observability

JavaScript
45
star
60

wso2-axis2

Java
44
star
61

cellery-distribution

Java
44
star
62

orbit

Java
44
star
63

carbon-appmgt

JavaScript
44
star
64

wso2-axis2-transports

Java
44
star
65

samples-is

JavaScript
43
star
66

mule-conversion-samples

Sample projects to help migrate from Mulesoft Anypoint Platform
43
star
67

carbon-governance

jagery
Java
43
star
68

k8s-wso2is-operator

Identity Server Kubernetes Controller
Go
43
star
69

jaggery-extensions

Extensions repository for Jaggery
JavaScript
43
star
70

carbon-registry

Java
43
star
71

product-mi-tooling

Tooling for Micro Integrator
Java
43
star
72

VizGrammar

Interactive Generic Visualization library for Javascript that is based on d3.js
JavaScript
43
star
73

carbon-ml

Java
42
star
74

code-quality-tools

42
star
75

ansible-ei

Jinja
42
star
76

product-as

Welcome to the WSO2 Application Server source code! For info on working with the WSO2 Application Server repository and contributing code, click the link below.
Java
42
star
77

analytics-solutions

JavaScript
42
star
78

oxygen-ui

The Design System powering WSO2 products.
TypeScript
42
star
79

carbon-device-mgt-plugins

JavaScript
42
star
80

cdmf-agent-ios

Objective-C
42
star
81

carbon-deployment

Java
42
star
82

identity-api-user

Java
41
star
83

product-apim-tooling

Go
41
star
84

wso2-commons-vfs

Java
41
star
85

cellery-security

Java
41
star
86

carbon-event-processing

JavaScript
41
star
87

carbon-platform-integration

Java
41
star
88

container-guide

The Guide of Best Practices for Running WSO2 Products on Containerized Platforms
41
star
89

ballerina-vscode

To keep Ballerina VSCode plugin related issues, discussions, etc.
41
star
90

devstudio-tooling-esb

Java
40
star
91

choreo-samples

This will contain integration and service samples displayed in choreo.
TypeScript
40
star
92

identity-rest-dispatcher

Java
40
star
93

ob-conformance-suite

CSS
40
star
94

maven-tools

Java
40
star
95

carbon-transports

Java
40
star
96

andes

Java
39
star
97

docs-open-banking

CSS
39
star
98

docs-choreo-dev

Choreo documentation repository for ongoing dev tasks.
HTML
39
star
99

puppet-apim

Shell
39
star
100

carbon-business-messaging

Java
39
star