choreo-connect

by Helm

Helm chartv1.2.0-3App 1.2.0

A Helm chart for the deployment of Choreo Connect

About this chart

Helm Chart for deployment of Choreo Connect

Contents

  • Prerequisites
  • Quick Start Guide
  • Configuration

Prerequisites

  • WSO2 product Docker images used for the Kubernetes deployment.

    WSO2 product Docker images available at DockerHub package General Availability (GA) versions of WSO2 products with no WSO2 Updates.

    For a production grade deployment of the desired WSO2 product-version, it is highly recommended to use the relevant Docker image which packages WSO2 Updates, available at WSO2 Private Docker Registry. In order to use these images, you need an active WSO2 Subscription.

  • Install Git, Helm and Kubernetes client in order to run the steps provided in the following quick start guide.

  • An already setup Kubernetes cluster. Minimum CPU: 4vCPU Minimum Memory: 4GB

  • Install NGINX Ingress Controller.

  • Add the WSO2 Helm chart repository.

     helm repo add wso2 https://helm.wso2.com && helm repo update
    

Quick Start Guide

1. Install the Helm Chart

You can install the relevant Helm chart either from WSO2 Helm Chart Repository or by source.

Note:

  • NAMESPACE should be the Kubernetes Namespace in which the resources are deployed.

1.1. Install Chart From WSO2 Helm Chart Repository

Helm version 2

helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE>

Helm version 3

helm install <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> --create-namespace

The above steps will deploy the Choreo Connect using WSO2 product Docker images available at DockerHub.

If you are using WSO2 product Docker images available from WSO2 Private Docker Registry, please provide your WSO2 Subscription credentials via input values (using --set argument).

Please see the following example.

 helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> \
  --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> \
  --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>

1.2. Install Chart From Source

In the context of this document,

  • KUBERNETES_HOME will refer to a local copy of the wso2/kubernetes-microgateway Git repository.
  • HELM_HOME will refer to <KUBERNETES_HOME>/helm/choreo-connect.

1. Clone the Kubernetes Resources for WSO2 Choreo Connect Git repository.

git clone https://github.com/wso2/kubernetes-microgateway.git

2. Deploy Helm chart for Choreo Connect deployment.

Helm version 2

helm install --name <RELEASE_NAME> <HELM_HOME>/choreo-connect --namespace <NAMESPACE>

Helm version 3

helm install <RELEASE_NAME> <HELM_HOME>/choreo-connect --namespace <NAMESPACE> --create-namespace

The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.

If you are using WSO2 product Docker images available from WSO2 Private Docker Registry, please provide your WSO2 Subscription credentials via input values (using --set argument).

Please see the following example.

 helm install --name <RELEASE_NAME> <HELM_HOME>/choreo-connect --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>

2. Deployment Mode (Deployment Options)

There are two types of deployment options namely,

  • WSO2 API Manager as a Control Plane
  • Standalone Gateway

For more information, please refer Choreo Connect Deployment Options

2.1. Standalone Mode (Default)

The following example shows how to deploy Choreo Connect with "Standalone" deployment mode. This is the default mode, hence if you have not specified wso2.deployment.mode "Standalone" deployment mode is applied.

Helm v2

helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> \
  --set wso2.deployment.mode=STANDALONE

Helm v3

helm install <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> --create-namespace
  --set wso2.deployment.mode=STANDALONE

2.2. WSO2 API Manager as a Control Plane

The following deployment option require a Kubernetes cluster with following resources.

Setup 1: Deploy WSO2 API Manager

Add the WSO2 Helm chart repository.

 helm repo add wso2 https://helm.wso2.com && helm repo update

Helm version 2

helm install --name apim-as-cp wso2/am-single-node --version 4.2.0-1 --namespace apim \
  --set wso2.deployment.am.ingress.gateway.hostname=gw.wso2.com \
  --set wso2.deployment.am.ingress.gateway.enabled=false

Helm version 3

helm install apim-as-cp wso2/am-single-node --version 4.2.0-1 --namespace apim --create-namespace \
  --set wso2.deployment.am.ingress.gateway.hostname=gw.wso2.com \
  --set wso2.deployment.am.ingress.gateway.enabled=false

NOTE: If you do not have sufficient resources you can adjust them setting following values when installing the chart.

--set wso2.deployment.am.resources.requests.memory=2Gi \
--set wso2.deployment.am.resources.requests.cpu=1000m \
--set wso2.deployment.am.resources.limits.memory=2Gi \
--set wso2.deployment.am.resources.limits.cpu=1000m

The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub, in the namespace apim, with the service name wso2am-single-node-am-service and with the hostname am.wso2.com.

Obtain the external IP (EXTERNAL-IP) of the API Manager Publisher-DevPortal Ingress resource.

kubectl get ing -n apim wso2am-single-node-am-ingress

Add a DNS record mapping the hostnames and the external IP.

If the defined hostnames (in the previous step) are backed by a DNS service, add a DNS record mapping the hostnames and the external IP (EXTERNAL-IP) in the relevant DNS service.

If the defined hostnames are not backed by a DNS service, for the purpose of evaluation you may add an entry mapping the hostnames and the external IP in the /etc/hosts file at the client-side.

<EXTERNAL-IP>  am.wso2.com

For more information on installing WSO2 API Manager, refer the repository wso2/kubernetes-apim

Setup 2: Deploy Choreo Connect

The following example shows how to deploy Choreo Connect with "WSO2 API Manager as a Control Plane" deployment mode.

Helm v2

helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> \
  --set wso2.deployment.mode=APIM_AS_CP \
  --set wso2.apim.controlPlane.hostName=am.wso2.com \
  --set wso2.apim.controlPlane.serviceName=wso2am-single-node-am-service.apim \
  --set wso2.apim.controlPlane.skipSSLVerification=true

Helm v3

helm install <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> --create-namespace \
  --set wso2.deployment.mode=APIM_AS_CP \
  --set wso2.apim.controlPlane.hostName=am.wso2.com \
  --set wso2.apim.controlPlane.serviceName=wso2am-single-node-am-service.apim \
  --set wso2.apim.controlPlane.skipSSLVerification=true

Note:

We are setting wso2.apim.controlPlane.skipSSLVerification=true in this quick start guide because we are using default certificates of WSO2 APIM and Choreo Connect. For production deployment, you do not want to set this value to true (the default value is false).

3. Choreo Analytics

If you need to enable Choreo Analytics with Choreo Connect, please follow the documentation on API Analytics Getting Started Guide to obtain the on-prem key for Analytics.

The following example shows how to enable Analytics with the helm charts.

Helm v2

helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> \
  --set wso2.choreoAnalytics.enabled=true \
  --set wso2.choreoAnalytics.endpoint=<CHOREO_ANALYTICS_ENDPOINT> \
  --set wso2.choreoAnalytics.onpremKey=<ONPREM_KEY>

Helm v3

helm install <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-3 --namespace <NAMESPACE> --create-namespace \
  --set wso2.choreoAnalytics.enabled=true \
  --set wso2.choreoAnalytics.endpoint=<CHOREO_ANALYTICS_ENDPOINT> \
  --set wso2.choreoAnalytics.onpremKey=<ONPREM_KEY>

You will be able to see the Analytics data when you log into Choreo Analytics Portal.

4. Obtain the external IP

1. Deployment Mode: Standalone

Obtain the external IP (EXTERNAL-IP) of the Choreo Connect Ingress resources, by listing down the Kubernetes Ingresses.

kubectl get ing -n <NAMESPACE>

The output under the relevant column stands for the following.

Choreo Connect Adapter

  • NAME: Metadata name of the Kubernetes Ingress resource (Default to "<RELEASE_NAME>-choreo-connect-adapter")
  • HOSTS: Hostname of the Choreo Connect Adapter (Default to "adapter.wso2.com")
  • ADDRESS: External IP (EXTERNAL-IP) exposing the Choreo Connect Adapter to outside of the Kubernetes environment
  • PORTS: Externally exposed service ports of the Choreo Connect Adapter

Choreo Connect Router

  • NAME: Metadata name of the Kubernetes Ingress resource (Default to "<RELEASE_NAME>-choreo-connect-router")
  • HOSTS: Hostname of the router service (Default to "gw.wso2.com")
  • ADDRESS: External IP (EXTERNAL-IP) exposing the router to outside of the Kubernetes environment
  • PORTS: Externally exposed router ports of the Choreo Connect

2. Deployment Mode: API Manager as Control Plane

Obtain the external IP (EXTERNAL-IP) of the Choreo Connect Ingress resources, by listing down the Kubernetes Ingresses.

kubectl get ing -n apim

The output under the relevant column stands for the following.

API Manager Control Plane

  • NAME: Metadata name of the Kubernetes Ingress resource (wso2am-pattern-3-am-cp-ingress)
  • HOSTS: Hostname of the WSO2 API Manager's Control Plane service (am.wso2.com)
  • ADDRESS: External IP (EXTERNAL-IP) exposing the API Manager's Control Plane service to outside of the Kubernetes environment
  • PORTS: Externally exposed service ports of the API Manager's Control Plane service
kubectl get ing -n <NAMESPACE>

The output under the relevant column stands for the following.

Choreo Connect Router

  • NAME: Metadata name of the Kubernetes Ingress resource (Default to "<RELEASE_NAME>-choreo-connect-router")
  • HOSTS: Hostname of the router service (Default to "gw.wso2.com")
  • ADDRESS: External IP (EXTERNAL-IP) exposing the router to outside of the Kubernetes environment
  • PORTS: Externally exposed router ports of the Choreo Connect

5. Add a DNS record mapping the hostnames and the external IP

If the defined hostnames (in the previous step) are backed by a DNS service, add a DNS record mapping the hostnames and the external IP (EXTERNAL-IP) in the relevant DNS service.

If the defined hostnames are not backed by a DNS service, for the purpose of evaluation you may add an entry mapping the hostnames and the external IP in the /etc/hosts file at the client-side.

6. Access Services

1. Deployment Mode: Standalone

  • Adapter Endpoint: https://<wso2.deployment.adapter.ingress.hostname> (Default to https://adapter.wso2.com)
  • Router Endpoint: https://<wso2.deployment.gatewayRuntime.router.ingress.hostname> (Default to https://gw.wso2.com)

Follow the document Deploying a REST API in Choreo Connect to deploy an API.

2. Deployment Mode: API Manager as Control Plane

Follow the document Deploying a REST API in Choreo Connect to deploy an API.

Configuration

a. The default product configurations are available at <HELM_HOME>/confs folder. Change the configurations as necessary.

b. Open the <HELM_HOME>/values.yaml and provide the following values.

WSO2 Subscription Configurations

ParameterDescriptionDefault Value
wso2.subscription.usernameYour WSO2 Subscription username-
wso2.subscription.password

Deploy choreo-connect with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has choreo-connect on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchoreo-connect is pinned at v1.2.0-3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply