am-single-node
by Helm
A Helm chart for the deployment of WSO2 API Manager Single Node.
About this chart
Helm Chart for deployment of WSO2 API Manager
Resources for building a Helm chart for deployment of Single Node API Manager.
For advanced details on the deployment pattern, please refer to the official documentation.
Contents
- Prerequisites
- Quick Start Guide
- Configuration
- Runtime Artifact Persistence and Sharing
- Managing Java Keystores and Truststores
- Configuring SSL in Service Exposure
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.
-
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:
NAMESPACEshould be the Kubernetes Namespace in which the resources are deployed.
Install Chart From WSO2 Helm Chart Repository
Helm version 2
helm install --name <RELEASE_NAME> wso2/am-single-node --version 4.2.0-1 --namespace <NAMESPACE>
Helm version 3
-
Deploy the Kubernetes resources using the Helm Chart
helm install <RELEASE_NAME> wso2/am-single-node --version 4.2.0-1 --namespace <NAMESPACE> --create-namespace
The above steps will deploy the deployment pattern using WSO2 product Docker images available in 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/am-single-node --version 4.2.0-1 --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>
If you are using a custom WSO2 Docker images you will need to provide those information via the input values. Please refer API Manager Server Configurations
Install Chart From Source
In the context of this document,
KUBERNETES_HOMEwill refer to a local copy of thewso2/kubernetes-apimGit repository.HELM_HOMEwill refer to<KUBERNETES_HOME>/simple.
Clone the Helm Resources for WSO2 API Manager Git repository.
git clone https://github.com/wso2/kubernetes-apim.git
Deploy Helm chart for WSO2 API Manager Single Node deployment.
Helm version 2
helm install --dep-up --name <RELEASE_NAME> <HELM_HOME>/am-single --version 4.2.0-1 --namespace <NAMESPACE>
Helm version 3
-
Deploy the Kubernetes resources using the Helm Chart
helm install <RELEASE_NAME> <HELM_HOME>/am-single --version 4.2.0-1 --namespace <NAMESPACE> --dependency-update --create-namespace
The above steps will deploy the deployment pattern using WSO2 product Docker images available in 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>/am-single --version 4.2.0-1 --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>
If you are using a custom WSO2 Docker images you will need to provide those information via the input values. Please refer API Manager Server Configurations
Note: If you are using Rancher Desktop for the Kubernetes cluster, add the following changes.
- Change
storageClasstolocal-pathinvalues.yaml.- Change
accessModesinPersistent Volume ClaimstoReadWriteOnce.
Choreo Analytics
If you need to enable Choreo Analytics with WSO2 API Manager, please follow the documentation on Register for Analytics 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/am-single-node --version 4.2.0-1 --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/am-single-node --version 4.2.0-1 --namespace <NAMESPACE> --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint=<CHOREO_ANALYTICS_ENDPOINT> --set wso2.choreoAnalytics.onpremKey=<ONPREM_KEY> --create-namespace
You will be able to see the Analytics data when you log into Choreo Analytics Portal.
2. Obtain the external IP
Obtain the external IP (EXTERNAL-IP) of the API Manager Ingress resources, by listing down the Kubernetes Ingresses.
kubectl get ing -n <NAMESPACE>
The output under the relevant column stands for the following.
API Manager Publisher-DevPortal
- NAME: Metadata name of the Kubernetes Ingress resource (defaults to
wso2am-single-node-am-ingress) - HOSTS: Hostname of the WSO2 API Manager service (
<wso2.deployment.am.ingress.management.hostname>) - ADDRESS: External IP (
EXTERNAL-IP) exposing the API Manager service to outside of the Kubernetes environment - PORTS: Externally exposed service ports of the API Manager service
API Manager Gateway
- NAME: Metadata name of the Kubernetes Ingress resource (defaults to
wso2am-single-node-am-gateway-ingress) - HOSTS: Hostname of the WSO2 API Manager's Gateway service (
<wso2.deployment.am.ingress.gateway.hostname>) - ADDRESS: External IP (
EXTERNAL-IP) exposing the API Manager's Gateway service to outside of the Kubernetes environment - PORTS: Externally exposed service ports of the API Manager' Gateway service
API Manager WebSub
- NAME: Metadata name of the Kubernetes Ingress resource (defaults to
wso2am-single-node-am-websub-ingress) - HOSTS: Hostname of the WSO2 API Manager's Gateway (WebSub) service (
<wso2.deployment.am.ingress.websub.hostname>) - ADDRESS: External IP (
EXTERNAL-IP) exposing the API Manager's Gateway service to outside of the Kubernetes environment - PORTS: Externally exposed service ports of the API Manager' Gateway (WebSub) service
3. 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> <wso2.deployment.am.ingress.management.hostname> <wso2.deployment.am.ingress.gateway.hostname>
4. Access Management Consoles
-
API Manager Publisher:
https://<wso2.deployment.am.ingress.management.hostname>/publisher -
API Manager DevPortal:
https://<wso2.deployment.am.ingress.management.hostname>/devportal
Configuration
The following tables lists the configurable parameters of the chart and their default values.
WSO2 Subscription Configurations
| Parameter | Description | Default Value |
|---|---|---|
wso2.subscription.username | Your WSO2 Subscription username | - |
wso2.subscription.password | Your WSO2 Subscription password | - |
wso2.choreoAnalytics.enabled | Chorero Analytics enabled or not | false |
wso2.choreoAnalytics.endpoint | Choreo Analytics endpoint | https://analytics-event-auth.choreo.dev/auth/v1 |
wso2.choreoAnalytics.onpremKey | On-prem key for Choreo Analytics | - |
If you do not have an active WSO2 subscription, do not change the parameters wso2.subscription.username and wso2.subscription.password.
Chart Dependencies
| Parameter | Description | Default Value |
|---|---|---|
wso2.deployment.dependencies.mysql | Enable the deployment and usage of WSO2 API Management MySQL based Helm Chart | true |
wso2.deployment.dependencies.nfsProvisioner | Enable the deployment and usage of NFS Server Provisioner (https://github.com/helm/charts/tree/master/stable/nfs-server-provisioner) | true |
Persistent Runtime Artifact Configurations
| Parameter | Description | Default Value |
|---|---|---|
wso2.deployment.persistentRuntimeArtifacts.storageClass | Appropriate Kubernetes Storage Class | nfs |
wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.executionPlans | Capacity for execution plans shared between the Traffic Manager profile instances | 20M |
wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.synapseConfigs | Capacity for synapse artifacts of APIs shared between the Gateway profile instances | 50M |
wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled | Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled | false |
wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase | Capacity for persisting the H2 based local Carbon database file | 50M |
wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData | Capacity for persisting the Apache Solr indexed data | 50M |
API Manager Server Configurations
| Parameter | Description | Default Value |
|---|---|---|
wso2.deployment.am.dockerRegistry | Registry location of the Docker image to be used to create API Manager instances | - |
Deploy am-single-node with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has am-single-node 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartam-single-node is pinned at v4.2.0-2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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