Deploying Choreo Connect as a Standalone Gateway on Kubernetes - Helm Artifacts

Let's deploy an API using ESB API Controller (apictl) on Choreo Connect, which is running on Kubernetes as a Standalone Gateway. You can select one of the options to install Choreo Connect with Helm Chart.

Before you begin

ESB product Docker images

ESB product Docker images used for this Kubernetes deployment are available at DockerHub. It is important to note that they are General Availability (GA) versions and therefore do not include MWARE Updates.

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

Pre-Requisites

Note

If you are using Rancher Desktop, disable the default Traefik ingress controller in order to deploy the Nginx ingress controller. Refer Rancher Docs for more information

Option 1: Install Chart from ESB Helm Chart Repository

Step 1 - Add the ESB Helm chart repository

Add the ESB Helm chart repository by executing the following command.

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

Step 2 - Install Chart

Execute the following command to install the Helm Cart by selecting the helm version you installed.

  • Using Helm v2

    helm install --name <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-1 --namespace <NAMESPACE>
    helm install --name my-release wso2/choreo-connect --version 1.2.0-1 --namespace cc
  • Using Helm v3

    helm install <RELEASE_NAME> wso2/choreo-connect --version 1.2.0-1 --namespace <NAMESPACE> --create-namespace
    helm install my-release wso2/choreo-connect --version 1.2.0-1 --namespace cc --create-namespace

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

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

Please see the following example.

  • Using Helm v2

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

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


Skip the following section "Option 2: Install Chart from Source" since you have already installed Choreo Connect and jump to Access the Choreo Connect deployment for deploying APIs.

Option 2: Install Chart from Source

Step 1 - Get the Helm resources

Check out the Helm Resources for the Choreo Connect Git repository.

  1. Open a terminal and navigate to the location where you want to save the local copy.
  2. Clone the Choreo Connect Git repository with Helm resources:

    git clone https://github.com/wso2/kubernetes-microgateway.git
    git checkout tags/v1.2.0.1

This creates a local copy of wso2/kubernetes-microgateway, which includes all the Helm Resources for Choreo Connect.

Let's refer to the root folder of the local copy as <KUBERNETES_HOME>.

Step 2 - Update the deployment configurations

Follow the steps given below to configure how your Choreo Connect deployment should be set up.

  1. Open the values.yaml file in the <KUBERNETES_HOME>/helm/choreo-connect directory of your local copy.

    Info

    Before you do any changes, go through the default configurations in this file.

  2. Use the following guidelines to update the deployment configurations:

    • Updating the ESB subscription details

      You can update the username and password in the following section. If you don't have an active ESB subscription, leave these parameters empty.

      wso2:
          subscription:
              username: "<username>"
              password: "<password>"

      Alternatively, you can skip this step and pass your subscription details at the time of deploying (see the next step for details).

    • You can update other configurations as required.

  3. Save the values.yaml file.

Step 3 - Deploy Choreo Connect

Once you have set up your Helm resources locally, follow the instructions given below to set up the deployment.

  1. Open a terminal and navigate to the <KUBERNETES_HOME> directory.
  2. Execute the command that is relevant to your Helm version.

    Tip

    Be sure to replace NAMESPACE with the Kubernetes namespace in which your resources are deployed.

    • Using Helm v2

      helm install --name <RELEASE_NAME> ./helm/choreo-connect --namespace <NAMESPACE>
    • Using Helm v3

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

Update configurations during deployment

If required, you can set any of the deployment configurations at the time of running the deployment (instead of specifying them in the values.yaml file). See the examples given below.

  • Setting the subscription username and password.

    --set wso2.subscription.username=<SUBSCRIPTION_USERNAME>
    --set wso2.subscription.username=<SUBSCRIPTION_USERNAME>

Access the Choreo Connect deployment

Follow the steps given below.

  1. Get the external IP (EXTERNAL-IP) of the Ingress resources by listing down the Kubernetes Ingresses.

    kubectl get ing -n <NAMESPACE>
    kubectl get ing -n cc

    Output:

    NAME                                    CLASS    HOSTS              ADDRESS          PORTS     AGE
    <RELEASE_NAME>-choreo-connect-adapter   <none>   adapter.wso2.com   <EXTERNAL-IP>    80, 443   49s
    <RELEASE_NAME>-choreo-connect-router    <none>   gw.wso2.com        <EXTERNAL-IP>    80, 443   49s
    NAME                                    CLASS    HOSTS              ADDRESS          PORTS     AGE
    my-release-choreo-connect-adapter       <none>   adapter.wso2.com   127.0.0.1        80, 443   49s
    my-release-choreo-connect-router        <none>   gw.wso2.com        127.0.0.1        80, 443   49s
  2. Add the above hosts in the /etc/hosts file as follows:

    <EXTERNAL-IP>   adapter.wso2.com
    <EXTERNAL-IP>   gw.wso2.com

Deploy and Invoke Sample API

Follow the Steps 2, 3, 4 in Deploying Choreo Connect as a Standalone Gateway on Kubernetes to deploy and invoke the sample API.

Top