diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0830686..e4d37bb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,70 +1,23 @@
# Changelog
-All notable changes to Kubernetes and Helm resources for WSO2 API Management version `3.2.x` in each resource release,
+All notable changes to Kubernetes and Helm resources for WSO2 API Management version `4.0.x` in each resource release,
will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
-## [v3.2.0.4] - 2021-05-03
-
-### Changed
-
-- Use MySQL, nfs-server-provisioner from WSO2 repo (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/488))
-
-For detailed information on the tasks carried out during this release, please see the GitHub milestone
-[v3.2.0.4](https://github.com/wso2/kubernetes-apim/milestone/20).
-
-## [v3.2.0.3] - 2020-12-17
-
-### Changed
-
-- Use Updates 2.0 images when subscription is enabled (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/478))
-- Change MySQL dependency to bitnami repo (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/479))
-- Use nfs-server-provisioner from kvaps (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/481))
-
-## [v3.2.0.2] - 2020-09-16
-
-### Changed
-
-- [[Simplified Setup](https://github.com/wso2/kubernetes-apim/tree/master/simple)] Reduce resource requests of the simplified kubernetes resources. (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/459))
-
-### Fixed
-
-- [[Simplified Setup](https://github.com/wso2/kubernetes-apim/tree/master/simple)] Update auth.config URLs in analytics dashboard to support access to analytics dashboard with Docker Desktop. (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/460))
-
-For detailed information on the tasks carried out during this release, please see the GitHub milestone
-[v3.2.0.2](https://github.com/wso2/kubernetes-apim/milestone/17)
-
-## [v3.2.0.1] - 2020-08-28
-
-### Environments
-
-- Successful evaluation of API Manager Helm charts in AWS Elastic Kubernetes Service (EKS) (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/432))
-- Successful evaluation of Ceph File System (CephFS) as a Persistent Storage Solution (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/410))
+## [v4.0.0.1] - 2021-05-07
### Added
-- Introduce Kubernetes resources for a simplified setup of WSO2 API Management version `3.2.0` (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/428))
-- Introduce Helm charts for WSO2 API Management version `3.2.0` production grade deployment patterns (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/399))
-- Add options to define volume capacities for persistent storage (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/406))
-- Add JVM memory allocation user input option (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/375))
-- Add mechanism to introduce MySQL JDBC driver to the product containers since [it is not packaged in product container images](https://github.com/wso2/docker-apim/issues/321)
- (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/427))
-- Add user input option to set Ingress class and annotations (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/446))
-- Test and document managing custom keystores and truststores (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/401))
-
-### Changed
+- Helm resources for API Manager Single Node Deployment (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/498)).
+- Helm resources for API Manager Advanced deployment patterns (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/499)).
+- Helm resources for MySQL (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/504)).
+- Configurations for Choreo Analytics (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/500)).
-- Upgrade the base MySQL Helm chart version (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/445))
-- Upgrade MySQL Docker image tag version (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/430))
+### Removed
-### Fixed
-
-- Use Kubernetes StatefulSet resources to define API Manager Key Manager deployments (refer to [issue](https://github.com/wso2/kubernetes-apim/issues/436))
+- Helm resources for API Manager Analytics.
+- Script based K8s deployment to API Manager Simple deployment.
For detailed information on the tasks carried out during this release, please see the GitHub milestone
-[v3.2.0.1](https://github.com/wso2/kubernetes-apim/milestone/15)
-
-[v3.2.0.3]: https://github.com/wso2/kubernetes-apim/compare/v3.2.0.3...v3.2.0.3
-[v3.2.0.2]: https://github.com/wso2/kubernetes-apim/compare/v3.2.0.1...v3.2.0.2
-[v3.2.0.1]: https://github.com/wso2/kubernetes-apim/compare/v3.1.0.3...v3.2.0.1
+[v4.0.0.1](https://github.com/wso2/kubernetes-apim/milestone/22)
diff --git a/README.md b/README.md
index cd3edc31..fde043b8 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
### Simple
-* [Simplified Setup](simple/README.md)
+* [Single Node](simple/am-single/README.md)
### Advanced
@@ -18,7 +18,7 @@
## Changelog
-**Change log** from previous `v3.2.0.1` release: [View Here](CHANGELOG.md)
+**Change log** from previous `v3.2.0.4` release: [View Here](https://github.com/wso2/kubernetes-apim/blob/3.2.x/CHANGELOG.md)
## Reporting issues
diff --git a/advanced/am-pattern-1/Chart.yaml b/advanced/am-pattern-1/Chart.yaml
index 55ad51fa..d9ebb6cd 100644
--- a/advanced/am-pattern-1/Chart.yaml
+++ b/advanced/am-pattern-1/Chart.yaml
@@ -13,8 +13,8 @@
# limitations under the License.
apiVersion: v1
-appVersion: "3.2.0"
-description: A Helm chart for the deployment of WSO2 API Manager Pattern 1 (HA All-In-One Deployment with Analytics)
+appVersion: "4.0.0"
+description: A Helm chart for the deployment of WSO2 API Manager Pattern 1 (HA All-In-One Deployment)
name: am-pattern-1
-version: 3.2.0-4
+version: 4.0.0-1
icon: https://wso2.cachefly.net/wso2/sites/all/images/wso2logo.svg
diff --git a/advanced/am-pattern-1/README.md b/advanced/am-pattern-1/README.md
index abab3c45..121045ba 100644
--- a/advanced/am-pattern-1/README.md
+++ b/advanced/am-pattern-1/README.md
@@ -1,12 +1,11 @@
-# Helm Chart for deployment of WSO2 API Manager with WSO2 API Manager Analytics
+# Pattern 1: Helm Chart for Standard HA Deployment of WSO2 API Manager with WSO2 Micro Integrator
-Resources for building a Helm chart for deployment of [All-In-One WSO2 API Manager with WSO2 API Manager Analytics
-support](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/deployment-patterns/#pattern-1-single-node-all-in-one-deployment).
+This deployment consists of an API-M cluster with two nodes of the API-M runtime and two nodes each of the integration runtimes (Micro Integrator/Streaming Integrator). You can use this pattern if you expect to receive low traffic to your deployment.
-![WSO2 API Manager pattern 1 deployment](https://apim.docs.wso2.com/en/latest/assets/img/setup-and-install/1-single-node-deployment.png)
+![WSO2 API Manager pattern 1 deployment](https://apim.docs.wso2.com/en/4.0.0/assets/img/setup-and-install/basic-ha-deployment.png)
For advanced details on the deployment pattern, please refer to the official
-[documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/single-node/configuring-an-active-active-deployment/).
+[documentation](https://apim.docs.wso2.com/en/4.0.0/install-and-setup/setup/deployment-overview/#standard-ha-deployment).
## Contents
@@ -36,7 +35,7 @@ For advanced details on the deployment pattern, please refer to the official
* An already setup [Kubernetes cluster](https://kubernetes.io/docs/setup).
* Install [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/).
-
+
* Add the WSO2 Helm chart repository.
```
@@ -55,18 +54,18 @@ You can install the relevant Helm chart either from [WSO2 Helm Chart Repository]
#### Install Chart From [WSO2 Helm Chart Repository](https://hub.helm.sh/charts/wso2)
- Helm version 2
-
- ```
- helm install --name wso2/am-pattern-1 --version 3.2.0-1 --namespace
- ```
+Deploy the Kubernetes resources using the Helm Chart
+
+- Helm version 2
- Helm version 3
+ ```
+ helm install --name wso2/am-pattern-1 --version 4.0.0-1 --namespace
+ ```
- - Deploy the Kubernetes resources using the Helm Chart
+- Helm version 3
```
- helm install wso2/am-pattern-1 --version 3.2.0-1 --namespace --create-namespace
+ helm install wso2/am-pattern-1 --version 4.0.0-1 --namespace --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -77,7 +76,7 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
```
- helm install --name wso2/am-pattern-1 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+ helm install --name wso2/am-pattern-1 --version 4.0.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
```
#### Install Chart From Source
@@ -95,18 +94,18 @@ git clone https://github.com/wso2/kubernetes-apim.git
##### Deploy Helm chart for WSO2 API Manager Pattern 1 deployment.
- Helm version 2
+Deploy the Kubernetes resources using the Helm Chart
- ```
- helm install --dep-up --name /am-pattern-1 --version 3.2.0-1 --namespace
- ```
+- Helm version 2
- Helm version 3
+ ```
+ helm install --dep-up --name /am-pattern-1 --version 4.0.0-1 --namespace
+ ```
- - Deploy the Kubernetes resources using the Helm Chart
+- Helm version 3
```
- helm install /am-pattern-1 --version 3.2.0-1 --namespace --dependency-update --create-namespace
+ helm install /am-pattern-1 --version 4.0.0-1 --namespace --dependency-update --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -117,9 +116,45 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
```
- helm install --name /am-pattern-1 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+ helm install --name /am-pattern-1 --version 4.0.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+```
+
+Or else, you can configure the default configurations inside the am-pattern-1 helm chart [values.yaml](https://github.com/wso2/kubernetes-apim/blob/master/advanced/am-pattern-1/values.yaml) file. Refer [this](https://helm.sh/docs/chart_template_guide/values_files/) for to learn more details about the `values.yaml` file.
+
+
+> **Note:**
+From the above Helm commands, base image of a Micro Integrator is deployed (without any integration solution). To deploy your integration solution with the Helm charts follow the below steps.
+>1. [Create an integration service using WSO2 Integration Studio and expose it as a Managed API](https://apim.docs.wso2.com/en/latest/tutorials/integration-tutorials/service-catalog-tutorial/#exposing-an-integration-service-as-a-managed-api). Then [create a Docker image](https://apim.docs.wso2.com/en/latest/integrate/develop/create-docker-project/#creating-docker-exporter) and push it to your private or public Docker registry.
+ - `INTEGRATION_IMAGE_REGISTRY` will refer to the Docker registry that created Docker image has been pushed
+ - `INTEGRATION_IMAGE_NAME` will refer to the name of the created Docker image
+ - `INTEGRATION_IMAGE_TAG` will refer to the tag of the created Docker image
+>2. If your Docker registry is a private registry, [create an imagePullSecret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
+ - `IMAGE_PULL_SECRET` will refer to the created image pull secret
+>3. Deploy the helm resource using following command.
+> ```
+> helm install wso2/am-pattern-1 --version 4.0.0-1 --namespace --set wso2.deployment.mi.dockerRegistry= --set wso2.deployment.mi.imageName= --set wso2.deployment.mi.imageTag= --set wso2.deployment.mi.imagePullSecrets=
+> ```
+
+### Choreo Analytics
+
+If you need to enable Choreo Analytics with WSO2 API Manager, please follow the documentation on [Register for Analytics](https://apim.docs.wso2.com/en/latest/observe/api-manager-analytics/configure-analytics/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 wso2/am-pattern-1 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey=
+```
+
+Helm v3
+
+```
+helm install wso2/am-pattern-1 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey= --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.
@@ -144,12 +179,19 @@ API Manager Gateway
- 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 Analytics Dashboard
+API Manager Websub
-- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-am-analytics-dashboard-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager Analytics Dashboard service (``)
-- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager Analytics Dashboard service to outside of the Kubernetes environment
-- PORTS: Externally exposed service ports of the API Manager Analytics Dashboard service
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-am-websub-ingress`)
+- HOSTS: Hostname of the WSO2 API Manager's Websub service (``)
+- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager's Websub service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the API Manager' Websub service
+
+Micro Integrator Management APIs
+
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-mi-1-management-ingress`)
+- HOSTS: Hostname of the WSO2 Micro Integrator service (``)
+- ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the Micro Integrator service
### 3. Add a DNS record mapping the hostnames and the external IP
@@ -160,7 +202,7 @@ If the defined hostnames are not backed by a DNS service, for the purpose of eva
hostnames and the external IP in the `/etc/hosts` file at the client-side.
```
-
+
```
### 4. Access Management Consoles
@@ -169,8 +211,7 @@ hostnames and the external IP in the `/etc/hosts` file at the client-side.
- API Manager DevPortal: `https:///devportal`
-- API Manager Analytics Dashboard: `https:///analytics-dashboard`
-
+- API Manager Carbon Console: `https:///carbon`
## Configuration
@@ -182,7 +223,9 @@ The following tables lists the configurable parameters of the chart and their de
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `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
@@ -197,8 +240,6 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
| 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 |
@@ -209,7 +250,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `wso2.deployment.am.dockerRegistry` | Registry location of the Docker image to be used to create API Manager instances | - |
| `wso2.deployment.am.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2am` |
-| `wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 3.2.0 |
+| `wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
| `wso2.deployment.am.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
| `wso2.deployment.am.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager node | 180 |
| `wso2.deployment.am.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager node | 10 |
@@ -224,48 +265,30 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
| `wso2.deployment.am.ingress.management.annotations` | Ingress resource annotations for API Manager management consoles | Community NGINX Ingress controller annotations |
| `wso2.deployment.am.ingress.gateway.hostname` | Hostname for API Manager Gateway | `gateway.am.wso2.com` |
| `wso2.deployment.am.ingress.gateway.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
+| `wso2.deployment.am.ingress.websub.hostname` | Hostname for API Manager Websub services | `websub.am.wso2.com` |
+| `wso2.deployment.am.ingress.websub.annotations` | Ingress resource annotations for API Manager Websub | Community NGINX Ingress controller annotations |
-**Note**: The above mentioned default, minimum resource amounts for running WSO2 API Manager server profiles are based on its [official documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/).
+###### Micro Integrator Server Configurations
+
+| Parameter | Description | Default Value |
+|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
+| `wso2.deployment.mi.dockerRegistry` | Registry location of the Docker image to be used to create Micro Integrator instances | - |
+| `wso2.deployment.mi.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2mi` |
+| `wso2.deployment.mi.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
+| `wso2.deployment.mi.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
+| `wso2.deployment.mi.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for Micro Integrator node | 35 |
+| `wso2.deployment.mi.livenessProbe.periodSeconds` | Period of the live-ness probe for Micro Integrator node | 10 |
+| `wso2.deployment.mi.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for Micro Integrator node | 35 |
+| `wso2.deployment.mi.readinessProbe.periodSeconds` | Period of the readiness probe for Micro Integrator node | 10 |
+| `wso2.deployment.mi.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 512Mi |
+| `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m |
+| `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi |
+| `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m |
+| `wso2.deployment.mi.config` | Custom deployment configuration file (`/repository/conf/deployment.toml`) | - |
+| `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` |
+| `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
-###### Analytics Dashboard Runtime Configurations
-
-| Parameter | Description | Default Value |
-|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|-----------------------------|
-| `wso2.deployment.analytics.dashboard.dockerRegistry` | Registry location of the Docker image to be used to create an API Manager Analytics instance | - |
-| `wso2.deployment.analytics.dashboard.imageName` | Name of the Docker image to be used to create an API Manager Analytics instance | `wso2am-analytics-dashboard` |
-| `wso2.deployment.analytics.dashboard.imageTag` | Tag of the image used to create an API Manager Analytics instance | 3.2.0 |
-| `wso2.deployment.analytics.dashboard.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
-| `wso2.deployment.analytics.dashboard.replicas` | Number of replicas of API Manager Analytics to be started | 1 |
-| `wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 1 |
-| `wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
-| `wso2.deployment.analytics.dashboard.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.dashboard.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.dashboard.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.dashboard.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.dashboard.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.dashboard.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.dashboard.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.dashboard.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.dashboard.config` | Custom deployment configuration file (`/conf/dashboard/deployment.yaml`) | - |
-| `wso2.deployment.analytics.dashboard.ingress.hostname` | Hostname for API Manager Analytics Dashboard | `analytics.am.wso2.com` |
-| `wso2.deployment.analytics.dashboard.ingress.annotations` | Ingress resource annotations for API Manager Analytics Dashboard | Community NGINX Ingress controller annotations |
-
-###### Analytics Worker Runtime Configurations
-
-| Parameter | Description | Default Value |
-|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|-----------------------------|
-| `wso2.deployment.analytics.worker.dockerRegistry` | Registry location of the Docker image to be used to create an API Manager Analytics instance | - |
-| `wso2.deployment.analytics.worker.imageName` | Name of the Docker image to be used to create an API Manager Analytics instance | `wso2am-analytics-worker` |
-| `wso2.deployment.analytics.worker.imageTag` | Tag of the image used to create an API Manager Analytics instance | 3.2.0 |
-| `wso2.deployment.analytics.worker.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
-| `wso2.deployment.analytics.worker.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.worker.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.worker.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.worker.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.worker.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.worker.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.worker.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.worker.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 2000m |
+**Note**: The above mentioned default, minimum resource amounts for running WSO2 API Manager server profiles are based on its [official documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/).
###### Kubernetes Specific Configurations
diff --git a/advanced/am-pattern-1/auth.json b/advanced/am-pattern-1/auth.json
index c06ae0ba..453e366c 100644
--- a/advanced/am-pattern-1/auth.json
+++ b/advanced/am-pattern-1/auth.json
@@ -1,6 +1,6 @@
{
"auths": {
- "docker.wso2.com": {
+ "reg.id": {
"username": "docker.wso2.com.username",
"password": "docker.wso2.com.password",
"email": "docker.wso2.com.email",
diff --git a/advanced/am-pattern-1/requirements.yaml b/advanced/am-pattern-1/requirements.yaml
index 4802ce9b..008768be 100644
--- a/advanced/am-pattern-1/requirements.yaml
+++ b/advanced/am-pattern-1/requirements.yaml
@@ -14,7 +14,7 @@
dependencies:
- name: mysql-am
- version: "3.2.0-4"
+ version: "4.0.0-1"
repository: "https://helm.wso2.com"
condition: wso2.deployment.dependencies.mysql
- name: nfs-server-provisioner
diff --git a/advanced/am-pattern-1/templates/NOTES.txt b/advanced/am-pattern-1/templates/NOTES.txt
index eb0ebba5..940feff1 100644
--- a/advanced/am-pattern-1/templates/NOTES.txt
+++ b/advanced/am-pattern-1/templates/NOTES.txt
@@ -1,6 +1,6 @@
Thank you for installing WSO2 API Manager.
-Please follow these steps to access API Manager Publisher, DevPortal consoles and Analytics Dashboard.
+Please follow these steps to access API Manager Publisher and DevPortal consoles.
1. Obtain the external IP (`EXTERNAL-IP`) of the API Manager Ingress resources, by listing down the Kubernetes Ingresses.
@@ -22,13 +22,6 @@ Please follow these steps to access API Manager Publisher, DevPortal consoles an
- 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 Analytics Dashboard
-
- - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-ingress)
- - HOSTS: Hostname of the WSO2 API Manager Analytics Dashboard service ({{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }})
- - ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager Analytics Dashboard service to outside of the Kubernetes environment
- - PORTS: Externally exposed service ports of the API Manager Analytics Dashboard service
-
2. Add a DNS record mapping the hostnames (in step 1) and the external IP.
If the defined hostnames (in step 1) are backed by a DNS service, add a DNS record mapping the hostnames and
@@ -37,12 +30,28 @@ Please follow these steps to access API Manager Publisher, DevPortal consoles an
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.
- {{ .Values.wso2.deployment.am.ingress.management.hostname }} {{ .Values.wso2.deployment.am.ingress.gateway.hostname }} {{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
+ {{ .Values.wso2.deployment.am.ingress.management.hostname }} {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
3. Navigate to the consoles in your browser of choice.
API Manager Publisher: https://{{ .Values.wso2.deployment.am.ingress.management.hostname }}/publisher
API Manager DevPortal: https://{{ .Values.wso2.deployment.am.ingress.management.hostname }}/devportal
- API Manager Analytics Dashboard: https://{{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}/analytics-dashboard
+
+Please follow these steps to assess Micro Integrator.
+
+1. Obtain the external IP (`EXTERNAL-IP`) of the Ingress resources by listing down the Kubernetes Ingresses.
+
+ kubectl get ing -n {{ .Release.Namespace }}
+
+ Micro Integrator Management APIs
+
+ - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-1.resource.prefix" . }}-mi-1-management-ingress)
+ - HOSTS: Hostname of the WSO2 Micro Integrator service ({{ .Values.wso2.deployment.mi.ingress.management.hostname }})
+ - ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+ - PORTS: Externally exposed service ports of the Micro Integrator service
+
+2. Add the above host as an entry in /etc/hosts file as follows:
+
+ {{ .Values.wso2.deployment.mi.ingress.management.hostname }}
Please refer the official documentation at https://apim.docs.wso2.com/en/latest/ for additional information on WSO2 API Manager.
diff --git a/advanced/am-pattern-1/templates/_helpers.tpl b/advanced/am-pattern-1/templates/_helpers.tpl
index 7d19f297..f26bdc34 100644
--- a/advanced/am-pattern-1/templates/_helpers.tpl
+++ b/advanced/am-pattern-1/templates/_helpers.tpl
@@ -1,5 +1,5 @@
{{/*
-Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -73,7 +73,7 @@ image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}{{-
{{- else }}
{{- $dockerRegistry := .deployment.dockerRegistry | default "docker.wso2.com" }}
{{- $parts := len (split "." $imageTag) }}
-{{- if eq $parts 3 }}
+{{- if and (eq $parts 3) (eq $dockerRegistry "docker.wso2.com") }}
image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}:{{ $imageTag }}.0{{- end }}
{{- else }}
image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}:{{ $imageTag }}{{- end }}
diff --git a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-bin.yaml b/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-bin.yaml
deleted file mode 100644
index 9e0c30ed..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-bin.yaml
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-bin
- namespace : {{ .Release.Namespace }}
-data:
- carbon.sh: |-
- #!/bin/sh
- # ---------------------------------------------------------------------------
- # Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- # ----------------------------------------------------------------------------
- # Main Script for the WSO2 Carbon Server
- #
- # Environment Variable Prequisites
- #
- # CARBON_HOME Home of WSO2 Carbon installation. If not set I will try
- # to figure it out.
- # RUNTIME_HOME Home of WSO2 Carbon Runtime. .
- #
- # JAVA_HOME Must point at your Java Development Kit installation.
- #
- # JAVA_OPTS (Optional) Java runtime options used when the commands
- # is executed.
- #
- # NOTE: Borrowed generously from Apache Tomcat startup scripts.
- # -----------------------------------------------------------------------------
-
- # OS specific support. $var _must_ be set to either true or false.
- #ulimit -n 100000
-
- cygwin=false;
- darwin=false;
- os400=false;
- mingw=false;
- case "`uname`" in
- CYGWIN*) cygwin=true;;
- MINGW*) mingw=true;;
- OS400*) os400=true;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
- esac
-
- # resolve links - $0 may be a softlink
- PRG="$0"
-
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
-
- # Get standard environment variables
- TEMPCURDIR=`dirname "$PRG"`
-
- # Only set RUNTIME_HOME if not already set
- [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$TEMPCURDIR/.." ; pwd`
-
- # Only set CARBON_HOME if not already set
- [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$TEMPCURDIR/../../../" ; pwd`
-
- # Only set RUNTIME if not already set
- [ -z "$RUNTIME" ] && RUNTIME=${RUNTIME_HOME##*/}
-
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
- [ -n "$RUNTIME_HOME" ] && RUNTIME_HOME=`cygpath --unix "$RUNTIME_HOME"`
- fi
-
- # For OS400
- if $os400; then
- # Set job priority to standard for interactive (interactive - 6) by using
- # the interactive priority - 6, the helper threads that respond to requests
- # will be running at the same priority as interactive jobs.
- COMMAND='chgjob job('$JOBNAME') runpty(6)'
- system $COMMAND
-
- # Enable multi threading
- QIBM_MULTI_THREADED=Y
- export QIBM_MULTI_THREADED
- fi
-
- # For Migwn, ensure paths are in UNIX format before anything is touched
- if $mingw ; then
- [ -n "$CARBON_HOME" ] &&
- CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
- fi
-
- if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=java
- fi
- fi
-
- if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " CARBON cannot execute $JAVACMD"
- exit 1
- fi
-
- # if JAVA_HOME is not set we're not happy
- if [ -z "$JAVA_HOME" ]; then
- echo "You must set the JAVA_HOME variable before running CARBON."
- exit 1
- fi
-
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- PID=`cat "$RUNTIME_HOME"/runtime.pid`
- fi
-
- # ----- Process the input command ----------------------------------------------
- args=""
- for c in $*
- do
- if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
- CMD="--debug"
- continue
- elif [ "$CMD" = "--debug" ]; then
- if [ -z "$PORT" ]; then
- PORT=$c
- fi
- elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
- CMD="stop"
- elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
- CMD="start"
- elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
- CMD="version"
- elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
- CMD="restart"
- elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
- CMD="test"
- else
- args="$args $c"
- fi
- done
-
- if [ "$CMD" = "--debug" ]; then
- if [ "$PORT" = "" ]; then
- echo " Please specify the debug port after the --debug option"
- exit 1
- fi
- if [ -n "$JAVA_OPTS" ]; then
- echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
- fi
- CMD="RUN"
- JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
- echo "Please start the remote debugging client to continue..."
- elif [ "$CMD" = "start" ]; then
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- if ps -p $PID > /dev/null ; then
- echo "Process is already running"
- exit 0
- fi
- fi
- export CARBON_HOME=$CARBON_HOME
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "stop" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- exit 0
- elif [ "$CMD" = "restart" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- process_status=0
- pid=`cat $RUNTIME_HOME/runtime.pid`
- while [ "$process_status" -eq "0" ]
- do
- sleep 1;
- ps -p$pid 2>&1 > /dev/null
- process_status=$?
- done
-
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "test" ]; then
- JAVACMD="exec "$JAVACMD""
- elif [ "$CMD" = "version" ]; then
- cat $CARBON_HOME/bin/kernel-version.txt
- exit 0
- fi
-
- # ---------- Handle the SSL Issue with proper JDK version --------------------
- java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}')
- java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}')
- if [ $java_version_formatted -lt 0108 ] || [ $java_version_formatted -gt 1100 ]; then
- echo " Starting WSO2 Carbon (in unsupported JDK)"
- echo " [ERROR] CARBON is supported only on JDK 1.8 and 11"
- fi
-
- CARBON_XBOOTCLASSPATH=""
- for f in "$CARBON_HOME"/bin/bootstrap/xboot/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/xboot/*.jar" ];then
- CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
- fi
- done
-
- JAVA_ENDORSED_DIRS="$CARBON_HOME/bin/bootstrap/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
-
- CARBON_CLASSPATH=""
- if [ -e "$JAVA_HOME/bin/bootstrap/tools.jar" ]; then
- CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
- fi
- for f in "$CARBON_HOME"/bin/bootstrap/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/*.jar" ];then
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
- fi
- done
- for t in "$CARBON_HOME"/bin/bootstrap/commons-lang*.jar
- do
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
- done
- # For Cygwin, switch paths to Windows format before running java
- if $cygwin; then
- JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
- CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
- RUNTIME_HOME=`cygpath --absolute --windows "$RUNTIME_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
- fi
- CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
- CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
- fi
-
- # ----- Execute The Requested Command -----------------------------------------
-
- echo JAVA_HOME environment variable is set to $JAVA_HOME
- echo CARBON_HOME environment variable is set to $CARBON_HOME
- echo RUNTIME_HOME environment variable is set to $RUNTIME_HOME
-
- cd "$RUNTIME_HOME"
-
- START_EXIT_STATUS=121
- status=$START_EXIT_STATUS
-
- #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
- # -Djava.rmi.server.hostname="your.IP.goes.here"
-
- JAVA_VER_BASED_OPTS=""
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_VER_BASED_OPTS="-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS"
- fi
-
- if [ $java_version_formatted -ge 1100 ] ; then
- JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
- fi
-
- while [ "$status" = "$START_EXIT_STATUS" ]
- do
- $JAVACMD \
- -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
- -Xms{{ .Values.wso2.deployment.analytics.dashboard.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.analytics.dashboard.resources.jvm.heap.memory.xmx }} \
- -XX:+HeapDumpOnOutOfMemoryError \
- -XX:HeapDumpPath="$RUNTIME_HOME/logs/heap-dump.hprof" \
- $JAVA_OPTS \
- -classpath "$CARBON_CLASSPATH" \
- $JAVA_VER_BASED_OPTS \
- -Djava.io.tmpdir="$CARBON_HOME/tmp" \
- -Dcarbon.registry.root=/ \
- -Djava.command="$JAVACMD" \
- -Dcarbon.home="$CARBON_HOME" \
- -Dwso2.runtime.path="$RUNTIME_HOME" \
- -Dwso2.runtime="$RUNTIME" \
- -Djavax.xml.bind.JAXBContextFactory="com.sun.xml.bind.v2.ContextFactory" \
- -Djava.util.logging.config.file="$RUNTIME_HOME/bin/bootstrap/logging.properties" \
- -Djava.security.egd=file:/dev/./urandom \
- -Dfile.encoding=UTF8 \
- -Djavax.net.ssl.keyStore="$CARBON_HOME/resources/security/wso2carbon.jks" \
- -Djavax.net.ssl.keyStorePassword="wso2carbon" \
- -Djavax.net.ssl.trustStore="$CARBON_HOME/resources/security/client-truststore.jks" \
- -Djavax.net.ssl.trustStorePassword="wso2carbon" \
- -Dio.netty.tryReflectionSetAccessible=false \
- org.wso2.carbon.launcher.Main $*
- status=$?
- done
diff --git a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-conf.yaml b/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-conf.yaml
deleted file mode 100644
index 28c302b3..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-conf.yaml
+++ /dev/null
@@ -1,445 +0,0 @@
-# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-conf
- namespace : {{ .Release.Namespace }}
- {{ if .Values.wso2.deployment.analytics.dashboard.config }}
-
-data:
- {{- range $index, $content := .Values.wso2.deployment.analytics.dashboard.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{ else }}
-data:
- deployment.yaml: |-
- ################################################################################
- # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved
- #
- # Licensed under the Apache License, Version 2.0 (the \"License\");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an \"AS IS\" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ################################################################################
-
- # Carbon Configuration Parameters
- wso2.carbon:
- type: wso2-apim-analytics
- # value to uniquely identify a server
- id: wso2-am-analytics
- # server name
- name: WSO2 API Manager Analytics Server
- # enable/disable hostname verifier
- hostnameVerificationEnabled: false
- # ports used by this server
- ports:
- # port offset
- offset: 3
-
- # Configuration used for the databridge communication
- databridge.config:
- # No of worker threads to consume events
- # THIS IS A MANDATORY FIELD
- workerThreads: 10
- # Maximum amount of messages that can be queued internally in MB
- # THIS IS A MANDATORY FIELD
- maxEventBufferCapacity: 10000000
- # Queue size; the maximum number of events that can be stored in the queue
- # THIS IS A MANDATORY FIELD
- eventBufferSize: 2000
- # Keystore file path
- # THIS IS A MANDATORY FIELD
- keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks
- # Keystore password
- # THIS IS A MANDATORY FIELD
- keyStorePassword : wso2carbon
- # Session Timeout value in mins
- # THIS IS A MANDATORY FIELD
- clientTimeoutMin: 30
- # Data receiver configurations
- # THIS IS A MANDATORY FIELD
- dataReceivers:
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Thrift
- # Data receiver properties
- properties:
- tcpPort: '7611'
- sslPort: '7711'
-
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Binary
- # Data receiver properties
- properties:
- tcpPort: '9611'
- sslPort: '9711'
- tcpReceiverThreadPoolSize: '100'
- sslReceiverThreadPoolSize: '100'
- hostName: 0.0.0.0
-
- # Configuration of the Data Agents - to publish events through databridge
- data.agent.config:
- # Data agent configurations
- # THIS IS A MANDATORY FIELD
- agents:
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Thrift
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Binary
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
-
- # Deployment configuration parameters
- wso2.artifact.deployment:
- # Scheduler update interval
- updateInterval: 5
-
- # HA Configuration
- state.persistence:
- enabled: false
- intervalInMin: 1
- revisionsToKeep: 2
- persistenceStore: org.wso2.carbon.streaming.integrator.core.persistence.FileSystemPersistenceStore
- config:
- location: siddhi-app-persistence
-
- # Secure Vault Configuration
- wso2.securevault:
- secretRepository:
- type: org.wso2.carbon.secvault.repository.DefaultSecretRepository
- parameters:
- privateKeyAlias: wso2carbon
- keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks
- secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties
- masterKeyReader:
- type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader
- parameters:
- masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml
-
-
- # Data Sources Configuration
- wso2.datasources:
- dataSources:
- # Dashboard data source
- - name: WSO2_DASHBOARD_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/DASHBOARD_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DASHBOARD_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
- - name: BUSINESS_RULES_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/BUSINESS_RULES_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_BUSINESS_RULES_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- # carbon metrics data source
- - name: WSO2_METRICS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/WSO2MetricsDB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: WSO2_PERMISSIONS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/PERMISSION_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_PERMISSIONS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- #Data source for APIM Analytics
- - name: APIM_ANALYTICS_DB
- description: Datasource used for APIM Analytics
- jndiConfig:
- name: jdbc/APIM_ANALYTICS_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_STATS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- #Main datasource used in API Manager
- - name: AM_DB
- description: Main datasource used by API Manager
- jndiConfig:
- name: jdbc/AM_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?useSSL=false"
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- wso2.business.rules.manager:
- datasource: BUSINESS_RULES_DB
- # rule template wise configuration for deploying business rules
- deployment_configs:
- -
- # : of the Worker node
- localhost:9444:
- # UUIDs of rule templates that are needed to be deployed on the node
- - stock-data-analysis
- - stock-exchange-input
- - stock-exchange-output
- - identifying-continuous-production-decrease
- - popular-tweets-analysis
- - http-analytics-processing
- - message-tracing-source-template
- - message-tracing-app-template
- # credentials for worker nodes
- username: admin
- password: admin
-
- wso2.transport.http:
- transportProperties:
- - name: "server.bootstrap.socket.timeout"
- value: 60
- - name: "client.bootstrap.socket.timeout"
- value: 60
- - name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- - id: "default"
- host: "0.0.0.0"
- port: 9089
-
- - id: "default-https"
- host: "0.0.0.0"
- port: 9640
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- ## Dashboard data provider authorization
- data.provider.configs:
- authorizingClass: org.wso2.analytics.apim.dashboards.core.data.provider.Authorizer
-
- ## Additional APIs that needs to be added to the server.
- ## Should be provided as a key value pairs { API context path: Microservice implementation class }
- ## The configured APIs will be available as https://{host}:{port}/analytics-dashboard/{API_context_path}
- additional.apis:
- /apis/analytics/v1.0/apim: org.wso2.analytics.apim.rest.api.proxy.ApimApi
- /apis/v1.0/report: org.wso2.analytics.apim.rest.api.report.ReportApi
-
- report:
- implClass: org.wso2.analytics.apim.rest.api.report.reportgen.DefaultReportGeneratorImpl
-
- ## Authentication configuration
- auth.configs:
- type: apim
- ssoEnabled: true
- properties:
- adminScope: apim_analytics:admin_carbon.super
- allScopes: apim_analytics:admin openid apim:api_view apim:subscribe apim_analytics:monitoring_dashboard:own apim_analytics:monitoring_dashboard:edit apim_analytics:monitoring_dashboard:view apim_analytics:business_analytics:own apim_analytics:business_analytics:edit apim_analytics:business_analytics:view apim_analytics:api_analytics:own apim_analytics:api_analytics:edit apim_analytics:api_analytics:view apim_analytics:application_analytics:own apim_analytics:application_analytics:edit apim_analytics:application_analytics:view
- adminUsername: admin
- adminPassword: admin
- kmDcrUrl: https://{{ template "am-pattern-1.resource.prefix" . }}-am-service:9443/client-registration/v0.17/register
- kmTokenUrlForRedirection: https://{{ .Values.wso2.deployment.am.ingress.management.hostname }}/oauth2
- kmTokenUrl: https://{{ template "am-pattern-1.resource.prefix" . }}-am-service:9443/oauth2
- kmUsername: admin
- kmPassword: admin
- portalAppContext: analytics-dashboard
- businessRulesAppContext : business-rules
- cacheTimeout: 30
- baseUrl: https://{{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
- grantType: authorization_code
- publisherUrl: https://{{ template "am-pattern-1.resource.prefix" . }}-am-service:9443
- devPortalUrl: https://{{ template "am-pattern-1.resource.prefix" . }}-am-service:9443
- externalLogoutUrl: https://{{ .Values.wso2.deployment.am.ingress.management.hostname }}/oidc/logout
-
- wso2.dashboard:
- roles:
- creators:
- - apim_analytics:admin_carbon.super
- themeConfigProviderClass: org.wso2.carbon.dashboards.core.DefaultDashboardThemeConfigProvider
-
- ## RDBMS Data Provider configuration
- wso2.rdbms.data.provider:
- timeTypes:
- - DATE
- - TIME
- - DATETIME
- - TIMESTAMP
- - TIMESTAMP WITHOUT TIME ZONE
- {{ end }}
diff --git a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-deployment.yaml b/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-deployment.yaml
deleted file mode 100644
index c5ea0c34..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-deployment.yaml
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-deployment
- namespace: {{ .Release.Namespace }}
-spec:
- replicas: {{ .Values.wso2.deployment.analytics.dashboard.replicas }}
- strategy:
- rollingUpdate:
- maxSurge: {{ .Values.wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxSurge }}
- maxUnavailable: {{ .Values.wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxUnavailable }}
- type: RollingUpdate
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard
- template:
- metadata:
- annotations:
- checksum.am.analytics.dashboard.conf: {{ include (print $.Template.BasePath "/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard
- spec:
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- initContainers:
- - name: init-mysql-db
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of MySQL Server deployment"; while ! nc -z "wso2am-mysql-db-service" 3306; do sleep 1; printf "-"; done; echo -e " >> MySQL Server has started";']
- - name: init-mysql-connector-download
- image: busybox:1.32
- command:
- - /bin/sh
- - "-c"
- - |
- set -e
- connector_version=8.0.17
- wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/${connector_version}/mysql-connector-java-${connector_version}.jar -P /mysql-connector-jar/
- volumeMounts:
- - name: mysql-connector-jar
- mountPath: /mysql-connector-jar
- {{ end }}
- containers:
- - name: wso2am-analytics-dashboard
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.analytics.dashboard) | indent 10 }}
- imagePullPolicy: {{ .Values.wso2.deployment.analytics.dashboard.imagePullPolicy }}
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9643
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.dashboard.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.dashboard.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9643
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.dashboard.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.dashboard.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/dashboard.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.analytics.dashboard.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.dashboard.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.analytics.dashboard.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.dashboard.resources.limits.cpu }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 9713
- protocol: "TCP"
- - containerPort: 9643
- protocol: "TCP"
- - containerPort: 9613
- protocol: "TCP"
- - containerPort: 7713
- protocol: "TCP"
- - containerPort: 9091
- protocol: "TCP"
- - containerPort: 7613
- protocol: "TCP"
- volumeMounts:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-conf
- mountPath: /home/wso2carbon/wso2-config-volume/conf/dashboard/deployment.yaml
- subPath: deployment.yaml
- - name: wso2am-analytics-dashboard-bin
- mountPath: /home/wso2carbon/wso2-config-volume/wso2/dashboard/bin/carbon.sh
- subPath: carbon.sh
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- mountPath: /home/wso2carbon/wso2-artifact-volume/lib
- {{ end }}
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-wso2-private-registry-creds
- {{- end }}
- {{- if .Values.wso2.deployment.am.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-wso2-private-registry-creds
- {{- end }}
- volumes:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-conf
- configMap:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-conf
- - name: wso2am-analytics-dashboard-bin
- configMap:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-bin
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- emptyDir: {}
- {{ end }}
diff --git a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-service.yaml b/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-service.yaml
deleted file mode 100644
index 5e873404..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-service.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard
- ports:
- # ports that this service should serve on
- -
- name: 'analytics-dashboard'
- port: 9643
- protocol: TCP
-
diff --git a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-bin.yaml b/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-bin.yaml
deleted file mode 100644
index cea2448b..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-bin.yaml
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-bin
- namespace : {{ .Release.Namespace }}
-data:
- carbon.sh: |-
- #!/bin/sh
- # ---------------------------------------------------------------------------
- # Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- # ----------------------------------------------------------------------------
- # Main Script for the WSO2 Carbon Server
- #
- # Environment Variable Prequisites
- #
- # CARBON_HOME Home of WSO2 Carbon installation. If not set I will try
- # to figure it out.
- # RUNTIME_HOME Home of WSO2 Carbon Runtime. .
- #
- # JAVA_HOME Must point at your Java Development Kit installation.
- #
- # JAVA_OPTS (Optional) Java runtime options used when the commands
- # is executed.
- #
- # NOTE: Borrowed generously from Apache Tomcat startup scripts.
- # -----------------------------------------------------------------------------
-
- # OS specific support. $var _must_ be set to either true or false.
- #ulimit -n 100000
-
- cygwin=false;
- darwin=false;
- os400=false;
- mingw=false;
- case "`uname`" in
- CYGWIN*) cygwin=true;;
- MINGW*) mingw=true;;
- OS400*) os400=true;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
- esac
-
- # resolve links - $0 may be a softlink
- PRG="$0"
-
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
-
- # Get standard environment variables
- TEMPCURDIR=`dirname "$PRG"`
-
- # Only set RUNTIME_HOME if not already set
- [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$TEMPCURDIR/.." ; pwd`
-
- # Only set CARBON_HOME if not already set
- [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$TEMPCURDIR/../../../" ; pwd`
-
- # Only set RUNTIME if not already set
- [ -z "$RUNTIME" ] && RUNTIME=${RUNTIME_HOME##*/}
-
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
- [ -n "$RUNTIME_HOME" ] && RUNTIME_HOME=`cygpath --unix "$RUNTIME_HOME"`
- fi
-
- # For OS400
- if $os400; then
- # Set job priority to standard for interactive (interactive - 6) by using
- # the interactive priority - 6, the helper threads that respond to requests
- # will be running at the same priority as interactive jobs.
- COMMAND='chgjob job('$JOBNAME') runpty(6)'
- system $COMMAND
-
- # Enable multi threading
- QIBM_MULTI_THREADED=Y
- export QIBM_MULTI_THREADED
- fi
-
- # For Migwn, ensure paths are in UNIX format before anything is touched
- if $mingw ; then
- [ -n "$CARBON_HOME" ] &&
- CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
- fi
-
- if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=java
- fi
- fi
-
- if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " CARBON cannot execute $JAVACMD"
- exit 1
- fi
-
- # if JAVA_HOME is not set we're not happy
- if [ -z "$JAVA_HOME" ]; then
- echo "You must set the JAVA_HOME variable before running CARBON."
- exit 1
- fi
-
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- PID=`cat "$RUNTIME_HOME"/runtime.pid`
- fi
-
- # ----- Process the input command ----------------------------------------------
- args=""
- for c in $*
- do
- if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
- CMD="--debug"
- continue
- elif [ "$CMD" = "--debug" ]; then
- if [ -z "$PORT" ]; then
- PORT=$c
- fi
- elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
- CMD="stop"
- elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
- CMD="start"
- elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
- CMD="version"
- elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
- CMD="restart"
- elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
- CMD="test"
- else
- args="$args $c"
- fi
- done
-
- if [ "$CMD" = "--debug" ]; then
- if [ "$PORT" = "" ]; then
- echo " Please specify the debug port after the --debug option"
- exit 1
- fi
- if [ -n "$JAVA_OPTS" ]; then
- echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
- fi
- CMD="RUN"
- JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
- echo "Please start the remote debugging client to continue..."
- elif [ "$CMD" = "start" ]; then
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- if ps -p $PID > /dev/null ; then
- echo "Process is already running"
- exit 0
- fi
- fi
- export CARBON_HOME=$CARBON_HOME
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "stop" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- exit 0
- elif [ "$CMD" = "restart" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- process_status=0
- pid=`cat $RUNTIME_HOME/runtime.pid`
- while [ "$process_status" -eq "0" ]
- do
- sleep 1;
- ps -p$pid 2>&1 > /dev/null
- process_status=$?
- done
-
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "test" ]; then
- JAVACMD="exec "$JAVACMD""
- elif [ "$CMD" = "version" ]; then
- cat $CARBON_HOME/bin/kernel-version.txt
- exit 0
- fi
-
- # ---------- Handle the SSL Issue with proper JDK version --------------------
- java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}')
- java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}')
- if [ $java_version_formatted -lt 0108 ] || [ $java_version_formatted -gt 1100 ]; then
- echo " Starting WSO2 Carbon (in unsupported JDK)"
- echo " [ERROR] CARBON is supported only on JDK 1.8 and 11"
- fi
-
- CARBON_XBOOTCLASSPATH=""
- for f in "$CARBON_HOME"/bin/bootstrap/xboot/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/xboot/*.jar" ];then
- CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
- fi
- done
-
- JAVA_ENDORSED_DIRS="$CARBON_HOME/bin/bootstrap/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
-
- CARBON_CLASSPATH=""
- if [ -e "$JAVA_HOME/bin/bootstrap/tools.jar" ]; then
- CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
- fi
- for f in "$CARBON_HOME"/bin/bootstrap/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/*.jar" ];then
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
- fi
- done
- for t in "$CARBON_HOME"/bin/bootstrap/commons-lang*.jar
- do
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
- done
- # For Cygwin, switch paths to Windows format before running java
- if $cygwin; then
- JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
- CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
- RUNTIME_HOME=`cygpath --absolute --windows "$RUNTIME_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
- fi
- CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
- CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
- fi
-
- # ----- Execute The Requested Command -----------------------------------------
-
- echo JAVA_HOME environment variable is set to $JAVA_HOME
- echo CARBON_HOME environment variable is set to $CARBON_HOME
- echo RUNTIME_HOME environment variable is set to $RUNTIME_HOME
-
- cd "$RUNTIME_HOME"
-
- START_EXIT_STATUS=121
- status=$START_EXIT_STATUS
-
- #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
- # -Djava.rmi.server.hostname="your.IP.goes.here"
-
- JAVA_VER_BASED_OPTS=""
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_VER_BASED_OPTS="-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS"
- fi
-
- if [ $java_version_formatted -ge 1100 ] ; then
- JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
- fi
-
- while [ "$status" = "$START_EXIT_STATUS" ]
- do
- $JAVACMD \
- -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
- -Xms{{ .Values.wso2.deployment.analytics.worker.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.analytics.worker.resources.jvm.heap.memory.xmx }} \
- -XX:+HeapDumpOnOutOfMemoryError \
- -XX:HeapDumpPath="$RUNTIME_HOME/logs/heap-dump.hprof" \
- $JAVA_OPTS \
- -classpath "$CARBON_CLASSPATH" \
- $JAVA_VER_BASED_OPTS \
- -Djava.io.tmpdir="$CARBON_HOME/tmp" \
- -Dcarbon.registry.root=/ \
- -Djava.command="$JAVACMD" \
- -Dcarbon.home="$CARBON_HOME" \
- -Dwso2.runtime.path="$RUNTIME_HOME" \
- -Dwso2.runtime="$RUNTIME" \
- -Djavax.xml.bind.JAXBContextFactory="com.sun.xml.bind.v2.ContextFactory" \
- -Djava.util.logging.config.file="$RUNTIME_HOME/bin/bootstrap/logging.properties" \
- -Djava.security.egd=file:/dev/./urandom \
- -Dfile.encoding=UTF8 \
- -Djavax.net.ssl.keyStore="$CARBON_HOME/resources/security/wso2carbon.jks" \
- -Djavax.net.ssl.keyStorePassword="wso2carbon" \
- -Djavax.net.ssl.trustStore="$CARBON_HOME/resources/security/client-truststore.jks" \
- -Djavax.net.ssl.trustStorePassword="wso2carbon" \
- -Dio.netty.tryReflectionSetAccessible=false \
- org.wso2.carbon.launcher.Main $*
- status=$?
- done
diff --git a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-conf.yaml b/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-conf.yaml
deleted file mode 100644
index 83b900a3..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-conf.yaml
+++ /dev/null
@@ -1,583 +0,0 @@
-# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-conf
- namespace : {{ .Release.Namespace }}
- {{ if .Values.wso2.deployment.analytics.worker.config }}
-data:
- {{- range $index, $content := .Values.wso2.deployment.analytics.worker.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{ else }}
-data:
- deployment.yaml: |-
- ################################################################################
- # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved
- #
- # Licensed under the Apache License, Version 2.0 (the \"License\");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an \"AS IS\" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ################################################################################
-
- # Carbon Configuration Parameters
- wso2.carbon:
- type: wso2-apim-analytics
- # value to uniquely identify a server
- id: ${NODE_ID}
- # server name
- name: WSO2 API Manager Analytics Server
- # ports used by this server
- ports:
- # port offset
- offset: 1
-
- wso2.transport.http:
- transportProperties:
- -
- name: "server.bootstrap.socket.timeout"
- value: 60
- -
- name: "client.bootstrap.socket.timeout"
- value: 60
- -
- name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- -
- id: "default"
- host: "0.0.0.0"
- port: 9090
- -
- id: "msf4j-https"
- host: "0.0.0.0"
- port: 9443
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- senderConfigurations:
- -
- id: "http-sender"
-
- siddhi.stores.query.api:
- transportProperties:
- -
- name: "server.bootstrap.socket.timeout"
- value: 60
- -
- name: "client.bootstrap.socket.timeout"
- value: 60
- -
- name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- -
- id: "default"
- host: "0.0.0.0"
- port: 7071
- -
- id: "msf4j-https"
- host: "0.0.0.0"
- port: 7444
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- # Configuration used for the databridge communication
- databridge.config:
- # No of worker threads to consume events
- # THIS IS A MANDATORY FIELD
- workerThreads: 10
- # Maximum amount of messages that can be queued internally in MB
- # THIS IS A MANDATORY FIELD
- maxEventBufferCapacity: 10000000
- # Queue size; the maximum number of events that can be stored in the queue
- # THIS IS A MANDATORY FIELD
- eventBufferSize: 2000
- # Keystore file path
- # THIS IS A MANDATORY FIELD
- keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks
- # Keystore password
- # THIS IS A MANDATORY FIELD
- keyStorePassword : wso2carbon
- # Session Timeout value in mins
- # THIS IS A MANDATORY FIELD
- clientTimeoutMin: 30
- # Data receiver configurations
- # THIS IS A MANDATORY FIELD
- dataReceivers:
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Thrift
- # Data receiver properties
- properties:
- tcpPort: '7611'
- sslPort: '7711'
-
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Binary
- # Data receiver properties
- properties:
- tcpPort: '9611'
- sslPort: '9711'
- tcpReceiverThreadPoolSize: '100'
- sslReceiverThreadPoolSize: '100'
- hostName: 0.0.0.0
-
- # Configuration of the Data Agents - to publish events through databridge
- data.agent.config:
- # Data agent configurations
- # THIS IS A MANDATORY FIELD
- agents:
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Thrift
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Binary
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
-
- # This is the main configuration for metrics
- wso2.metrics:
- # Enable Metrics
- enabled: false
- reporting:
- console:
- - # The name for the Console Reporter
- name: Console
-
- # Enable Console Reporter
- enabled: false
-
- # Polling Period in seconds.
- # This is the period for polling metrics from the metric registry and printing in the console
- pollingPeriod: 5
-
- wso2.metrics.jdbc:
- # Data Source Configurations for JDBC Reporters
- dataSource:
- # Default Data Source Configuration
- - &JDBC01
- # JNDI name of the data source to be used by the JDBC Reporter.
- # This data source should be defined in a *-datasources.xml file in conf/datasources directory.
- dataSourceName: java:comp/env/jdbc/WSO2MetricsDB
- # Schedule regular deletion of metrics data older than a set number of days.
- # It is recommended that you enable this job to ensure your metrics tables do not get extremely large.
- # Deleting data older than seven days should be sufficient.
- scheduledCleanup:
- # Enable scheduled cleanup to delete Metrics data in the database.
- enabled: true
-
- # The scheduled job will cleanup all data older than the specified days
- daysToKeep: 3
-
- # This is the period for each cleanup operation in seconds.
- scheduledCleanupPeriod: 86400
-
- # The JDBC Reporter is in the Metrics JDBC Core feature
- reporting:
- # The JDBC Reporter configurations will be ignored if the Metrics JDBC Core feature is not available in runtime
- jdbc:
- - # The name for the JDBC Reporter
- name: JDBC
-
- # Enable JDBC Reporter
- enabled: true
-
- # Source of Metrics, which will be used to identify each metric in database -->
- # Commented to use the hostname by default
- # source: Carbon
-
- # Alias referring to the Data Source configuration
- dataSource: *JDBC01
-
- # Polling Period in seconds.
- # This is the period for polling metrics from the metric registry and updating the database with the values
- pollingPeriod: 60
-
- # Deployment configuration parameters
- wso2.artifact.deployment:
- # Scheduler update interval
- updateInterval: 5
-
- # Periodic Persistence Configuration
- state.persistence:
- enabled: true
- intervalInMin: 1
- revisionsToKeep: 2
- persistenceStore: org.wso2.carbon.streaming.integrator.core.persistence.DBPersistenceStore
- config:
- datasource: PERSISTENCE_DB # A datasource with this name should be defined in wso2.datasources namespace
- table: PERSISTENCE_TABLE
-
- # Secure Vault Configuration
- wso2.securevault:
- secretRepository:
- type: org.wso2.carbon.secvault.repository.DefaultSecretRepository
- parameters:
- privateKeyAlias: wso2carbon
- keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks
- secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties
- masterKeyReader:
- type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader
- parameters:
- masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml
-
- # Datasource Configurations
- wso2.datasources:
- dataSources:
- # carbon metrics data source
- - name: WSO2_METRICS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/WSO2MetricsDB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 30
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: WSO2_PERMISSIONS_DB
- description: The datasource used for permission feature
- jndiConfig:
- name: jdbc/PERMISSION_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_PERMISSIONS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: GEO_LOCATION_DATA
- description: "The data source used for geo location database"
- jndiConfig:
- name: jdbc/GEO_LOCATION_DATA
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/GEO_LOCATION_DATA;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: APIM_ANALYTICS_DB
- description: "The datasource used for APIM statistics aggregated data."
- jndiConfig:
- name: jdbc/APIM_ANALYTICS_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_STATS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- -
- name: WSO2_CLUSTER_DB
- description: "The datasource used by cluster coordinators in HA deployment"
- jndiConfig:
- name: jdbc/WSO2_CLUSTER_DB
- definition:
- type: RDBMS
- configuration:
- connectionTestQuery: "SELECT 1"
- driverClassName: com.mysql.cj.jdbc.Driver
- idleTimeout: 60000
- isAutoCommit: false
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2_CLUSTER_DB?useSSL=false"
- maxPoolSize: 50
- password: wso2carbon
- username: wso2carbon
- validationTimeout: 30000
-
- -
- name: PERSISTENCE_DB
- description: "Datasource used for persistence"
- jndiConfig:
- name: jdbc/PERSISTENCE_DB
- definition:
- type: RDBMS
- configuration:
- connectionTestQuery: "SELECT 1"
- driverClassName: com.mysql.cj.jdbc.Driver
- idleTimeout: 60000
- isAutoCommit: false
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2_PERSISTENCE_DB?useSSL=false"
- maxPoolSize: 50
- password: wso2carbon
- username: wso2carbon
- validationTimeout: 30000
-
- siddhi:
- # properties:
- # partitionById: true
- # shardId: 1
- refs:
- - ref:
- name: 'grpcSource'
- type: 'grpc'
- properties:
- receiver.url : grpc://localhost:9806/org.wso2.analytics.mgw.grpc.service.AnalyticsSendService/sendAnalytics
- extensions:
- -
- extension:
- name: 'findCountryFromIP'
- namespace: 'geo'
- properties:
- geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver
- isCacheEnabled: true
- cacheSize: 10000
- isPersistInDatabase: true
- datasource: GEO_LOCATION_DATA
- -
- extension:
- name: 'findCityFromIP'
- namespace: 'geo'
- properties:
- geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver
- isCacheEnabled: true
- cacheSize: 10000
- isPersistInDatabase: true
- datasource: GEO_LOCATION_DATA
- #Enabling GRPC Service with an Extension
- -
- extension:
- name: 'grpc'
- namespace: 'source'
- properties:
- keyStoreFile : ${sys:carbon.home}/resources/security/wso2carbon.jks
- keyStorePassword : wso2carbon
- keyStoreAlgorithm : SunX509
- trustStoreFile : ${sys:carbon.home}/resources/security/client-truststore.jks
- trustStorePassword : wso2carbon
- trustStoreAlgorithm : SunX509
- # Provides the regular expression collection to parse the user-agent header
- -
- extension:
- name: 'getUserAgentProperty'
- namespace: 'env'
- properties:
- regexFilePath : ${sys:carbon.home}/conf/worker/regexes.yaml
-
- # Cluster Configuration
- cluster.config:
- enabled: true
- groupId: sp
- coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy
- strategyConfig:
- datasource: WSO2_CLUSTER_DB
- heartbeatInterval: 5000
- heartbeatMaxRetry: 5
- eventPollingInterval: 5000
-
- # Authentication configuration
- auth.configs:
- type: 'local' # Type of the IdP client used
- userManager:
- adminRole: admin # Admin role which is granted all permissions
- userStore: # User store
- users:
- -
- user:
- username: admin
- password: YWRtaW4=
- roles: 1
- roles:
- -
- role:
- id: 1
- displayName: admin
-
- # Configuration to enable apim alerts
- #analytics.solutions:
- # APIM-alerts.enabled: true
-
- # Sample of deployment.config for Two node HA
- deployment.config:
- type: ha
- passiveNodeDetailsWaitTimeOutMillis: 300000
- passiveNodeDetailsRetrySleepTimeMillis: 500
- eventByteBufferQueueCapacity: 20000
- byteBufferExtractorThreadPoolSize: 5
- eventSyncServer:
- host: ${NODE_IP}
- port: 9893
- advertisedHost: ${NODE_IP}
- advertisedPort: 9893
- bossThreads: 10
- workerThreads: 10
- eventSyncClientPool:
- maxActive: 10
- maxTotal: 10
- maxIdle: 10
- maxWait: 60000
- minEvictableIdleTimeMillis: 120000
-
- # Sample of deployment.config for Distributed deployment
- #deployment.config:
- # type: distributed
- # httpsInterface:
- # host: 192.168.1.3
- # port: 9443
- # username: admin
- # password: admin
- # leaderRetryInterval: 10000
- # resourceManagers:
- # - host: 192.168.1.1
- # port: 9543
- # username: admin
- # password: admin
- # - host: 192.168.1.2
- # port: 9543
- # username: admin
- # password: admin
- {{ end }}
diff --git a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-headless-service.yaml b/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-headless-service.yaml
deleted file mode 100644
index 3b51d4de..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-headless-service.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service
- namespace: {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- clusterIP: None
- selector:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker
- ports:
- # ports that this service should serve on
- -
- name: 'thrift'
- port: 7612
- protocol: TCP
- -
- name: 'thrift-ssl'
- port: 7712
- protocol: TCP
- -
- name: 'rest-api-port-1'
- protocol: TCP
- port: 9444
- -
- name: 'rest-api-port-2'
- protocol: TCP
- port: 9091
- -
- name: 'rest-api-port-3'
- protocol: TCP
- port: 7071
- -
- name: 'rest-api-port-4'
- protocol: TCP
- port: 7444
- -
- name: 'event-sync-port-1'
- protocol: TCP
- port: 9893
diff --git a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-statefulset.yaml b/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-statefulset.yaml
deleted file mode 100644
index 6aacc818..00000000
--- a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-statefulset.yaml
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset
- namespace: {{ .Release.Namespace }}
-spec:
- replicas: 2
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker
- serviceName: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service
- template:
- metadata:
- annotations:
- checksum.am.analytics.worker.conf: {{ include (print $.Template.BasePath "/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker
- spec:
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- initContainers:
- - name: init-mysql-db
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of MySQL Server deployment"; while ! nc -z "wso2am-mysql-db-service" 3306; do sleep 1; printf "-"; done; echo -e " >> MySQL Server has started";']
- - name: init-mysql-connector-download
- image: busybox:1.32
- command:
- - /bin/sh
- - "-c"
- - |
- set -e
- connector_version=8.0.17
- wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/${connector_version}/mysql-connector-java-${connector_version}.jar -P /mysql-connector-jar/
- volumeMounts:
- - name: mysql-connector-jar
- mountPath: /mysql-connector-jar
- {{ end }}
- containers:
- - name: wso2am-analytics-worker
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.analytics.worker) | indent 10 }}
- imagePullPolicy: {{ .Values.wso2.deployment.analytics.worker.imagePullPolicy }}
- env:
- - name: NODE_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- - name: NODE_ID
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9444
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.worker.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.worker.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9444
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.worker.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.worker.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/worker.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.analytics.worker.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.worker.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.analytics.worker.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.worker.resources.limits.cpu }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 9764
- protocol: "TCP"
- - containerPort: 9444
- protocol: "TCP"
- - containerPort: 7612
- protocol: "TCP"
- - containerPort: 7712
- protocol: "TCP"
- - containerPort: 9090
- protocol: "TCP"
- - containerPort: 7071
- protocol: "TCP"
- - containerPort: 7444
- protocol: "TCP"
- volumeMounts:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-conf
- mountPath: /home/wso2carbon/wso2-config-volume/conf/worker/deployment.yaml
- subPath: deployment.yaml
- - name: wso2am-analytics-worker-bin
- mountPath: /home/wso2carbon/wso2-config-volume/wso2/worker/bin/carbon.sh
- subPath: carbon.sh
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- mountPath: /home/wso2carbon/wso2-artifact-volume/lib
- {{ end }}
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if .Values.wso2.deployment.am.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-wso2-private-registry-creds
- {{- end }}
- volumes:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-conf
- configMap:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-conf
- - name: wso2am-analytics-worker-bin
- configMap:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-bin
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- emptyDir: {}
- {{ end }}
diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml
index 8c24d26d..34e53dd5 100644
--- a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml
+++ b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml
@@ -20,18 +20,16 @@ metadata:
{{ if .Values.wso2.deployment.am.config }}
data:
{{- range $index, $content := .Values.wso2.deployment.am.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
+ {{ $index }}: |-
+ {{ tpl $content $ | indent 4 }}
+ {{- end }}
- {{ else }}
+ {{ else }}
data:
deployment.toml: |-
[server]
hostname = "{{ .Values.wso2.deployment.am.ingress.management.hostname }}"
- node_ip = "$env{NODE_IP}"
#offset=0
- mode = "single" #single or ha
base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}"
#discard_empty_caches = false
server_role = "default"
@@ -80,7 +78,7 @@ data:
#key_password = "wso2carbon"
[[apim.gateway.environment]]
- name = "Production and Sandbox"
+ name = "Default"
type = "hybrid"
display_in_api_console = true
description = "This is a hybrid gateway that handles both production and sandbox token traffic."
@@ -92,6 +90,11 @@ data:
wss_endpoint = "wss://localhost:8099"
http_endpoint = "http://{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}"
https_endpoint = "https://{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}"
+ websub_event_receiver_http_endpoint = "http://{{ .Values.wso2.deployment.am.ingress.websub.hostname }}"
+ websub_event_receiver_https_endpoint = "https://{{ .Values.wso2.deployment.am.ingress.websub.hostname }}"
+
+ [apim.sync_runtime_artifacts.gateway]
+ gateway_labels =["Default"]
#[apim.cache.gateway_token]
#enable = true
@@ -121,24 +124,17 @@ data:
#[apim.cache.tags]
#expiry_time = "2m"
+ {{ if .Values.wso2.choreoAnalytics.enabled }}
[apim.analytics]
enable = true
- store_api_url = "https://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service:7444"
- #username = "$ref{super_admin.username}"
- #password = "$ref{super_admin.password}"
- #event_publisher_type = "default"
- #event_publisher_impl = "org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher"
- #publish_response_size = true
-
- [[apim.analytics.url_group]]
- analytics_url =["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612"]
- analytics_auth_url =["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712"]
- type = "failover"
-
- #[[apim.analytics.url_group]]
- #analytics_url =["tcp://analytics1:7612","tcp://analytics2:7612"]
- #analytics_auth_url =["ssl://analytics1:7712","ssl://analytics2:7712"]
- #type = "failover"
+ config_endpoint = "{{ .Values.wso2.choreoAnalytics.endpoint }}"
+ auth_token = "{{ .Values.wso2.choreoAnalytics.onpremKey }}"
+ {{ else }}
+ [apim.analytics]
+ enable = false
+ config_endpoint = "https://analytics-event-auth.choreo.dev/auth/v1"
+ auth_token = ""
+ {{ end }}
#[apim.key_manager]
#service_url = "https://localhost:${mgt.transport.https.port}/services/"
@@ -186,11 +182,13 @@ data:
#enable_ratings = true
#enable_forum = true
#enable_anonymous_mode=true
+ #enable_cross_tenant_subscriptions = true
+ #default_reserved_username = "apim_reserved_user"
[apim.cors]
allow_origins = "*"
allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
- allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey", "testKey"]
+ allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"]
allow_credentials = false
[apim.throttling]
@@ -224,7 +222,7 @@ data:
[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9611"]
traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9711"]
- type = "loadbalance"
+ type = "failover"
#[apim.workflow]
#enable = false
@@ -291,13 +289,8 @@ data:
[transport.https.properties]
proxyPort = 443
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://localhost:9611"]
- auth_urls = ["ssl://localhost:9711"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9711"]
+ [transport.passthru_https.sender.parameters]
+ HostnameVerifier = "AllowAll"
{{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
[database.local]
@@ -309,4 +302,5 @@ data:
[database.local]
url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE"
{{ end }}
+
{{ end }}
diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml
index a8d3d9d5..d739923d 100644
--- a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml
+++ b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml
@@ -51,9 +51,6 @@ spec:
- name: mysql-connector-jar
mountPath: /mysql-connector-jar
{{ end }}
- - name: init-am-analytics-worker
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";']
containers:
- name: wso2am
{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.am) | indent 10 }}
@@ -77,7 +74,7 @@ spec:
lifecycle:
preStop:
exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
+ command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/api-manager.sh stop']
resources:
requests:
memory: {{ .Values.wso2.deployment.am.resources.requests.memory }}
@@ -110,10 +107,6 @@ spec:
- name: JVM_MEM_OPTS
value: "-Xms{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xmx }}"
volumeMounts:
- - name: wso2am-executionplans-storage
- mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/executionplans
- - name: wso2am-synapse-configs-storage
- mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/synapse-configs
- name: wso2am-conf
mountPath: /home/wso2carbon/wso2-config-volume/repository/conf
{{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
@@ -135,15 +128,9 @@ spec:
- name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
{{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
imagePullSecrets:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-wso2-private-registry-creds
+ - name: {{ template "am-pattern-1.resource.prefix" . }}-am-wso2-private-registry-creds
{{ end }}
volumes:
- - name: wso2am-executionplans-storage
- persistentVolumeClaim:
- claimName: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-executionplans-volume-claim
- - name: wso2am-synapse-configs-storage
- persistentVolumeClaim:
- claimName: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-synapse-configs-volume-claim
- name: wso2am-conf
configMap:
name: {{ template "am-pattern-1.resource.prefix" . }}-am-1-conf
diff --git a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml
index d770f5b8..6f297367 100644
--- a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml
+++ b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml
@@ -20,18 +20,16 @@ metadata:
{{ if .Values.wso2.deployment.am.config }}
data:
{{- range $index, $content := .Values.wso2.deployment.am.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
+ {{ $index }}: |-
+ {{ tpl $content $ | indent 4 }}
+ {{- end }}
- {{ else }}
+ {{ else }}
data:
deployment.toml: |-
[server]
hostname = "{{ .Values.wso2.deployment.am.ingress.management.hostname }}"
- node_ip = "$env{NODE_IP}"
#offset=0
- mode = "single" #single or ha
base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}"
#discard_empty_caches = false
server_role = "default"
@@ -80,7 +78,7 @@ data:
#key_password = "wso2carbon"
[[apim.gateway.environment]]
- name = "Production and Sandbox"
+ name = "Default"
type = "hybrid"
display_in_api_console = true
description = "This is a hybrid gateway that handles both production and sandbox token traffic."
@@ -92,6 +90,11 @@ data:
wss_endpoint = "wss://localhost:8099"
http_endpoint = "http://{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}"
https_endpoint = "https://{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}"
+ websub_event_receiver_http_endpoint = "http://{{ .Values.wso2.deployment.am.ingress.websub.hostname }}"
+ websub_event_receiver_https_endpoint = "https://{{ .Values.wso2.deployment.am.ingress.websub.hostname }}"
+
+ [apim.sync_runtime_artifacts.gateway]
+ gateway_labels =["Default"]
#[apim.cache.gateway_token]
#enable = true
@@ -121,24 +124,17 @@ data:
#[apim.cache.tags]
#expiry_time = "2m"
+ {{ if .Values.wso2.choreoAnalytics.enabled }}
[apim.analytics]
enable = true
- store_api_url = "https://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service:7444"
- #username = "$ref{super_admin.username}"
- #password = "$ref{super_admin.password}"
- #event_publisher_type = "default"
- #event_publisher_impl = "org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher"
- #publish_response_size = true
-
- [[apim.analytics.url_group]]
- analytics_url =["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612"]
- analytics_auth_url =["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712"]
- type = "failover"
-
- #[[apim.analytics.url_group]]
- #analytics_url =["tcp://analytics1:7612","tcp://analytics2:7612"]
- #analytics_auth_url =["ssl://analytics1:7712","ssl://analytics2:7712"]
- #type = "failover"
+ config_endpoint = "{{ .Values.wso2.choreoAnalytics.endpoint }}"
+ auth_token = "{{ .Values.wso2.choreoAnalytics.onpremKey }}"
+ {{ else }}
+ [apim.analytics]
+ enable = false
+ config_endpoint = "https://analytics-event-auth.choreo.dev/auth/v1"
+ auth_token = ""
+ {{ end }}
#[apim.key_manager]
#service_url = "https://localhost:${mgt.transport.https.port}/services/"
@@ -186,11 +182,13 @@ data:
#enable_ratings = true
#enable_forum = true
#enable_anonymous_mode=true
+ #enable_cross_tenant_subscriptions = true
+ #default_reserved_username = "apim_reserved_user"
[apim.cors]
allow_origins = "*"
allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
- allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey", "testKey"]
+ allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"]
allow_credentials = false
[apim.throttling]
@@ -224,7 +222,7 @@ data:
[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-1-service:9611"]
traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-1-service:9711"]
- type = "loadbalance"
+ type = "failover"
#[apim.workflow]
#enable = false
@@ -291,13 +289,8 @@ data:
[transport.https.properties]
proxyPort = 443
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://localhost:9611"]
- auth_urls = ["ssl://localhost:9711"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-1-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-1-service:9711"]
+ [transport.passthru_https.sender.parameters]
+ HostnameVerifier = "AllowAll"
{{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
[database.local]
@@ -309,4 +302,5 @@ data:
[database.local]
url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE"
{{ end }}
+
{{ end }}
diff --git a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-deployment.yaml b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-deployment.yaml
index 988bcdae..d4e75d1b 100644
--- a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-deployment.yaml
+++ b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-deployment.yaml
@@ -51,12 +51,6 @@ spec:
- name: mysql-connector-jar
mountPath: /mysql-connector-jar
{{ end }}
- - name: init-am-analytics-worker
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";']
- - name: init-am-instance-one
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager instance one deployment"; while ! nc -z {{ template "am-pattern-1.resource.prefix" . }}-am-1-service 9443; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager instance one has started";']
containers:
- name: wso2am
{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.am) | indent 10 }}
@@ -80,7 +74,7 @@ spec:
lifecycle:
preStop:
exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
+ command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/api-manager.sh stop']
resources:
requests:
memory: {{ .Values.wso2.deployment.am.resources.requests.memory }}
@@ -113,10 +107,6 @@ spec:
- name: JVM_MEM_OPTS
value: "-Xms{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xmx }}"
volumeMounts:
- - name: wso2am-executionplans-storage
- mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/executionplans
- - name: wso2am-synapse-configs-storage
- mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/synapse-configs
- name: wso2am-conf
mountPath: /home/wso2carbon/wso2-config-volume/repository/conf
{{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
@@ -138,15 +128,9 @@ spec:
- name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
{{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
imagePullSecrets:
- - name: {{ template "am-pattern-1.resource.prefix" . }}-wso2-private-registry-creds
+ - name: {{ template "am-pattern-1.resource.prefix" . }}-am-wso2-private-registry-creds
{{ end }}
volumes:
- - name: wso2am-executionplans-storage
- persistentVolumeClaim:
- claimName: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-executionplans-volume-claim
- - name: wso2am-synapse-configs-storage
- persistentVolumeClaim:
- claimName: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-synapse-configs-volume-claim
- name: wso2am-conf
configMap:
name: {{ template "am-pattern-1.resource.prefix" . }}-am-2-conf
diff --git a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-service.yaml b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-service.yaml
index 17d783ea..ebc557f2 100644
--- a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-service.yaml
+++ b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-service.yaml
@@ -33,3 +33,6 @@ spec:
- name: jms-tcp
protocol: TCP
port: 5672
+ - name: servlet-https
+ protocol: TCP
+ port: 9443
diff --git a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml
index 5ca1efc8..ab43090f 100644
--- a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml
+++ b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml
@@ -38,24 +38,6 @@ data:
# check if the WSO2 product home exists
test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1
- # shared artifact directories
- directories=("executionplans" "synapse-configs")
- # if the original directory locations of artifacts to be synced between nodes are empty,
- # copy the preserved, default content of these folders to these original locations
- for shared_directory in ${directories[@]}; do
- if test -d ${original_deployment_artifacts}/${shared_directory};
- then
- if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then
- if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory};
- then
- echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})"
- exit 1
- fi
- echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})"
- fi
- fi
- done
-
# Copying carbon_db
if ! test -f /home/wso2carbon/solr/database/WSO2CARBON_DB.mv.db
then
@@ -80,10 +62,10 @@ data:
if [[ -z "${PROFILE_NAME}" ]]
then
# start the server with the provided startup arguments
- sh ${WSO2_SERVER_HOME}/bin/wso2server.sh "$@"
+ sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@"
else
# start the server with the specified profile and provided startup arguments
- sh ${WSO2_SERVER_HOME}/bin/wso2server.sh -Dprofile=${PROFILE_NAME} "$@"
+ sh ${WSO2_SERVER_HOME}/bin/api-manager.sh -Dprofile=${PROFILE_NAME} "$@"
fi
{{ end }}
diff --git a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-service.yaml b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-service.yaml
index 0a1e1633..3e083ae1 100644
--- a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-service.yaml
+++ b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-service.yaml
@@ -35,3 +35,9 @@ spec:
- name: servlet-https
protocol: TCP
port: 9443
+ - name: websub-http
+ protocol: TCP
+ port: 9021
+ - name: websub-https
+ protocol: TCP
+ port: 8021
diff --git a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-volume-claims.yaml b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-volume-claims.yaml
index 102f6744..ec4b240a 100644
--- a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-volume-claims.yaml
+++ b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-volume-claims.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,34 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-executionplans-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.executionPlans }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-shared-synapse-configs-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.synapseConfigs }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
{{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
---
diff --git a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-ingress.yaml b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-websub-ingress.yaml
similarity index 59%
rename from advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-ingress.yaml
rename to advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-websub-ingress.yaml
index 34079adf..40e6ee4e 100644
--- a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-ingress.yaml
+++ b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-websub-ingress.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,21 +15,21 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-ingress
+ name: {{ template "am-pattern-1.resource.prefix" . }}-am-websub-ingress
namespace : {{ .Release.Namespace }}
-{{- if .Values.wso2.deployment.am.pubDevPortalTM.ingress.annotations }}
+{{- if .Values.wso2.deployment.am.ingress.websub.annotations }}
annotations:
-{{ toYaml .Values.wso2.deployment.am.pubDevPortalTM.ingress.annotations | indent 4 }}
+{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations | indent 4 }}
{{- end }}
spec:
tls:
- hosts:
- - {{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}
+ - {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
rules:
- - host: {{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}
+ - host: {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
http:
paths:
- path: /
backend:
- serviceName: {{ template "am-pattern-2.resource.prefix" . }}-am-service
- servicePort: 9443
+ serviceName: {{ template "am-pattern-1.resource.prefix" . }}-am-service
+ servicePort: 8021
diff --git a/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml
new file mode 100644
index 00000000..e19a266c
--- /dev/null
+++ b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml
@@ -0,0 +1,98 @@
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-deployment
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "am-pattern-1.labels" . | indent 4 }}
+spec:
+ replicas: {{ .Values.wso2.deployment.mi.replicas }}
+ strategy:
+ rollingUpdate:
+ maxSurge: {{ .Values.wso2.deployment.mi.strategy.rollingUpdate.maxSurge }}
+ maxUnavailable: {{ .Values.wso2.deployment.mi.strategy.rollingUpdate.maxUnavailable }}
+ type: RollingUpdate
+ selector:
+ matchLabels:
+ deployment: {{ template "am-pattern-1.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1
+ template:
+ metadata:
+ labels:
+ deployment: {{ template "am-pattern-1.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1
+ spec:
+ initContainers:
+ - name: init-am
+ image: busybox:1.32
+ command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager deployment"; while ! nc -z {{ template "am-pattern-1.resource.prefix" . }}-am-service 9443; do sleep 1; printf "-"; done; echo -e " >> API Manager has started";']
+ containers:
+ - name: wso2micro-integrator
+{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.mi) | indent 10 }}
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ args:
+ - "-DsynapseTest=true"
+ {{- end }}
+ livenessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - nc -z localhost 8290
+ initialDelaySeconds: {{ .Values.wso2.deployment.mi.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.mi.livenessProbe.periodSeconds }}
+ readinessProbe:
+ httpGet:
+ path: /healthz
+ port: 9201
+ initialDelaySeconds: {{ .Values.wso2.deployment.mi.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.mi.readinessProbe.periodSeconds }}
+ resources:
+ requests:
+ memory: {{ .Values.wso2.deployment.mi.resources.requests.memory }}
+ cpu: {{ .Values.wso2.deployment.mi.resources.requests.cpu }}
+ limits:
+ memory: {{ .Values.wso2.deployment.mi.resources.limits.memory }}
+ cpu: {{ .Values.wso2.deployment.mi.resources.limits.cpu }}
+ imagePullPolicy: Always
+ securityContext:
+ runAsUser: 802
+ ports:
+ - containerPort: 8290
+ protocol: TCP
+ - containerPort: 9201
+ protocol: TCP
+ - containerPort: 9164
+ protocol: TCP
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ - containerPort: 9008
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.wso2.deployment.mi.envs }}
+ env:
+ {{- range $key, $val := .Values.wso2.deployment.mi.envs }}
+ - name: {{ $key }}
+ value: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
+ {{- if .Values.wso2.deployment.mi.imagePullSecrets }}
+ imagePullSecrets:
+ - name: {{ .Values.wso2.deployment.mi.imagePullSecrets }}
+ {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
+ imagePullSecrets:
+ - name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-wso2-private-registry-creds
+ {{ end }}
diff --git a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-service.yaml b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-service.yaml
similarity index 50%
rename from advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-service.yaml
rename to advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-service.yaml
index 65e6b0e0..4c1e4ca1 100644
--- a/advanced/am-pattern-1/templates/am-analytics/worker/wso2am-pattern-1-am-analytics-worker-service.yaml
+++ b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-service.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -11,43 +11,40 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
apiVersion: v1
kind: Service
metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service
+ name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-service
namespace : {{ .Release.Namespace }}
+ labels:
+ deployment: {{ template "am-pattern-1.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1
+{{ include "am-pattern-1.labels" . | indent 4 }}
spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker
+ type: ClusterIP
ports:
- # ports that this service should serve on
- -
- name: 'thrift'
- port: 7612
- protocol: TCP
- -
- name: 'thrift-ssl'
- port: 7712
+ - port: 8290
+ targetPort: 8290
protocol: TCP
- -
- name: 'rest-api-port-1'
+ name: pass-through-http
+ - port: 8253
+ targetPort: 8253
protocol: TCP
- port: 9444
- -
- name: 'rest-api-port-2'
+ name: pass-through-https
+ - port: 9201
+ targetPort: 9201
protocol: TCP
- port: 9091
- -
- name: 'rest-api-port-3'
+ name: metrics
+ - port: 9164
+ targetPort: 9164
protocol: TCP
- port: 7071
- -
- name: 'rest-api-port-4'
+ name: management
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ - port: 9008
+ targetPort: 9008
protocol: TCP
- port: 7444
- -
- name: 'event-sync-port-1'
- protocol: TCP
- port: 9893
+ name: synapse-test
+ {{- end}}
+ selector:
+ deployment: {{ template "am-pattern-1.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1
diff --git a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-ingress.yaml b/advanced/am-pattern-1/templates/mi/wso2am-pattern-1-mi-management-ingress.yaml
similarity index 60%
rename from advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-ingress.yaml
rename to advanced/am-pattern-1/templates/mi/wso2am-pattern-1-mi-management-ingress.yaml
index 2ec57f88..544fa865 100644
--- a/advanced/am-pattern-1/templates/am-analytics/dashboard/wso2am-pattern-1-am-analytics-dashboard-ingress.yaml
+++ b/advanced/am-pattern-1/templates/mi/wso2am-pattern-1-mi-management-ingress.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,21 +15,21 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-ingress
+ name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-management-ingress
namespace : {{ .Release.Namespace }}
-{{- if .Values.wso2.deployment.analytics.dashboard.ingress.annotations }}
+{{- if .Values.wso2.deployment.mi.ingress.management.annotations }}
annotations:
-{{ toYaml .Values.wso2.deployment.analytics.dashboard.ingress.annotations | indent 4 }}
+{{ toYaml .Values.wso2.deployment.mi.ingress.management.annotations | indent 4 }}
{{- end }}
spec:
tls:
- hosts:
- - {{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
+ - {{ .Values.wso2.deployment.mi.ingress.management.hostname | quote }}
rules:
- - host: {{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
+ - host: {{ .Values.wso2.deployment.mi.ingress.management.hostname | quote }}
http:
paths:
- path: /
backend:
- serviceName: {{ template "am-pattern-1.resource.prefix" . }}-am-analytics-dashboard-service
- servicePort: 9643
+ serviceName: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-service
+ servicePort: 9164
diff --git a/advanced/am-pattern-1/templates/wso2am-pattern-1-am-secrets.yaml b/advanced/am-pattern-1/templates/wso2am-pattern-1-am-secrets.yaml
new file mode 100644
index 00000000..390f651c
--- /dev/null
+++ b/advanced/am-pattern-1/templates/wso2am-pattern-1-am-secrets.yaml
@@ -0,0 +1,30 @@
+{{ if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
+# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- $username := .Values.wso2.subscription.username }}
+{{- $password := .Values.wso2.subscription.password }}
+{{- $email := .Values.wso2.subscription.username }}
+{{- $regId := default "docker.wso2.com" .Values.wso2.deployment.am.dockerRegistry }}
+{{- $auth := printf "%s:%s" $username $password | b64enc }}
+{{- $files := .Files }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "am-pattern-1.resource.prefix" . }}-am-wso2-private-registry-creds
+ namespace: {{ .Release.Namespace }}
+type: kubernetes.io/dockerconfigjson
+data:
+ .dockerconfigjson: {{ $files.Get "auth.json" | replace "reg.id" $regId | replace "docker.wso2.com.username" $username | replace "docker.wso2.com.password" $password | replace "docker.wso2.com.email" $email | replace "docker.wso2.com.auth" $auth | b64enc }}
+{{ end }}
diff --git a/advanced/am-pattern-1/templates/wso2am-pattern-1-mi-secrets.yaml b/advanced/am-pattern-1/templates/wso2am-pattern-1-mi-secrets.yaml
new file mode 100644
index 00000000..d844e209
--- /dev/null
+++ b/advanced/am-pattern-1/templates/wso2am-pattern-1-mi-secrets.yaml
@@ -0,0 +1,29 @@
+{{ if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) (eq (default "docker.wso2.com" .Values.wso2.deployment.mi.dockerRegistry) "docker.wso2.com") }}
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- $username := .Values.wso2.subscription.username }}
+{{- $password := .Values.wso2.subscription.password }}
+{{- $email := .Values.wso2.subscription.username }}
+{{- $regId := default "docker.wso2.com" .Values.wso2.deployment.mi.dockerRegistry }}
+{{- $auth := printf "%s:%s" $username $password | b64enc }}
+{{- $files := .Files }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-wso2-private-registry-creds
+ namespace: {{ .Release.Namespace }}
+type: kubernetes.io/dockerconfigjson
+data:
+ .dockerconfigjson: {{ $files.Get "auth.json" | replace "reg.id" $regId | replace "docker.wso2.com.username" $username | replace "docker.wso2.com.password" $password | replace "docker.wso2.com.email" $email | replace "docker.wso2.com.auth" $auth | b64enc }}
+{{ end }}
diff --git a/advanced/am-pattern-1/values.yaml b/advanced/am-pattern-1/values.yaml
index eed4cbd1..cd6608cc 100644
--- a/advanced/am-pattern-1/values.yaml
+++ b/advanced/am-pattern-1/values.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,6 +20,13 @@ wso2:
username: ""
password: ""
+ # WSO2 Choreo Analytics Parameters
+ # If provided, these parameters will be used publish analytics data to Choreo Analytics environment (https://apim.docs.wso2.com/en/latest/observe/api-manager-analytics/configure-analytics/register-for-analytics/).
+ choreoAnalytics:
+ enabled: false
+ endpoint: ""
+ onpremKey: ""
+
deployment:
dependencies:
# The configuration should be set to be 'true' if a MySQL database should be spawned as a pod within the cluster
@@ -35,14 +42,6 @@ wso2:
# Defaults to Kubernetes Storage Class generated using the NFS Server Provisioner (https://github.com/helm/charts/tree/master/stable/nfs-server-provisioner)
storageClass: &storage_class "nfs"
- # Define capacities for persistent runtime artifact directories which are shared between instances of the relevant API Manager profile
- sharedArtifacts:
- capacity:
- # For execution plans shared between the Traffic Manager profile instances
- executionPlans: 20M
- # For synapse artifacts of APIs shared between the Gateway profile instances
- synapseConfigs: 50M
-
# Persistent runtime artifacts for Apache Solr-based indexing
apacheSolrIndexing:
# Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled
@@ -60,7 +59,7 @@ wso2:
# If a custom image must be used, uncomment 'dockerRegistry' and provide its value
# dockerRegistry: ""
imageName: "wso2am"
- imageTag: "3.2.0"
+ imageTag: "4.0.0"
# Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
imagePullPolicy: Always
@@ -98,11 +97,11 @@ wso2:
# Maximum Heap size
xmx: "1024m"
- # If the deployment configurations for the WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml),
+ # If the deployment configurations for the WSO2 API Manager v4.0.0 (/repository/conf/deployment.toml),
# add the customized configuration file under (wso2 -> deployment -> am -> config -> deployment.toml)
-# config: ""
-# deployment.toml: |-
-# # deployment configurations for the WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml)
+ # config: ""
+ # deployment.toml: |-
+ # # deployment configurations for the WSO2 API Manager v4.0.0 (/repository/conf/deployment.toml)
# Configure Ingresses
ingress:
@@ -123,129 +122,67 @@ wso2:
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-
- analytics:
- dashboard:
- # Container image configurations
- # If a custom image must be used, uncomment 'dockerRegistry' and provide its value
- # dockerRegistry: ""
- imageName: "wso2am-analytics-dashboard"
- imageTag: "3.2.0"
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- imagePullPolicy: Always
-
- # Number of deployment replicas
- replicas: 1
-
- # Kubernetes RollingUpdate strategy configurations
- strategy:
- rollingUpdate:
- maxSurge: 1
- maxUnavailable: 0
-
- # Indicates whether the container is running
- livenessProbe:
- # Number of seconds after the container has started before liveness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
- # Indicates whether the container is ready to service requests
- readinessProbe:
- # Number of seconds after the container has started before readiness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
-
- resources:
- # These are the minimum resource recommendations for running WSO2 Stream Processor based server profiles
- # as per official documentation (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- requests:
- memory: "4Gi"
- cpu: "2000m"
- # Please see the official documentation on WSO2 Stream Processor based Performance Analysis and Resource recommendations
- # (https://docs.wso2.com/display/SP440/Performance+Analysis+Results) and tune the limits according to your needs
- # where necessary
- limits:
- memory: "4Gi"
- cpu: "2000m"
- # JVM settings
- # These are the resource allocation configurations associated with the JVM
- # Refer to the official documentation for advanced details (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- jvm:
- # Resource allocation for the Java Heap
- heap:
- memory:
- # Initial and minimum Heap size
- xms: "2048m"
- # Maximum Heap size
- xmx: "2048m"
-
- # If the deployment configurations for the Dashboard profile of WSO2 API Manager Analytics v3.2.0 (/conf/dashboard/deployment.yaml),
- # add the customized configuration file under (wso2 -> deployment -> analytics -> dashboard -> config -> deployment.yaml)
-# config:
-# deployment.yaml: |-
-# # deployment configurations for the Dashboard profile of WSO2 API Manager Analytics v3.2.0 (/conf/dashboard/deployment.yaml)
-
- # Configure Ingress
- ingress:
- # Hostname for API Manager Analytics Dashboard
- hostname: "analytics.am.wso2.com"
- # Annotations for the API Manager Analytics Dashboard service Ingress
+ websub:
+ hostname: "websub.am.wso2.com"
+ # Annotations for the API Manager WebSub service Ingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
- worker:
- # Container image configurations
- # If a custom image must be used, uncomment 'dockerRegistry' and provide its value
- # dockerRegistry: ""
- imageName: "wso2am-analytics-worker"
- imageTag: "3.2.0"
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- imagePullPolicy: Always
-
- # Indicates whether the container is running
- livenessProbe:
- # Number of seconds after the container has started before liveness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
- # Indicates whether the container is ready to service requests
- readinessProbe:
- # Number of seconds after the container has started before readiness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
-
- resources:
- # These are the minimum resource recommendations for running WSO2 Stream Processor based server profiles
- # as per official documentation (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- requests:
- memory: "4Gi"
- cpu: "2000m"
- # Please see the official documentation on WSO2 Stream Processor based Performance Analysis and Resource recommendations
- # (https://docs.wso2.com/display/SP440/Performance+Analysis+Results) and tune the limits according to your needs
- # where necessary
- limits:
- memory: "4Gi"
- cpu: "2000m"
- # JVM settings
- # These are the resource allocation configurations associated with the JVM
- # Refer to the official documentation for advanced details (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- jvm:
- # Resource allocation for the Java Heap
- heap:
- memory:
- # Initial and minimum Heap size
- xms: "2048m"
- # Maximum Heap size
- xmx: "2048m"
+ mi:
+ # If a custom image must be used, uncomment 'dockerRegistry' and provide its value.
+ # dockerRegistry: ""
+ imageName: "wso2mi"
+ imageTag: "4.0.0"
+ # Number of deployment replicas
+ replicas: 2
+ strategy:
+ rollingUpdate:
+ # The maximum number of pods that can be scheduled above the desired number of pods.
+ maxSurge: 1
+ # The maximum number of pods that can be unavailable during the update.
+ maxUnavailable: 0
+ # Indicates whether the container is running.
+ livenessProbe:
+ # Number of seconds after the container has started before liveness probes are initiated.
+ initialDelaySeconds: 35
+ # How often (in seconds) to perform the probe.
+ periodSeconds: 10
+ # Indicates whether the container is ready to service requests.
+ readinessProbe:
+ # Number of seconds after the container has started before readiness probes are initiated.
+ initialDelaySeconds: 35
+ # How often (in seconds) to perform the probe.
+ periodSeconds: 10
+ # These are the minimum resource recommendations for running WSO2 Micro Integrator
+ resources:
+ requests:
+ # The minimum amount of memory that should be allocated for a Pod
+ memory: "512Mi"
+ # The minimum amount of CPU that should be allocated for a Pod
+ cpu: "500m"
+ limits:
+ # The maximum amount of memory that should be allocated for a Pod
+ memory: "1Gi"
+ # The maximum amount of CPU that should be allocated for a Pod
+ cpu: "1000m"
+ # Environment variables for the Micro integrator deployment.
+ envs:
+ # ENV_NAME: ENV_VALUE
+ # Configure synapse testing.
+ synapseTest:
+ enabled: false
- # If the deployment configurations for the Worker profile of WSO2 API Manager Analytics v3.2.0 (/conf/worker/deployment.yaml),
- # add the customized configuration file under (wso2 -> deployment -> analytics -> worker -> config -> deployment.yaml)
-# config:
-# deployment.yaml: |-
-# # deployment configurations for the Worker profile of WSO2 API Manager Analytics v3.2.0 (/conf/worker/deployment.yaml)
+ # Configure Ingresses
+ ingress:
+ # Configure management ingress
+ management:
+ # Hostname for the Micro Integrator management endpoint.
+ hostname: "management.mi.wso2.com"
+ # Annotations for the Micro Integrator management Ingress.
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
kubernetes:
# Name of Kubernetes service account
diff --git a/advanced/am-pattern-2/Chart.yaml b/advanced/am-pattern-2/Chart.yaml
index 58d64d27..4f3c399d 100644
--- a/advanced/am-pattern-2/Chart.yaml
+++ b/advanced/am-pattern-2/Chart.yaml
@@ -13,8 +13,8 @@
# limitations under the License.
apiVersion: v1
-appVersion: "3.2.0"
+appVersion: "4.0.0"
description: A Helm chart for the deployment of WSO2 API Management deployment pattern 2
name: am-pattern-2
-version: 3.2.0-4
+version: 4.0.0-1
icon: https://wso2.cachefly.net/wso2/sites/all/images/wso2logo.svg
diff --git a/advanced/am-pattern-2/README.md b/advanced/am-pattern-2/README.md
index 36264b82..6d11fa47 100644
--- a/advanced/am-pattern-2/README.md
+++ b/advanced/am-pattern-2/README.md
@@ -1,12 +1,11 @@
-# Helm Chart for deployment of WSO2 API Manager with a separate Gateway and separate Key Manager along with WSO2 API Manager Analytics
+# Pattern 2: Helm Chart for Standard HA Deployment of WSO2 API Manager with Multitenancy along with WSO2 Micro Integrator
-Resources for building a Helm chart for deployment of [WSO2 API Manager with a separate Gateway and separate Key Manager along with
-WSO2 API Manager Analytics](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/deployment-patterns/#pattern-2-deployment-with-a-separate-gateway-and-separate-key-manager).
+This deployment consists of two API-M nodes and two nodes each of the integration runtimes (Micro Integrator/Streaming Integrator) per tenant. You can use this pattern when traffic from different tenants in the API-M cluster needs to be handled in isolation. This deployment also allows you to direct the traffic of each tenant to a separate integration cluster.
-![WSO2 API Manager pattern 2 deployment](https://apim.docs.wso2.com/en/latest/assets/img/setup-and-install/2-separate-gateway-and-key-manager.png)
+![WSO2 API Manager pattern 2 deployment](https://apim.docs.wso2.com/en/4.0.0/assets/img/setup-and-install/basic-ha-with-multitenancy.png)
For advanced details on the deployment pattern, please refer to the official
-[documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/deploying-wso2-api-m-in-a-distributed-setup/).
+[documentation](https://apim.docs.wso2.com/en/4.0.0/install-and-setup/setup/deployment-overview/#standard-ha-deployment-with-multitenancy).
## Contents
@@ -50,23 +49,23 @@ For advanced details on the deployment pattern, please refer to the official
You can install the relevant Helm chart either from [WSO2 Helm Chart Repository](https://hub.helm.sh/charts/wso2) or by source.
**Note:**
-
+* This Helm chart has been implemented by extending the `advance/am-pattern-1` Helm resource.
* `NAMESPACE` should be the Kubernetes Namespace in which the resources are deployed.
#### Install Chart From [WSO2 Helm Chart Repository](https://hub.helm.sh/charts/wso2)
- Helm version 2
+Deploy the Kubernetes resources using the Helm Chart
- ```
- helm install --name wso2/am-pattern-2 --version 3.2.0-1 --namespace
- ```
+- Helm version 2
- Helm version 3
+ ```
+ helm install --name wso2/am-pattern-2 --version 4.0.0-1 --namespace
+ ```
- - Deploy the Kubernetes resources using the Helm Chart
+- Helm version 3
```
- helm install wso2/am-pattern-2 --version 3.2.0-1 --namespace --create-namespace
+ helm install wso2/am-pattern-2 --version 4.0.0-1 --namespace --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -76,8 +75,23 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
+- To provide WSO2 Subscription credentials for WSO2 API Manager and WSO2 Micro Integrator as in pattern 1
+ ```
+ --set am-pattern-1.wso2.subscription.username=$SUBSCRIPTION_USERNAME --set am-pattern-1.wso2.subscription.password=$SUBSCRIPTION_PASSWORD
+ ```
+
+- To provide WSO2 Subscription credentials for additional WSO2 Micro Integrator deployment for the new tenant
+ ```
+ --set wso2.subscription.username=$SUBSCRIPTION_USERNAME --set wso2.subscription.password=$SUBSCRIPTION_PASSWORD
+ ```
+
+Below example is to provide WSO2 Subscription credentials for all WSO2 API Manager and WSO2 Micro Integrator tenant 1 and tenant 2 deployments
+
```
- helm install --name wso2/am-pattern-2 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+export SUBSCRIPTION_USERNAME=
+export SUBSCRIPTION_PASSWORD=
+
+helm install --name wso2/am-pattern-2 --version 4.0.0-1 --namespace --set wso2.subscription.username=$SUBSCRIPTION_USERNAME --set wso2.subscription.password=$SUBSCRIPTION_PASSWORD --set am-pattern-1.wso2.subscription.username=$SUBSCRIPTION_USERNAME --set am-pattern-1.wso2.subscription.password=$SUBSCRIPTION_PASSWORD
```
#### Install Chart From Source
@@ -95,18 +109,18 @@ git clone https://github.com/wso2/kubernetes-apim.git
##### Deploy Helm chart for WSO2 API Manager Pattern 2 deployment.
- Helm version 2
-
- ```
- helm install --dep-up --name /am-pattern-2 --version 3.2.0-1 --namespace
- ```
+Deploy the Kubernetes resources using the Helm Chart
+
+- Helm version 2
- Helm version 3
+ ```
+ helm install --dep-up --name /am-pattern-2 --version 4.0.0-1 --namespace
+ ```
- - Deploy the Kubernetes resources using the Helm Chart
+- Helm version 3
```
- helm install /am-pattern-2 --version 3.2.0-1 --namespace --dependency-update --create-namespace
+ helm install /am-pattern-2 --version 4.0.0-1 --namespace --dependency-update --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -117,39 +131,89 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
```
- helm install --name /am-pattern-2 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+ helm install --name /am-pattern-2 --version 4.0.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+```
+
+Or else, you can configure the default configurations inside the am-pattern-1 helm chart [values.yaml](https://github.com/wso2/kubernetes-apim/blob/master/advanced/am-pattern-1/values.yaml) file. Refer [this](https://helm.sh/docs/chart_template_guide/values_files/) for to learn more details about the `values.yaml` file.
+
+
+> **Note:**
+From the above Helm commands, base image of a Micro Integrator is deployed (without any integration solution). To deploy your integration solution with the Helm charts follow the below steps.
+>1. [Create an integration service using WSO2 Integration Studio and expose it as a Managed API](https://apim.docs.wso2.com/en/4.0.0/tutorials/integration-tutorials/service-catalog-tutorial/#exposing-an-integration-service-as-a-managed-api). Then [create a Docker image](https://apim.docs.wso2.com/en/4.0.0/integrate/develop/create-docker-project/#creating-docker-exporter) and push it to your private or public Docker registry.
+ - `INTEGRATION_IMAGE_REGISTRY` will refer to the Docker registry that created Docker image has been pushed
+ - `INTEGRATION_IMAGE_NAME` will refer to the name of the created Docker image
+ - `INTEGRATION_IMAGE_TAG` will refer to the tag of the created Docker image
+>2. If your Docker registry is a private registry, [create an imagePullSecret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
+ - `IMAGE_PULL_SECRET` will refer to the created image pull secret
+>3. Deploy the helm resource using following command.
+> ```
+> helm install wso2/am-pattern-2 --version 4.0.0-1 --namespace --set wso2.deployment.mi.dockerRegistry= --set wso2.deployment.mi.imageName= --set wso2.deployment.mi.imageTag= --set wso2.deployment.mi.imagePullSecrets=
+> ```
+
+### Choreo Analytics
+
+If you need to enable Choreo Analytics with WSO2 API Manager, please follow the documentation on [Register for Analytics](https://apim.docs.wso2.com/en/4.0.0/observe/api-manager-analytics/configure-analytics/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 wso2/am-pattern-2 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey=
+```
+
+Helm v3
+
+```
+helm install wso2/am-pattern-2 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey= --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
```
-
+
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-pattern-2-am-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager service (``)
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-am-ingress`)
+- HOSTS: Hostname of the WSO2 API Manager service (``)
- 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-pattern-2-am-gateway-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager's Gateway service (``)
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-am-gateway-ingress`)
+- HOSTS: Hostname of the WSO2 API Manager's Gateway service (``)
- 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 Analytics Dashboard
+API Manager Websub
-- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-2-am-analytics-dashboard-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager Analytics Dashboard service (``)
-- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager Analytics Dashboard service to outside of the Kubernetes environment
-- PORTS: Externally exposed service ports of the API Manager Analytics Dashboard service
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-am-websub-ingress`)
+- HOSTS: Hostname of the WSO2 API Manager's Websub service (``)
+- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager's Websub service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the API Manager' Websub service
+
+Micro Integrator Management APIs of Tenant 1
+
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-1-mi-1-management-ingress`)
+- HOSTS: Hostname of the WSO2 Micro Integrator service (``)
+- ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the Micro Integrator service
+
+Micro Integrator Management APIs of Tenant 2
+
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-2-mi-2-management-ingress`)
+- HOSTS: Hostname of the WSO2 Micro Integrator service (``)
+- ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the Micro Integrator service
### 3. Add a DNS record mapping the hostnames and the external IP
@@ -160,138 +224,130 @@ If the defined hostnames are not backed by a DNS service, for the purpose of eva
hostnames and the external IP in the `/etc/hosts` file at the client-side.
```
-
+
```
### 4. Access Management Consoles
-- API Manager Publisher: `https:///publisher`
+- API Manager Publisher: `https:///publisher`
-- API Manager DevPortal: `https:///devportal`
+- API Manager DevPortal: `https:///devportal`
-- API Manager Analytics Dashboard: `https:///analytics-dashboard`
+- API Manager Carbon Console: `https:///carbon`
## Configuration
The following tables lists the configurable parameters of the chart and their default values.
-###### WSO2 Subscription Configurations
+### WSO2 Subscription Configurations for WSO2 API Manager and Micro Integrator Tenant 1 Deployment
+
+| Parameter | Description | Default Value |
+|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
+| `am-pattern-1.wso2.subscription.username` | Your WSO2 Subscription username | - |
+| `am-pattern-1.wso2.subscription.password` | Your WSO2 Subscription password | - |
+| `am-pattern-1.wso2.choreoAnalytics.enabled` | Chorero Analytics enabled or not | false |
+| `am-pattern-1.wso2.choreoAnalytics.endpoint` | Choreo Analytics endpoint | https://analytics-event-auth.choreo.dev/auth/v1 |
+| `am-pattern-1.wso2.choreoAnalytics.onpremKey` | On-prem key for Choreo Analytics | - |
+
+
+### WSO2 Subscription Configurations for Micro Integrator Tenant 2 Deployment
| Parameter | Description | Default Value |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `wso2.subscription.username` | Your WSO2 Subscription username | - |
| `wso2.subscription.password` | Your WSO2 Subscription password | - |
-If you do not have an active WSO2 subscription, **do not change** the parameters `wso2.subscription.username` and `wso2.subscription.password`.
+If you do not have an active WSO2 subscription, **do not change** the parameters `am-pattern-1.wso2.subscription.username` and `am-pattern-1.wso2.subscription.password`.
-###### Chart Dependencies
+#### 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 |
+| `am-pattern-1.wso2.deployment.dependencies.mysql` | Enable the deployment and usage of WSO2 API Management MySQL based Helm Chart | true |
+| `am-pattern-1.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
+#### 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 |
+| `am-pattern-1.wso2.deployment.persistentRuntimeArtifacts.storageClass` | Appropriate Kubernetes Storage Class | `nfs` |
+| `am-pattern-1.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled` | Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled | false |
+| `am-pattern-1.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase` | Capacity for persisting the H2 based local Carbon database file | 50M |
+| `am-pattern-1.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData` | Capacity for persisting the Apache Solr indexed data | 50M |
-###### API Manager Server Configurations
+#### API Manager Server Configurations
+
+| Parameter | Description | Default Value |
+|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
+| `am-pattern-1.wso2.deployment.am.dockerRegistry` | Registry location of the Docker image to be used to create API Manager instances | - |
+| `am-pattern-1.wso2.deployment.am.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2am` |
+| `am-pattern-1.wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
+| `am-pattern-1.wso2.deployment.am.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
+| `am-pattern-1.wso2.deployment.am.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager node | 180 |
+| `am-pattern-1.wso2.deployment.am.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager node | 10 |
+| `am-pattern-1.wso2.deployment.am.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager node | 180 |
+| `am-pattern-1.wso2.deployment.am.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager node | 10 |
+| `am-pattern-1.wso2.deployment.am.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 2Gi |
+| `am-pattern-1.wso2.deployment.am.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 2000m |
+| `am-pattern-1.wso2.deployment.am.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 3Gi |
+| `am-pattern-1.wso2.deployment.am.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 3000m |
+| `am-pattern-1.wso2.deployment.am.config` | Custom deployment configuration file (`/repository/conf/deployment.toml`) | - |
+| `am-pattern-1.wso2.deployment.am.ingress.management.hostname` | Hostname for API Manager Admin Portal, Publisher, DevPortal and Carbon Management Console | `am.wso2.com` |
+| `am-pattern-1.wso2.deployment.am.ingress.management.annotations` | Ingress resource annotations for API Manager management consoles | Community NGINX Ingress controller annotations |
+| `am-pattern-1.wso2.deployment.am.ingress.gateway.hostname` | Hostname for API Manager Gateway | `gateway.am.wso2.com` |
+| `am-pattern-1.wso2.deployment.am.ingress.gateway.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
+| `am-pattern-1.wso2.deployment.am.ingress.websub.hostname` | Hostname for API Manager Websub services | `websub.am.wso2.com` |
+| `am-pattern-1.wso2.deployment.am.ingress.websub.annotations` | Ingress resource annotations for API Manager Websub | Community NGINX Ingress controller annotations |
+
+#### Micro Integrator Server Configurations for Tenant 1
| Parameter | Description | Default Value |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
-| `wso2.deployment.am.dockerRegistry` | Registry location of the Docker image to be used to create API Manager instances | - |
-| `wso2.deployment.am.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2am` |
-| `wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 3.2.0 |
-| `wso2.deployment.am.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
-| `wso2.deployment.am.resources.requests.memory` | The minimum amount of memory that should be allocated for running API Manager product profiles with profile optimization | 1Gi |
-| `wso2.deployment.am.resources.requests.cpu` | The minimum amount of CPU that should be allocated for running API Manager product profiles with profile optimization | 1000m |
-| `wso2.deployment.am.resources.limits.memory` | The maximum amount of memory that should be allocated for running API Manager product profiles with profile optimization | 2Gi |
-| `wso2.deployment.am.resources.limits.cpu` | The maximum amount of CPU that should be allocated for running API Manager product profiles with profile optimization | 2000m |
-| `wso2.deployment.am.gateway.ingress.hostname` | Hostname for API Manager Gateway | `gateway.am.wso2.com` |
-| `wso2.deployment.am.gateway.ingress.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
-| `wso2.deployment.am.gateway.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Gateway | 60 |
-| `wso2.deployment.am.gateway.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Gateway | 10 |
-| `wso2.deployment.am.gateway.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Gateway | 60 |
-| `wso2.deployment.am.gateway.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Gateway | 10 |
-| `wso2.deployment.am.gateway.replicas` | Number of replicas of API Manager Gateway to be started | 2 |
-| `wso2.deployment.am.gateway.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 2 |
-| `wso2.deployment.am.gateway.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
-| `wso2.deployment.am.gateway.config` | Custom deployment configuration file for Gateway profile (`/repository/conf/deployment.toml`) | - |
-| `wso2.deployment.am.km.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Key Manager | 60 |
-| `wso2.deployment.am.km.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Key Manager | 10 |
-| `wso2.deployment.am.km.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Key Manager | 60 |
-| `wso2.deployment.am.km.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Key Manager | 10 |
-| `wso2.deployment.am.km.replicas` | Number of replicas of API Manager Key Manager to be started | 2 |
-| `wso2.deployment.am.km.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 2 |
-| `wso2.deployment.am.km.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
-| `wso2.deployment.am.km.config` | Custom deployment configuration file for Key Manager profile (`/repository/conf/deployment.toml`) | - |
-| `wso2.deployment.am.pubDevPortalTM.ingress.hostname` | Hostname for API Manager Publisher, DevPortal and Carbon Management Console | `am.wso2.com` |
-| `wso2.deployment.am.pubDevPortalTM.ingress.annotations` | Ingress resource annotations for API Manager management consoles | Community NGINX Ingress controller annotations |
-| `wso2.deployment.am.pubDevPortalTM.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager node | 180 |
-| `wso2.deployment.am.pubDevPortalTM.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager node | 10 |
-| `wso2.deployment.am.pubDevPortalTM.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager node | 180 |
-| `wso2.deployment.am.pubDevPortalTM.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager node | 10 |
-| `wso2.deployment.am.pubDevPortalTM.resources.requests.memory` | The minimum amount of memory that should be allocated for API Manager All-In-One | 2Gi |
-| `wso2.deployment.am.pubDevPortalTM.resources.requests.cpu` | The minimum amount of CPU that should be allocated for API Manager All-In-One | 2000m |
-| `wso2.deployment.am.pubDevPortalTM.resources.limits.memory` | The maximum amount of memory that should be allocated for API Manager All-In-One | 3Gi |
-| `wso2.deployment.am.pubDevPortalTM.resources.limits.cpu` | The maximum amount of CPU that should be allocated for API Manager All-In-One | 3000m |
-| `wso2.deployment.am.pubDevPortalTM.config` | Custom deployment configuration file (`/repository/conf/deployment.toml`) | - |
-
-**Note**: The above mentioned default, minimum resource amounts for running WSO2 API Manager server profiles are based on its [official documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/).
-
-###### Analytics Dashboard Runtime Configurations
-
-| Parameter | Description | Default Value |
-|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|-----------------------------|
-| `wso2.deployment.analytics.dashboard.dockerRegistry` | Registry location of the Docker image to be used to create an API Manager Analytics instance | - |
-| `wso2.deployment.analytics.dashboard.imageName` | Name of the Docker image to be used to create an API Manager Analytics instance | `wso2am-analytics-dashboard` |
-| `wso2.deployment.analytics.dashboard.imageTag` | Tag of the image used to create an API Manager Analytics instance | 3.2.0 |
-| `wso2.deployment.analytics.dashboard.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
-| `wso2.deployment.analytics.dashboard.replicas` | Number of replicas of API Manager Analytics to be started | 1 |
-| `wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 1 |
-| `wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
-| `wso2.deployment.analytics.dashboard.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.dashboard.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.dashboard.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.dashboard.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.dashboard.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.dashboard.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.dashboard.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.dashboard.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.dashboard.config` | Custom deployment configuration file (`/conf/dashboard/deployment.yaml`) | - |
-| `wso2.deployment.analytics.dashboard.ingress.hostname` | Hostname for API Manager Analytics Dashboard | `analytics.am.wso2.com` |
-| `wso2.deployment.analytics.dashboard.ingress.annotations` | Ingress resource annotations for API Manager Analytics Dashboard | Community NGINX Ingress controller annotations |
-
-###### Analytics Worker Runtime Configurations
-
-| Parameter | Description | Default Value |
-|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|-----------------------------|
-| `wso2.deployment.analytics.worker.dockerRegistry` | Registry location of the Docker image to be used to create an API Manager Analytics instance | - |
-| `wso2.deployment.analytics.worker.imageName` | Name of the Docker image to be used to create an API Manager Analytics instance | `wso2am-analytics-worker` |
-| `wso2.deployment.analytics.worker.imageTag` | Tag of the image used to create an API Manager Analytics instance | 3.2.0 |
-| `wso2.deployment.analytics.worker.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
-| `wso2.deployment.analytics.worker.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.worker.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.worker.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager Analytics node | 20 |
-| `wso2.deployment.analytics.worker.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager Analytics node | 10 |
-| `wso2.deployment.analytics.worker.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.worker.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 2000m |
-| `wso2.deployment.analytics.worker.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 4Gi |
-| `wso2.deployment.analytics.worker.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 2000m |
-
-###### Kubernetes Specific Configurations
+| `am-pattern-1.wso2.deployment.mi.dockerRegistry` | Registry location of the Docker image to be used to create Micro Integrator instances | - |
+| `am-pattern-1.wso2.deployment.mi.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2mi` |
+| `am-pattern-1.wso2.deployment.mi.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
+| `am-pattern-1.wso2.deployment.mi.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
+| `am-pattern-1.wso2.deployment.mi.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for Micro Integrator node | 35 |
+| `am-pattern-1.wso2.deployment.mi.livenessProbe.periodSeconds` | Period of the live-ness probe for Micro Integrator node | 10 |
+| `am-pattern-1.wso2.deployment.mi.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for Micro Integrator node | 35 |
+| `am-pattern-1.wso2.deployment.mi.readinessProbe.periodSeconds` | Period of the readiness probe for Micro Integrator node | 10 |
+| `am-pattern-1.wso2.deployment.mi.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 512Mi |
+| `am-pattern-1.wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m |
+| `am-pattern-1.wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi |
+| `am-pattern-1.wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m |
+| `am-pattern-1.wso2.deployment.mi.config` | Custom deployment configuration file (`/repository/conf/deployment.toml`) | - |
+| `am-pattern-1.wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` |
+| `am-pattern-1.wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
+
+#### Micro Integrator Server Configurations for Tenant 2
+
+| Parameter | Description | Default Value |
+|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
+| `wso2.deployment.mi.dockerRegistry` | Registry location of the Docker image to be used to create Micro Integrator instances | - |
+| `wso2.deployment.mi.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2mi` |
+| `wso2.deployment.mi.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
+| `wso2.deployment.mi.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
+| `wso2.deployment.mi.livenessProbe.initialDelaySeconds` | Initial delay for the live-ness probe for Micro Integrator node | 35 |
+| `wso2.deployment.mi.livenessProbe.periodSeconds` | Period of the live-ness probe for Micro Integrator node | 10 |
+| `wso2.deployment.mi.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for Micro Integrator node | 35 |
+| `wso2.deployment.mi.readinessProbe.periodSeconds` | Period of the readiness probe for Micro Integrator node | 10 |
+| `wso2.deployment.mi.resources.requests.memory` | The minimum amount of memory that should be allocated for a Pod | 512Mi |
+| `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m |
+| `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi |
+| `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m |
+| `wso2.deployment.mi.config` | Custom deployment configuration file (`/repository/conf/deployment.toml`) | - |
+| `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` |
+| `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
+
+
+**Note**: The above mentioned default, minimum resource amounts for running WSO2 API Manager server profiles are based on its [official documentation](https://apim.docs.wso2.com/en/4.0.0/install-and-setup/install/installation-prerequisites/).
+
+#### Kubernetes Specific Configurations
| Parameter | Description | Default Value |
|---------------------------------------------------------------|-------------------------------------------------------------------------------------------|---------------------------------|
-| `kubernetes.serviceAccount` | Name of the Kubernetes Service Account to which the Pods are to be bound | `wso2am-pattern-2-svc-account` |
+| `kubernetes.serviceAccount` | Name of the Kubernetes Service Account to which the Pods are to be bound | `wso2am-pattern-1-svc-account` |
## Runtime Artifact Persistence and Sharing
@@ -300,7 +356,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
* By default, this deployment uses the `nfs` Kubernetes StorageClass created using the official, stable [NFS Server Provisioner](https://hub.helm.sh/charts/stable/nfs-server-provisioner).
* Only persistent storage solutions supporting `ReadWriteMany` [access mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes)
- are applicable for `wso2.deployment.persistentRuntimeArtifacts.storageClass`.
+ are applicable for `am-pattern-1.wso2.deployment.persistentRuntimeArtifacts.storageClass`.
* Please refer to the [official WSO2 container guide](https://github.com/wso2/container-guide/blob/master/store/Persisting_And_Sharing.md#recommended-storage-options-for-wso2-products)
for advanced details with regards to WSO2 recommended, storage options.
@@ -311,7 +367,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
* For advanced details with regards to managing custom Java keystores and truststores in a container based WSO2 product deployment
please refer to the [official WSO2 container guide](https://github.com/wso2/container-guide/blob/master/deploy/Managing_Keystores_And_Truststores.md).
-
+
## Configuring SSL in Service Exposure
* For WSO2 recommended best practices in configuring SSL when exposing the internal product services to outside of the Kubernetes cluster,
diff --git a/advanced/am-pattern-2/auth.json b/advanced/am-pattern-2/auth.json
index 88619f76..97387c87 100644
--- a/advanced/am-pattern-2/auth.json
+++ b/advanced/am-pattern-2/auth.json
@@ -1,6 +1,6 @@
{
"auths": {
- "docker.wso2.com": {
+ "reg.id": {
"username": "docker.wso2.com.username",
"password": "docker.wso2.com.password",
"email": "docker.wso2.com.email",
diff --git a/advanced/am-pattern-2/requirements.yaml b/advanced/am-pattern-2/requirements.yaml
index 7cbd9c07..f53f5fcb 100644
--- a/advanced/am-pattern-2/requirements.yaml
+++ b/advanced/am-pattern-2/requirements.yaml
@@ -13,11 +13,6 @@
# limitations under the License.
dependencies:
- - name: mysql-am
- version: "3.2.0-4"
+ - name: am-pattern-1
+ version: "4.0.0-1"
repository: "https://helm.wso2.com"
- condition: wso2.deployment.dependencies.mysql
- - name: nfs-server-provisioner
- version: "1.1.0"
- repository: "https://helm.wso2.com"
- condition: wso2.deployment.dependencies.nfsServerProvisioner
diff --git a/advanced/am-pattern-2/templates/NOTES.txt b/advanced/am-pattern-2/templates/NOTES.txt
index b2faa965..3ed9cd07 100644
--- a/advanced/am-pattern-2/templates/NOTES.txt
+++ b/advanced/am-pattern-2/templates/NOTES.txt
@@ -1,6 +1,6 @@
Thank you for installing WSO2 API Manager.
-Please follow these steps to access API Manager Publisher, DevPortal consoles and Analytics Dashboard.
+Please follow these steps to access API Manager Publisher and DevPortal consoles.
1. Obtain the external IP (`EXTERNAL-IP`) of the API Manager Ingress resources, by listing down the Kubernetes Ingresses.
@@ -10,25 +10,18 @@ Please follow these steps to access API Manager Publisher, DevPortal consoles an
API Manager Publisher-DevPortal
- - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-2.resource.prefix" . }}-am-ingress)
- - HOSTS: Hostname of the WSO2 API Manager service ({{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }})
+ - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-1.resource.prefix" . }}-am-ingress)
+ - HOSTS: Hostname of the WSO2 API Manager service ({{ index .Values "am-pattern-1" "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 {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-ingress)
- - HOSTS: Hostname of the WSO2 API Manager's Gateway service ({{ .Values.wso2.deployment.am.gateway.ingress.hostname }})
+ - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-1.resource.prefix" . }}-am-gateway-ingress)
+ - HOSTS: Hostname of the WSO2 API Manager's Gateway service ({{ index .Values "am-pattern-1" "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 Analytics Dashboard
-
- - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-ingress)
- - HOSTS: Hostname of the WSO2 API Manager Analytics Dashboard service ({{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }})
- - ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager Analytics Dashboard service to outside of the Kubernetes environment
- - PORTS: Externally exposed service ports of the API Manager Analytics Dashboard service
-
2. Add a DNS record mapping the hostnames (in step 1) and the external IP.
If the defined hostnames (in step 1) are backed by a DNS service, add a DNS record mapping the hostnames and
@@ -37,12 +30,35 @@ Please follow these steps to access API Manager Publisher, DevPortal consoles an
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.
- {{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }} {{ .Values.wso2.deployment.am.gateway.ingress.hostname }} {{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
+ {{ index .Values "am-pattern-1" "wso2" "deployment" "am" "ingress" "management" "hostname" }} {{ index .Values "am-pattern-1" "wso2" "deployment" "am" "ingress" "gateway" "hostname" }}
3. Navigate to the consoles in your browser of choice.
- API Manager Publisher: https://{{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}/publisher
- API Manager DevPortal: https://{{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}/devportal
- API Manager Analytics Dashboard: https://{{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}/analytics-dashboard
+ API Manager Publisher: https://{{ index .Values "am-pattern-1" "wso2" "deployment" "am" "ingress" "management" "hostname" }}/publisher
+ API Manager DevPortal: https://{{ index .Values "am-pattern-1" "wso2" "deployment" "am" "ingress" "management" "hostname" }}/devportal
+
+Please follow these steps to assess Micro Integrator.
+
+1. Obtain the external IP (`EXTERNAL-IP`) of the Ingress resources by listing down the Kubernetes Ingresses.
+
+ kubectl get ing -n {{ .Release.Namespace }}
+
+ Micro Integrator Instance 1 Management APIs
+
+ - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-1.resource.prefix" . }}-mi-1-management-ingress)
+ - HOSTS: Hostname of the WSO2 Micro Integrator service ({{ index .Values "am-pattern-1" "wso2" "deployment" "mi" "ingress" "management" "hostname" }})
+ - ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+ - PORTS: Externally exposed service ports of the Micro Integrator service
+
+ Micro Integrator Instance 2 Management APIs
+
+ - NAME: Metadata name of the Kubernetes Ingress resource (defaults to {{ template "am-pattern-2.resource.prefix" . }}-mi-2-management-ingress)
+ - HOSTS: Hostname of the WSO2 Micro Integrator service ({{ .Values.wso2.deployment.mi.ingress.management.hostname }})
+ - ADDRESS: External IP (`EXTERNAL-IP`) exposing the Micro Integrator service to outside of the Kubernetes environment
+ - PORTS: Externally exposed service ports of the Micro Integrator service
+
+2. Add the above host as an entry in /etc/hosts file as follows:
+
+ {{ index .Values "am-pattern-1" "wso2" "deployment" "mi" "ingress" "management" "hostname" }} {{ .Values.wso2.deployment.mi.ingress.management.hostname }}
Please refer the official documentation at https://apim.docs.wso2.com/en/latest/ for additional information on WSO2 API Manager.
diff --git a/advanced/am-pattern-2/templates/_helpers.tpl b/advanced/am-pattern-2/templates/_helpers.tpl
index b801d4ea..962fe5eb 100644
--- a/advanced/am-pattern-2/templates/_helpers.tpl
+++ b/advanced/am-pattern-2/templates/_helpers.tpl
@@ -1,5 +1,5 @@
{{/*
-Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -64,6 +64,13 @@ Common prefix prepended to Kubernetes resources of this chart
{{- "wso2am-pattern-2" }}
{{- end -}}
+{{/*
+Common prefix prepended to Kubernetes resources of this chart
+*/}}
+{{- define "am-pattern-1.resource.prefix" -}}
+{{- "wso2am-pattern-2" }}
+{{- end -}}
+
{{- define "image" }}
{{- $imageName := .deployment.imageName }}
{{- $imageTag := .deployment.imageTag | default "" }}
@@ -73,7 +80,7 @@ image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}{{-
{{- else }}
{{- $dockerRegistry := .deployment.dockerRegistry | default "docker.wso2.com" }}
{{- $parts := len (split "." $imageTag) }}
-{{- if eq $parts 3 }}
+{{- if and (eq $parts 3) (eq $dockerRegistry "docker.wso2.com") }}
image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}:{{ $imageTag }}.0{{- end }}
{{- else }}
image: {{ $dockerRegistry }}/{{ $imageName }}{{- if not (eq $imageTag "") }}:{{ $imageTag }}{{- end }}
diff --git a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-bin.yaml b/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-bin.yaml
deleted file mode 100644
index 9355acca..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-bin.yaml
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-bin
- namespace : {{ .Release.Namespace }}
-data:
- carbon.sh: |-
- #!/bin/sh
- # ---------------------------------------------------------------------------
- # Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- # ----------------------------------------------------------------------------
- # Main Script for the WSO2 Carbon Server
- #
- # Environment Variable Prequisites
- #
- # CARBON_HOME Home of WSO2 Carbon installation. If not set I will try
- # to figure it out.
- # RUNTIME_HOME Home of WSO2 Carbon Runtime. .
- #
- # JAVA_HOME Must point at your Java Development Kit installation.
- #
- # JAVA_OPTS (Optional) Java runtime options used when the commands
- # is executed.
- #
- # NOTE: Borrowed generously from Apache Tomcat startup scripts.
- # -----------------------------------------------------------------------------
-
- # OS specific support. $var _must_ be set to either true or false.
- #ulimit -n 100000
-
- cygwin=false;
- darwin=false;
- os400=false;
- mingw=false;
- case "`uname`" in
- CYGWIN*) cygwin=true;;
- MINGW*) mingw=true;;
- OS400*) os400=true;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
- esac
-
- # resolve links - $0 may be a softlink
- PRG="$0"
-
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
-
- # Get standard environment variables
- TEMPCURDIR=`dirname "$PRG"`
-
- # Only set RUNTIME_HOME if not already set
- [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$TEMPCURDIR/.." ; pwd`
-
- # Only set CARBON_HOME if not already set
- [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$TEMPCURDIR/../../../" ; pwd`
-
- # Only set RUNTIME if not already set
- [ -z "$RUNTIME" ] && RUNTIME=${RUNTIME_HOME##*/}
-
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
- [ -n "$RUNTIME_HOME" ] && RUNTIME_HOME=`cygpath --unix "$RUNTIME_HOME"`
- fi
-
- # For OS400
- if $os400; then
- # Set job priority to standard for interactive (interactive - 6) by using
- # the interactive priority - 6, the helper threads that respond to requests
- # will be running at the same priority as interactive jobs.
- COMMAND='chgjob job('$JOBNAME') runpty(6)'
- system $COMMAND
-
- # Enable multi threading
- QIBM_MULTI_THREADED=Y
- export QIBM_MULTI_THREADED
- fi
-
- # For Migwn, ensure paths are in UNIX format before anything is touched
- if $mingw ; then
- [ -n "$CARBON_HOME" ] &&
- CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
- fi
-
- if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=java
- fi
- fi
-
- if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " CARBON cannot execute $JAVACMD"
- exit 1
- fi
-
- # if JAVA_HOME is not set we're not happy
- if [ -z "$JAVA_HOME" ]; then
- echo "You must set the JAVA_HOME variable before running CARBON."
- exit 1
- fi
-
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- PID=`cat "$RUNTIME_HOME"/runtime.pid`
- fi
-
- # ----- Process the input command ----------------------------------------------
- args=""
- for c in $*
- do
- if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
- CMD="--debug"
- continue
- elif [ "$CMD" = "--debug" ]; then
- if [ -z "$PORT" ]; then
- PORT=$c
- fi
- elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
- CMD="stop"
- elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
- CMD="start"
- elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
- CMD="version"
- elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
- CMD="restart"
- elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
- CMD="test"
- else
- args="$args $c"
- fi
- done
-
- if [ "$CMD" = "--debug" ]; then
- if [ "$PORT" = "" ]; then
- echo " Please specify the debug port after the --debug option"
- exit 1
- fi
- if [ -n "$JAVA_OPTS" ]; then
- echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
- fi
- CMD="RUN"
- JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
- echo "Please start the remote debugging client to continue..."
- elif [ "$CMD" = "start" ]; then
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- if ps -p $PID > /dev/null ; then
- echo "Process is already running"
- exit 0
- fi
- fi
- export CARBON_HOME=$CARBON_HOME
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "stop" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- exit 0
- elif [ "$CMD" = "restart" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- process_status=0
- pid=`cat $RUNTIME_HOME/runtime.pid`
- while [ "$process_status" -eq "0" ]
- do
- sleep 1;
- ps -p$pid 2>&1 > /dev/null
- process_status=$?
- done
-
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "test" ]; then
- JAVACMD="exec "$JAVACMD""
- elif [ "$CMD" = "version" ]; then
- cat $CARBON_HOME/bin/kernel-version.txt
- exit 0
- fi
-
- # ---------- Handle the SSL Issue with proper JDK version --------------------
- java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}')
- java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}')
- if [ $java_version_formatted -lt 0108 ] || [ $java_version_formatted -gt 1100 ]; then
- echo " Starting WSO2 Carbon (in unsupported JDK)"
- echo " [ERROR] CARBON is supported only on JDK 1.8 and 11"
- fi
-
- CARBON_XBOOTCLASSPATH=""
- for f in "$CARBON_HOME"/bin/bootstrap/xboot/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/xboot/*.jar" ];then
- CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
- fi
- done
-
- JAVA_ENDORSED_DIRS="$CARBON_HOME/bin/bootstrap/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
-
- CARBON_CLASSPATH=""
- if [ -e "$JAVA_HOME/bin/bootstrap/tools.jar" ]; then
- CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
- fi
- for f in "$CARBON_HOME"/bin/bootstrap/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/*.jar" ];then
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
- fi
- done
- for t in "$CARBON_HOME"/bin/bootstrap/commons-lang*.jar
- do
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
- done
- # For Cygwin, switch paths to Windows format before running java
- if $cygwin; then
- JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
- CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
- RUNTIME_HOME=`cygpath --absolute --windows "$RUNTIME_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
- fi
- CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
- CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
- fi
-
- # ----- Execute The Requested Command -----------------------------------------
-
- echo JAVA_HOME environment variable is set to $JAVA_HOME
- echo CARBON_HOME environment variable is set to $CARBON_HOME
- echo RUNTIME_HOME environment variable is set to $RUNTIME_HOME
-
- cd "$RUNTIME_HOME"
-
- START_EXIT_STATUS=121
- status=$START_EXIT_STATUS
-
- #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
- # -Djava.rmi.server.hostname="your.IP.goes.here"
-
- JAVA_VER_BASED_OPTS=""
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_VER_BASED_OPTS="-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS"
- fi
-
- if [ $java_version_formatted -ge 1100 ] ; then
- JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
- fi
-
- while [ "$status" = "$START_EXIT_STATUS" ]
- do
- $JAVACMD \
- -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
- -Xms{{ .Values.wso2.deployment.analytics.dashboard.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.analytics.dashboard.resources.jvm.heap.memory.xmx }} \
- -XX:+HeapDumpOnOutOfMemoryError \
- -XX:HeapDumpPath="$RUNTIME_HOME/logs/heap-dump.hprof" \
- $JAVA_OPTS \
- -classpath "$CARBON_CLASSPATH" \
- $JAVA_VER_BASED_OPTS \
- -Djava.io.tmpdir="$CARBON_HOME/tmp" \
- -Dcarbon.registry.root=/ \
- -Djava.command="$JAVACMD" \
- -Dcarbon.home="$CARBON_HOME" \
- -Dwso2.runtime.path="$RUNTIME_HOME" \
- -Dwso2.runtime="$RUNTIME" \
- -Djavax.xml.bind.JAXBContextFactory="com.sun.xml.bind.v2.ContextFactory" \
- -Djava.util.logging.config.file="$RUNTIME_HOME/bin/bootstrap/logging.properties" \
- -Djava.security.egd=file:/dev/./urandom \
- -Dfile.encoding=UTF8 \
- -Djavax.net.ssl.keyStore="$CARBON_HOME/resources/security/wso2carbon.jks" \
- -Djavax.net.ssl.keyStorePassword="wso2carbon" \
- -Djavax.net.ssl.trustStore="$CARBON_HOME/resources/security/client-truststore.jks" \
- -Djavax.net.ssl.trustStorePassword="wso2carbon" \
- -Dio.netty.tryReflectionSetAccessible=false \
- org.wso2.carbon.launcher.Main $*
- status=$?
- done
diff --git a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-conf.yaml b/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-conf.yaml
deleted file mode 100644
index 6ac48d8f..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-conf.yaml
+++ /dev/null
@@ -1,444 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-conf
- namespace : {{ .Release.Namespace }}
- {{- if .Values.wso2.deployment.analytics.dashboard.config }}
-data:
- {{- range $index, $content := .Values.wso2.deployment.analytics.dashboard.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{- else }}
-data:
- deployment.yaml: |-
- ################################################################################
- # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved
- #
- # Licensed under the Apache License, Version 2.0 (the \"License\");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an \"AS IS\" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ################################################################################
-
- # Carbon Configuration Parameters
- wso2.carbon:
- type: wso2-apim-analytics
- # value to uniquely identify a server
- id: wso2-am-analytics
- # server name
- name: WSO2 API Manager Analytics Server
- # enable/disable hostname verifier
- hostnameVerificationEnabled: false
- # ports used by this server
- ports:
- # port offset
- offset: 3
-
- # Configuration used for the databridge communication
- databridge.config:
- # No of worker threads to consume events
- # THIS IS A MANDATORY FIELD
- workerThreads: 10
- # Maximum amount of messages that can be queued internally in MB
- # THIS IS A MANDATORY FIELD
- maxEventBufferCapacity: 10000000
- # Queue size; the maximum number of events that can be stored in the queue
- # THIS IS A MANDATORY FIELD
- eventBufferSize: 2000
- # Keystore file path
- # THIS IS A MANDATORY FIELD
- keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks
- # Keystore password
- # THIS IS A MANDATORY FIELD
- keyStorePassword : wso2carbon
- # Session Timeout value in mins
- # THIS IS A MANDATORY FIELD
- clientTimeoutMin: 30
- # Data receiver configurations
- # THIS IS A MANDATORY FIELD
- dataReceivers:
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Thrift
- # Data receiver properties
- properties:
- tcpPort: '7611'
- sslPort: '7711'
-
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Binary
- # Data receiver properties
- properties:
- tcpPort: '9611'
- sslPort: '9711'
- tcpReceiverThreadPoolSize: '100'
- sslReceiverThreadPoolSize: '100'
- hostName: 0.0.0.0
-
- # Configuration of the Data Agents - to publish events through databridge
- data.agent.config:
- # Data agent configurations
- # THIS IS A MANDATORY FIELD
- agents:
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Thrift
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Binary
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
-
- # Deployment configuration parameters
- wso2.artifact.deployment:
- # Scheduler update interval
- updateInterval: 5
-
- # HA Configuration
- state.persistence:
- enabled: false
- intervalInMin: 1
- revisionsToKeep: 2
- persistenceStore: org.wso2.carbon.streaming.integrator.core.persistence.FileSystemPersistenceStore
- config:
- location: siddhi-app-persistence
-
- # Secure Vault Configuration
- wso2.securevault:
- secretRepository:
- type: org.wso2.carbon.secvault.repository.DefaultSecretRepository
- parameters:
- privateKeyAlias: wso2carbon
- keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks
- secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties
- masterKeyReader:
- type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader
- parameters:
- masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml
-
-
- # Data Sources Configuration
- wso2.datasources:
- dataSources:
- # Dashboard data source
- - name: WSO2_DASHBOARD_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/DASHBOARD_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DASHBOARD_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
- - name: BUSINESS_RULES_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/BUSINESS_RULES_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_BUSINESS_RULES_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- # carbon metrics data source
- - name: WSO2_METRICS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/WSO2MetricsDB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 20
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: WSO2_PERMISSIONS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/PERMISSION_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_PERMISSIONS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- #Data source for APIM Analytics
- - name: APIM_ANALYTICS_DB
- description: Datasource used for APIM Analytics
- jndiConfig:
- name: jdbc/APIM_ANALYTICS_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_STATS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- #Main datasource used in API Manager
- - name: AM_DB
- description: Main datasource used by API Manager
- jndiConfig:
- name: jdbc/AM_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?useSSL=false"
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- wso2.business.rules.manager:
- datasource: BUSINESS_RULES_DB
- # rule template wise configuration for deploying business rules
- deployment_configs:
- -
- # : of the Worker node
- localhost:9444:
- # UUIDs of rule templates that are needed to be deployed on the node
- - stock-data-analysis
- - stock-exchange-input
- - stock-exchange-output
- - identifying-continuous-production-decrease
- - popular-tweets-analysis
- - http-analytics-processing
- - message-tracing-source-template
- - message-tracing-app-template
- # credentials for worker nodes
- username: admin
- password: admin
-
- wso2.transport.http:
- transportProperties:
- - name: "server.bootstrap.socket.timeout"
- value: 60
- - name: "client.bootstrap.socket.timeout"
- value: 60
- - name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- - id: "default"
- host: "0.0.0.0"
- port: 9089
-
- - id: "default-https"
- host: "0.0.0.0"
- port: 9640
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- ## Dashboard data provider authorization
- data.provider.configs:
- authorizingClass: org.wso2.analytics.apim.dashboards.core.data.provider.Authorizer
-
- ## Additional APIs that needs to be added to the server.
- ## Should be provided as a key value pairs { API context path: Microservice implementation class }
- ## The configured APIs will be available as https://{host}:{port}/analytics-dashboard/{API_context_path}
- additional.apis:
- /apis/analytics/v1.0/apim: org.wso2.analytics.apim.rest.api.proxy.ApimApi
- /apis/v1.0/report: org.wso2.analytics.apim.rest.api.report.ReportApi
-
- report:
- implClass: org.wso2.analytics.apim.rest.api.report.reportgen.DefaultReportGeneratorImpl
-
- ## Authentication configuration
- auth.configs:
- type: apim
- ssoEnabled: true
- properties:
- adminScope: apim_analytics:admin_carbon.super
- allScopes: apim_analytics:admin openid apim:api_view apim:subscribe apim_analytics:monitoring_dashboard:own apim_analytics:monitoring_dashboard:edit apim_analytics:monitoring_dashboard:view apim_analytics:business_analytics:own apim_analytics:business_analytics:edit apim_analytics:business_analytics:view apim_analytics:api_analytics:own apim_analytics:api_analytics:edit apim_analytics:api_analytics:view apim_analytics:application_analytics:own apim_analytics:application_analytics:edit apim_analytics:application_analytics:view
- adminUsername: admin
- adminPassword: admin
- kmDcrUrl: https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443/client-registration/v0.17/register
- kmTokenUrlForRedirection: https://{{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}/oauth2
- kmTokenUrl: https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443/oauth2
- kmUsername: admin
- kmPassword: admin
- portalAppContext: analytics-dashboard
- businessRulesAppContext : business-rules
- cacheTimeout: 30
- baseUrl: https://{{ .Values.wso2.deployment.analytics.dashboard.ingress.hostname }}
- grantType: authorization_code
- publisherUrl: https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443
- devPortalUrl: https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443
- externalLogoutUrl: https://{{ .Values.wso2.deployment.am.pubDevPortalTM.ingress.hostname }}/oidc/logout
-
- wso2.dashboard:
- roles:
- creators:
- - apim_analytics:admin_carbon.super
- themeConfigProviderClass: org.wso2.carbon.dashboards.core.DefaultDashboardThemeConfigProvider
-
- ## RDBMS Data Provider configuration
- wso2.rdbms.data.provider:
- timeTypes:
- - DATE
- - TIME
- - DATETIME
- - TIMESTAMP
- - TIMESTAMP WITHOUT TIME ZONE
- {{- end }}
diff --git a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-deployment.yaml b/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-deployment.yaml
deleted file mode 100644
index bd114b4d..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-deployment.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-deployment
- namespace: {{ .Release.Namespace }}
-spec:
- replicas: {{ .Values.wso2.deployment.analytics.dashboard.replicas }}
- strategy:
- rollingUpdate:
- maxSurge: {{ .Values.wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxSurge }}
- maxUnavailable: {{ .Values.wso2.deployment.analytics.dashboard.strategy.rollingUpdate.maxUnavailable }}
- type: RollingUpdate
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard
- template:
- metadata:
- annotations:
- checksum.am.analytics.dashboard.conf: {{ include (print $.Template.BasePath "/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard
- spec:
- initContainers:
- {{- if .Values.wso2.deployment.dependencies.mysql }}
- - name: init-mysql-db
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of DBMS service"; while ! nc -z "wso2am-mysql-db-service" 3306; do sleep 1; printf "-"; done; echo -e " >> DBMS service is available";']
- - name: init-mysql-connector-download
- image: busybox:1.32
- command:
- - /bin/sh
- - "-c"
- - |
- set -e
- connector_version=8.0.17
- wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/${connector_version}/mysql-connector-java-${connector_version}.jar -P /mysql-connector-jar/
- volumeMounts:
- - name: mysql-connector-jar
- mountPath: /mysql-connector-jar
- {{- end }}
- - name: init-am
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-service 9443; do sleep 1; printf "-"; done; echo -e " >> API Manager service has started";']
- containers:
- - name: wso2am-analytics-dashboard
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.analytics.dashboard) | indent 8 }}
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9643
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.dashboard.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.dashboard.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9643
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.dashboard.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.dashboard.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/dashboard.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.analytics.dashboard.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.dashboard.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.analytics.dashboard.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.dashboard.resources.limits.cpu }}
- imagePullPolicy: {{ .Values.wso2.deployment.analytics.dashboard.imagePullPolicy }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 9643
- protocol: "TCP"
- volumeMounts:
- - name: wso2am-analytics-dashboard-conf
- mountPath: /home/wso2carbon/wso2-config-volume/conf/dashboard/deployment.yaml
- subPath: deployment.yaml
- - name: wso2am-analytics-dashboard-bin
- mountPath: /home/wso2carbon/wso2-config-volume/wso2/dashboard/bin/carbon.sh
- subPath: carbon.sh
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- mountPath: /home/wso2carbon/wso2-artifact-volume/lib
- {{ end }}
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if .Values.wso2.deployment.analytics.dashboard.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.analytics.dashboard.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds
- {{ end }}
- volumes:
- - name: wso2am-analytics-dashboard-conf
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-conf
- - name: wso2am-analytics-dashboard-bin
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-bin
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- emptyDir: {}
- {{ end }}
diff --git a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-service.yaml b/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-service.yaml
deleted file mode 100644
index 52caf88c..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/dashboard/wso2am-pattern-2-am-analytics-dashboard-service.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-dashboard
- ports:
- # ports that this service should serve on
- - name: 'analytics-dashboard'
- port: 9643
- protocol: TCP
diff --git a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-bin.yaml b/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-bin.yaml
deleted file mode 100644
index 7db6b747..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-bin.yaml
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-bin
- namespace : {{ .Release.Namespace }}
-data:
- carbon.sh: |-
- #!/bin/sh
- # ---------------------------------------------------------------------------
- # Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- # ----------------------------------------------------------------------------
- # Main Script for the WSO2 Carbon Server
- #
- # Environment Variable Prequisites
- #
- # CARBON_HOME Home of WSO2 Carbon installation. If not set I will try
- # to figure it out.
- # RUNTIME_HOME Home of WSO2 Carbon Runtime. .
- #
- # JAVA_HOME Must point at your Java Development Kit installation.
- #
- # JAVA_OPTS (Optional) Java runtime options used when the commands
- # is executed.
- #
- # NOTE: Borrowed generously from Apache Tomcat startup scripts.
- # -----------------------------------------------------------------------------
-
- # OS specific support. $var _must_ be set to either true or false.
- #ulimit -n 100000
-
- cygwin=false;
- darwin=false;
- os400=false;
- mingw=false;
- case "`uname`" in
- CYGWIN*) cygwin=true;;
- MINGW*) mingw=true;;
- OS400*) os400=true;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
- esac
-
- # resolve links - $0 may be a softlink
- PRG="$0"
-
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
-
- # Get standard environment variables
- TEMPCURDIR=`dirname "$PRG"`
-
- # Only set RUNTIME_HOME if not already set
- [ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$TEMPCURDIR/.." ; pwd`
-
- # Only set CARBON_HOME if not already set
- [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$TEMPCURDIR/../../../" ; pwd`
-
- # Only set RUNTIME if not already set
- [ -z "$RUNTIME" ] && RUNTIME=${RUNTIME_HOME##*/}
-
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
- [ -n "$RUNTIME_HOME" ] && RUNTIME_HOME=`cygpath --unix "$RUNTIME_HOME"`
- fi
-
- # For OS400
- if $os400; then
- # Set job priority to standard for interactive (interactive - 6) by using
- # the interactive priority - 6, the helper threads that respond to requests
- # will be running at the same priority as interactive jobs.
- COMMAND='chgjob job('$JOBNAME') runpty(6)'
- system $COMMAND
-
- # Enable multi threading
- QIBM_MULTI_THREADED=Y
- export QIBM_MULTI_THREADED
- fi
-
- # For Migwn, ensure paths are in UNIX format before anything is touched
- if $mingw ; then
- [ -n "$CARBON_HOME" ] &&
- CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
- fi
-
- if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=java
- fi
- fi
-
- if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " CARBON cannot execute $JAVACMD"
- exit 1
- fi
-
- # if JAVA_HOME is not set we're not happy
- if [ -z "$JAVA_HOME" ]; then
- echo "You must set the JAVA_HOME variable before running CARBON."
- exit 1
- fi
-
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- PID=`cat "$RUNTIME_HOME"/runtime.pid`
- fi
-
- # ----- Process the input command ----------------------------------------------
- args=""
- for c in $*
- do
- if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
- CMD="--debug"
- continue
- elif [ "$CMD" = "--debug" ]; then
- if [ -z "$PORT" ]; then
- PORT=$c
- fi
- elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
- CMD="stop"
- elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
- CMD="start"
- elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
- CMD="version"
- elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
- CMD="restart"
- elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
- CMD="test"
- else
- args="$args $c"
- fi
- done
-
- if [ "$CMD" = "--debug" ]; then
- if [ "$PORT" = "" ]; then
- echo " Please specify the debug port after the --debug option"
- exit 1
- fi
- if [ -n "$JAVA_OPTS" ]; then
- echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
- fi
- CMD="RUN"
- JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
- echo "Please start the remote debugging client to continue..."
- elif [ "$CMD" = "start" ]; then
- if [ -e "$RUNTIME_HOME/runtime.pid" ]; then
- if ps -p $PID > /dev/null ; then
- echo "Process is already running"
- exit 0
- fi
- fi
- export CARBON_HOME=$CARBON_HOME
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "stop" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- exit 0
- elif [ "$CMD" = "restart" ]; then
- export CARBON_HOME=$CARBON_HOME
- kill -term `cat $RUNTIME_HOME/runtime.pid`
- process_status=0
- pid=`cat $RUNTIME_HOME/runtime.pid`
- while [ "$process_status" -eq "0" ]
- do
- sleep 1;
- ps -p$pid 2>&1 > /dev/null
- process_status=$?
- done
-
- # using nohup bash to avoid erros in solaris OS.TODO
- nohup bash $RUNTIME_HOME/bin/carbon.sh $args > /dev/null 2>&1 &
- exit 0
- elif [ "$CMD" = "test" ]; then
- JAVACMD="exec "$JAVACMD""
- elif [ "$CMD" = "version" ]; then
- cat $CARBON_HOME/bin/kernel-version.txt
- exit 0
- fi
-
- # ---------- Handle the SSL Issue with proper JDK version --------------------
- java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}')
- java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}')
- if [ $java_version_formatted -lt 0108 ] || [ $java_version_formatted -gt 1100 ]; then
- echo " Starting WSO2 Carbon (in unsupported JDK)"
- echo " [ERROR] CARBON is supported only on JDK 1.8 and 11"
- fi
-
- CARBON_XBOOTCLASSPATH=""
- for f in "$CARBON_HOME"/bin/bootstrap/xboot/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/xboot/*.jar" ];then
- CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
- fi
- done
-
- JAVA_ENDORSED_DIRS="$CARBON_HOME/bin/bootstrap/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
-
- CARBON_CLASSPATH=""
- if [ -e "$JAVA_HOME/bin/bootstrap/tools.jar" ]; then
- CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
- fi
- for f in "$CARBON_HOME"/bin/bootstrap/*.jar
- do
- if [ "$f" != "$CARBON_HOME/bin/bootstrap/*.jar" ];then
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
- fi
- done
- for t in "$CARBON_HOME"/bin/bootstrap/commons-lang*.jar
- do
- CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
- done
- # For Cygwin, switch paths to Windows format before running java
- if $cygwin; then
- JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
- CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
- RUNTIME_HOME=`cygpath --absolute --windows "$RUNTIME_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
- fi
- CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
- CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
- fi
-
- # ----- Execute The Requested Command -----------------------------------------
-
- echo JAVA_HOME environment variable is set to $JAVA_HOME
- echo CARBON_HOME environment variable is set to $CARBON_HOME
- echo RUNTIME_HOME environment variable is set to $RUNTIME_HOME
-
- cd "$RUNTIME_HOME"
-
- START_EXIT_STATUS=121
- status=$START_EXIT_STATUS
-
- #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
- # -Djava.rmi.server.hostname="your.IP.goes.here"
-
- JAVA_VER_BASED_OPTS=""
- if [ $java_version_formatted -le 0108 ]; then
- JAVA_VER_BASED_OPTS="-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS"
- fi
-
- if [ $java_version_formatted -ge 1100 ] ; then
- JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
- fi
-
- while [ "$status" = "$START_EXIT_STATUS" ]
- do
- $JAVACMD \
- -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
- -Xms{{ .Values.wso2.deployment.analytics.worker.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.analytics.worker.resources.jvm.heap.memory.xmx }} \
- -XX:+HeapDumpOnOutOfMemoryError \
- -XX:HeapDumpPath="$RUNTIME_HOME/logs/heap-dump.hprof" \
- $JAVA_OPTS \
- -classpath "$CARBON_CLASSPATH" \
- $JAVA_VER_BASED_OPTS \
- -Djava.io.tmpdir="$CARBON_HOME/tmp" \
- -Dcarbon.registry.root=/ \
- -Djava.command="$JAVACMD" \
- -Dcarbon.home="$CARBON_HOME" \
- -Dwso2.runtime.path="$RUNTIME_HOME" \
- -Dwso2.runtime="$RUNTIME" \
- -Djavax.xml.bind.JAXBContextFactory="com.sun.xml.bind.v2.ContextFactory" \
- -Djava.util.logging.config.file="$RUNTIME_HOME/bin/bootstrap/logging.properties" \
- -Djava.security.egd=file:/dev/./urandom \
- -Dfile.encoding=UTF8 \
- -Djavax.net.ssl.keyStore="$CARBON_HOME/resources/security/wso2carbon.jks" \
- -Djavax.net.ssl.keyStorePassword="wso2carbon" \
- -Djavax.net.ssl.trustStore="$CARBON_HOME/resources/security/client-truststore.jks" \
- -Djavax.net.ssl.trustStorePassword="wso2carbon" \
- -Dio.netty.tryReflectionSetAccessible=false \
- org.wso2.carbon.launcher.Main $*
- status=$?
- done
diff --git a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-conf.yaml b/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-conf.yaml
deleted file mode 100644
index 47af4bc2..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-conf.yaml
+++ /dev/null
@@ -1,583 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-conf
- namespace : {{ .Release.Namespace }}
- {{ if .Values.wso2.deployment.analytics.worker.config }}
-data:
- {{- range $index, $content := .Values.wso2.deployment.analytics.worker.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{ else }}
-data:
- deployment.yaml: |-
- ################################################################################
- # Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved
- #
- # Licensed under the Apache License, Version 2.0 (the \"License\");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an \"AS IS\" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ################################################################################
-
- # Carbon Configuration Parameters
- wso2.carbon:
- type: wso2-apim-analytics
- # value to uniquely identify a server
- id: ${NODE_ID}
- # server name
- name: WSO2 API Manager Analytics Server
- # ports used by this server
- ports:
- # port offset
- offset: 1
-
- wso2.transport.http:
- transportProperties:
- -
- name: "server.bootstrap.socket.timeout"
- value: 60
- -
- name: "client.bootstrap.socket.timeout"
- value: 60
- -
- name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- -
- id: "default"
- host: "0.0.0.0"
- port: 9090
- -
- id: "msf4j-https"
- host: "0.0.0.0"
- port: 9443
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- senderConfigurations:
- -
- id: "http-sender"
-
- siddhi.stores.query.api:
- transportProperties:
- -
- name: "server.bootstrap.socket.timeout"
- value: 60
- -
- name: "client.bootstrap.socket.timeout"
- value: 60
- -
- name: "latency.metrics.enabled"
- value: true
-
- listenerConfigurations:
- -
- id: "default"
- host: "0.0.0.0"
- port: 7071
- -
- id: "msf4j-https"
- host: "0.0.0.0"
- port: 7444
- scheme: https
- keyStoreFile: "${carbon.home}/resources/security/wso2carbon.jks"
- keyStorePassword: wso2carbon
- certPass: wso2carbon
-
- # Configuration used for the databridge communication
- databridge.config:
- # No of worker threads to consume events
- # THIS IS A MANDATORY FIELD
- workerThreads: 10
- # Maximum amount of messages that can be queued internally in MB
- # THIS IS A MANDATORY FIELD
- maxEventBufferCapacity: 10000000
- # Queue size; the maximum number of events that can be stored in the queue
- # THIS IS A MANDATORY FIELD
- eventBufferSize: 2000
- # Keystore file path
- # THIS IS A MANDATORY FIELD
- keyStoreLocation : ${sys:carbon.home}/resources/security/wso2carbon.jks
- # Keystore password
- # THIS IS A MANDATORY FIELD
- keyStorePassword : wso2carbon
- # Session Timeout value in mins
- # THIS IS A MANDATORY FIELD
- clientTimeoutMin: 30
- # Data receiver configurations
- # THIS IS A MANDATORY FIELD
- dataReceivers:
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Thrift
- # Data receiver properties
- properties:
- tcpPort: '7611'
- sslPort: '7711'
-
- -
- # Data receiver configuration
- dataReceiver:
- # Data receiver type
- # THIS IS A MANDATORY FIELD
- type: Binary
- # Data receiver properties
- properties:
- tcpPort: '9611'
- sslPort: '9711'
- tcpReceiverThreadPoolSize: '100'
- sslReceiverThreadPoolSize: '100'
- hostName: 0.0.0.0
-
- # Configuration of the Data Agents - to publish events through databridge
- data.agent.config:
- # Data agent configurations
- # THIS IS A MANDATORY FIELD
- agents:
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Thrift
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- -
- # Data agent configuration
- agentConfiguration:
- # Data agent name
- # THIS IS A MANDATORY FIELD
- name: Binary
- # Data endpoint class
- # THIS IS A MANDATORY FIELD
- dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint
- # Data publisher strategy
- publishingStrategy: async
- # Trust store path
- trustStorePath: '${sys:carbon.home}/resources/security/client-truststore.jks'
- # Trust store password
- trustStorePassword: 'wso2carbon'
- # Queue Size
- queueSize: 32768
- # Batch Size
- batchSize: 200
- # Core pool size
- corePoolSize: 1
- # Socket timeout in milliseconds
- socketTimeoutMS: 30000
- # Maximum pool size
- maxPoolSize: 1
- # Keep alive time in pool
- keepAliveTimeInPool: 20
- # Reconnection interval
- reconnectionInterval: 30
- # Max transport pool size
- maxTransportPoolSize: 250
- # Max idle connections
- maxIdleConnections: 250
- # Eviction time interval
- evictionTimePeriod: 5500
- # Min idle time in pool
- minIdleTimeInPool: 5000
- # Secure max transport pool size
- secureMaxTransportPoolSize: 250
- # Secure max idle connections
- secureMaxIdleConnections: 250
- # secure eviction time period
- secureEvictionTimePeriod: 5500
- # Secure min idle time in pool
- secureMinIdleTimeInPool: 5000
- # SSL enabled protocols
- sslEnabledProtocols: TLSv1.1,TLSv1.2
- # Ciphers
- ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
-
- # This is the main configuration for metrics
- wso2.metrics:
- # Enable Metrics
- enabled: false
- reporting:
- console:
- - # The name for the Console Reporter
- name: Console
-
- # Enable Console Reporter
- enabled: false
-
- # Polling Period in seconds.
- # This is the period for polling metrics from the metric registry and printing in the console
- pollingPeriod: 5
-
- wso2.metrics.jdbc:
- # Data Source Configurations for JDBC Reporters
- dataSource:
- # Default Data Source Configuration
- - &JDBC01
- # JNDI name of the data source to be used by the JDBC Reporter.
- # This data source should be defined in a *-datasources.xml file in conf/datasources directory.
- dataSourceName: java:comp/env/jdbc/WSO2MetricsDB
- # Schedule regular deletion of metrics data older than a set number of days.
- # It is recommended that you enable this job to ensure your metrics tables do not get extremely large.
- # Deleting data older than seven days should be sufficient.
- scheduledCleanup:
- # Enable scheduled cleanup to delete Metrics data in the database.
- enabled: true
-
- # The scheduled job will cleanup all data older than the specified days
- daysToKeep: 3
-
- # This is the period for each cleanup operation in seconds.
- scheduledCleanupPeriod: 86400
-
- # The JDBC Reporter is in the Metrics JDBC Core feature
- reporting:
- # The JDBC Reporter configurations will be ignored if the Metrics JDBC Core feature is not available in runtime
- jdbc:
- - # The name for the JDBC Reporter
- name: JDBC
-
- # Enable JDBC Reporter
- enabled: true
-
- # Source of Metrics, which will be used to identify each metric in database -->
- # Commented to use the hostname by default
- # source: Carbon
-
- # Alias referring to the Data Source configuration
- dataSource: *JDBC01
-
- # Polling Period in seconds.
- # This is the period for polling metrics from the metric registry and updating the database with the values
- pollingPeriod: 60
-
- # Deployment configuration parameters
- wso2.artifact.deployment:
- # Scheduler update interval
- updateInterval: 5
-
- # Periodic Persistence Configuration
- state.persistence:
- enabled: true
- intervalInMin: 1
- revisionsToKeep: 2
- persistenceStore: org.wso2.carbon.streaming.integrator.core.persistence.DBPersistenceStore
- config:
- datasource: PERSISTENCE_DB # A datasource with this name should be defined in wso2.datasources namespace
- table: PERSISTENCE_TABLE
-
- # Secure Vault Configuration
- wso2.securevault:
- secretRepository:
- type: org.wso2.carbon.secvault.repository.DefaultSecretRepository
- parameters:
- privateKeyAlias: wso2carbon
- keystoreLocation: ${sys:carbon.home}/resources/security/securevault.jks
- secretPropertiesFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/secrets.properties
- masterKeyReader:
- type: org.wso2.carbon.secvault.reader.DefaultMasterKeyReader
- parameters:
- masterKeyReaderFile: ${sys:carbon.home}/conf/${sys:wso2.runtime}/master-keys.yaml
-
- # Datasource Configurations
- wso2.datasources:
- dataSources:
- # carbon metrics data source
- - name: WSO2_METRICS_DB
- description: The datasource used for dashboard feature
- jndiConfig:
- name: jdbc/WSO2MetricsDB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/dashboard/database/metrics;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 30
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: WSO2_PERMISSIONS_DB
- description: The datasource used for permission feature
- jndiConfig:
- name: jdbc/PERMISSION_DB
- useJndiReference: true
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_PERMISSIONS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 10
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: GEO_LOCATION_DATA
- description: "The data source used for geo location database"
- jndiConfig:
- name: jdbc/GEO_LOCATION_DATA
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:h2:${sys:carbon.home}/wso2/worker/database/GEO_LOCATION_DATA;AUTO_SERVER=TRUE'
- username: wso2carbon
- password: wso2carbon
- driverClassName: org.h2.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- validationTimeout: 30000
- isAutoCommit: false
-
- - name: APIM_ANALYTICS_DB
- description: "The datasource used for APIM statistics aggregated data."
- jndiConfig:
- name: jdbc/APIM_ANALYTICS_DB
- definition:
- type: RDBMS
- configuration:
- jdbcUrl: 'jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_STATS_DB?useSSL=false'
- username: wso2carbon
- password: wso2carbon
- driverClassName: com.mysql.cj.jdbc.Driver
- maxPoolSize: 50
- idleTimeout: 60000
- connectionTestQuery: SELECT 1
- validationTimeout: 30000
- isAutoCommit: false
-
- -
- name: WSO2_CLUSTER_DB
- description: "The datasource used by cluster coordinators in HA deployment"
- jndiConfig:
- name: jdbc/WSO2_CLUSTER_DB
- definition:
- type: RDBMS
- configuration:
- connectionTestQuery: "SELECT 1"
- driverClassName: com.mysql.cj.jdbc.Driver
- idleTimeout: 60000
- isAutoCommit: false
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2_CLUSTER_DB?useSSL=false"
- maxPoolSize: 50
- password: wso2carbon
- username: wso2carbon
- validationTimeout: 30000
-
- -
- name: PERSISTENCE_DB
- description: "Datasource used for persistence"
- jndiConfig:
- name: jdbc/PERSISTENCE_DB
- definition:
- type: RDBMS
- configuration:
- connectionTestQuery: "SELECT 1"
- driverClassName: com.mysql.cj.jdbc.Driver
- idleTimeout: 60000
- isAutoCommit: false
- jdbcUrl: "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2_PERSISTENCE_DB?useSSL=false"
- maxPoolSize: 50
- password: wso2carbon
- username: wso2carbon
- validationTimeout: 30000
-
- siddhi:
- # properties:
- # partitionById: true
- # shardId: 1
- refs:
- - ref:
- name: 'grpcSource'
- type: 'grpc'
- properties:
- receiver.url : grpc://localhost:9806/org.wso2.analytics.mgw.grpc.service.AnalyticsSendService/sendAnalytics
- extensions:
- -
- extension:
- name: 'findCountryFromIP'
- namespace: 'geo'
- properties:
- geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver
- isCacheEnabled: true
- cacheSize: 10000
- isPersistInDatabase: true
- datasource: GEO_LOCATION_DATA
- -
- extension:
- name: 'findCityFromIP'
- namespace: 'geo'
- properties:
- geoLocationResolverClass: org.wso2.extension.siddhi.execution.geo.internal.impl.DefaultDBBasedGeoLocationResolver
- isCacheEnabled: true
- cacheSize: 10000
- isPersistInDatabase: true
- datasource: GEO_LOCATION_DATA
- #Enabling GRPC Service with an Extension
- -
- extension:
- name: 'grpc'
- namespace: 'source'
- properties:
- keyStoreFile : ${sys:carbon.home}/resources/security/wso2carbon.jks
- keyStorePassword : wso2carbon
- keyStoreAlgorithm : SunX509
- trustStoreFile : ${sys:carbon.home}/resources/security/client-truststore.jks
- trustStorePassword : wso2carbon
- trustStoreAlgorithm : SunX509
- # Provides the regular expression collection to parse the user-agent header
- -
- extension:
- name: 'getUserAgentProperty'
- namespace: 'env'
- properties:
- regexFilePath : ${sys:carbon.home}/conf/worker/regexes.yaml
-
- # Cluster Configuration
- cluster.config:
- enabled: true
- groupId: sp
- coordinationStrategyClass: org.wso2.carbon.cluster.coordinator.rdbms.RDBMSCoordinationStrategy
- strategyConfig:
- datasource: WSO2_CLUSTER_DB
- heartbeatInterval: 5000
- heartbeatMaxRetry: 5
- eventPollingInterval: 5000
-
- # Authentication configuration
- auth.configs:
- type: 'local' # Type of the IdP client used
- userManager:
- adminRole: admin # Admin role which is granted all permissions
- userStore: # User store
- users:
- -
- user:
- username: admin
- password: YWRtaW4=
- roles: 1
- roles:
- -
- role:
- id: 1
- displayName: admin
-
- # Configuration to enable apim alerts
- #analytics.solutions:
- # APIM-alerts.enabled: true
-
- # Sample of deployment.config for Two node HA
- deployment.config:
- type: ha
- passiveNodeDetailsWaitTimeOutMillis: 300000
- passiveNodeDetailsRetrySleepTimeMillis: 500
- eventByteBufferQueueCapacity: 20000
- byteBufferExtractorThreadPoolSize: 5
- eventSyncServer:
- host: ${NODE_IP}
- port: 9893
- advertisedHost: ${NODE_IP}
- advertisedPort: 9893
- bossThreads: 10
- workerThreads: 10
- eventSyncClientPool:
- maxActive: 10
- maxTotal: 10
- maxIdle: 10
- maxWait: 60000
- minEvictableIdleTimeMillis: 120000
-
- # Sample of deployment.config for Distributed deployment
- #deployment.config:
- # type: distributed
- # httpsInterface:
- # host: 192.168.1.3
- # port: 9443
- # username: admin
- # password: admin
- # leaderRetryInterval: 10000
- # resourceManagers:
- # - host: 192.168.1.1
- # port: 9543
- # username: admin
- # password: admin
- # - host: 192.168.1.2
- # port: 9543
- # username: admin
- # password: admin
- {{- end }}
diff --git a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-headless-service.yaml b/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-headless-service.yaml
deleted file mode 100644
index 25bbf785..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-headless-service.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- clusterIP: None
- selector:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-analytics-worker
- ports:
- # ports that this service should serve on
- - name: 'thrift'
- port: 7612
- protocol: TCP
- - name: 'thrift-ssl'
- port: 7712
- protocol: TCP
diff --git a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-service.yaml b/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-service.yaml
deleted file mode 100644
index 0f9bc1b1..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-service.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-analytics-worker
- ports:
- # ports that this service should serve on
- - name: 'thrift-ssl'
- port: 7712
- protocol: TCP
- - name: 'rest-api-port-1'
- protocol: TCP
- port: 7444
diff --git a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-statefulset.yaml b/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-statefulset.yaml
deleted file mode 100644
index 12e66bea..00000000
--- a/advanced/am-pattern-2/templates/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-statefulset.yaml
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-statefulset
- namespace: {{ .Release.Namespace }}
-spec:
- replicas: 2
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-analytics-worker
- serviceName: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service
- template:
- metadata:
- annotations:
- checksum.am.analytics.worker.conf: {{ include (print $.Template.BasePath "/am-analytics/worker/wso2am-pattern-2-am-analytics-worker-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-analytics-worker
- spec:
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- initContainers:
- - name: init-mysql-db
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of MySQL Server deployment"; while ! nc -z "wso2am-mysql-db-service" 3306; do sleep 1; printf "-"; done; echo -e " >> MySQL Server has started";']
- - name: init-mysql-connector-download
- image: busybox:1.32
- command:
- - /bin/sh
- - "-c"
- - |
- set -e
- connector_version=8.0.17
- wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/${connector_version}/mysql-connector-java-${connector_version}.jar -P /mysql-connector-jar/
- volumeMounts:
- - name: mysql-connector-jar
- mountPath: /mysql-connector-jar
- {{ end }}
- containers:
- - name: wso2am-analytics-worker
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.analytics.worker) | indent 10 }}
- imagePullPolicy: {{ .Values.wso2.deployment.analytics.worker.imagePullPolicy }}
- env:
- - name: NODE_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- - name: NODE_ID
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9444
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.worker.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.worker.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9444
- initialDelaySeconds: {{ .Values.wso2.deployment.analytics.worker.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.analytics.worker.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/worker.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.analytics.worker.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.worker.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.analytics.worker.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.analytics.worker.resources.limits.cpu }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 7612
- protocol: "TCP"
- - containerPort: 7712
- protocol: "TCP"
- - containerPort: 7444
- protocol: "TCP"
- volumeMounts:
- - name: wso2am-analytics-worker-conf
- mountPath: /home/wso2carbon/wso2-config-volume/conf/worker/deployment.yaml
- subPath: deployment.yaml
- - name: wso2am-analytics-worker-bin
- mountPath: /home/wso2carbon/wso2-config-volume/wso2/worker/bin/carbon.sh
- subPath: carbon.sh
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- mountPath: /home/wso2carbon/wso2-artifact-volume/lib
- {{ end }}
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if .Values.wso2.deployment.am.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds
- {{- end }}
- volumes:
- - name: wso2am-analytics-worker-conf
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-conf
- - name: wso2am-analytics-worker-bin
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-bin
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- emptyDir: {}
- {{ end }}
diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-conf.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-conf.yaml
deleted file mode 100644
index 717c419f..00000000
--- a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-conf.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-conf
- namespace : {{ .Release.Namespace }}
- {{ if .Values.wso2.deployment.am.gateway.config }}
-data:
- {{- range $index, $content := .Values.wso2.deployment.am.gateway.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{ else }}
-data:
- deployment.toml: |-
- [server]
- hostname = "{{ .Values.wso2.deployment.am.gateway.ingress.hostname }}"
- node_ip = "$env{NODE_IP}"
- server_role = "gateway-worker"
-
- [user_store]
- type = "database_unique_id"
-
- [super_admin]
- username = "admin"
- password = "admin"
- create_admin_account = true
-
- [database.shared_db]
- type = "h2"
- url = "jdbc:h2:./repository/database/WSO2SHARED_DB;DB_CLOSE_ON_EXIT=FALSE"
- username = "wso2carbon"
- password = "wso2carbon"
-
- [keystore.tls]
- file_name = "wso2carbon.jks"
- type = "JKS"
- password = "wso2carbon"
- alias = "wso2carbon"
- key_password = "wso2carbon"
-
- [truststore]
- file_name = "client-truststore.jks"
- type = "JKS"
- password = "wso2carbon"
-
- # key manager implementation
- [apim.key_manager]
- service_url = "https://{{ template "am-pattern-2.resource.prefix" . }}-km-service:${mgt.transport.https.port}/services/"
- username= "$ref{super_admin.username}"
- password= "$ref{super_admin.password}"
-
- # JWT Generation
- [apim.jwt]
- enable = true
- encoding = "base64" # base64,base64url
- #generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator"
- claim_dialect = "http://wso2.org/claims"
- header = "X-JWT-Assertion"
- signing_algorithm = "SHA256withRSA"
- #enable_user_claims = true
- #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.DefaultClaimsRetriever"
-
- # Traffic Manager configurations
- [apim.throttling]
- username= "$ref{super_admin.username}"
- password= "$ref{super_admin.password}"
- service_url = "https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:${mgt.transport.https.port}/services/"
- throttle_decision_endpoints = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:5672","tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:5672"]
- enable_unlimited_tier = true
- enable_header_based_throttling = false
- enable_jwt_claim_based_throttling = false
- enable_query_param_based_throttling = false
-
- [[apim.throttling.url_group]]
- traffic_manager_urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9611"]
- traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9711"]
- type = "loadbalance"
-
- [[apim.throttling.url_group]]
- traffic_manager_urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9611"]
- traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9711"]
- type = "loadbalance"
-
- [apim.analytics]
- enable = "true"
- username= "$ref{super_admin.username}"
- password= "$ref{super_admin.password}"
- store_api_url = "https://{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-service:7444"
-
- [[apim.analytics.url_group]]
- analytics_url =["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service:7612"]
- analytics_auth_url =["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-headless-service:7712"]
- type = "failover"
-
- # Caches
- [apim.cache.gateway_token]
- enable = true
- expiry_time = 15
-
- [apim.cache.resource]
- enable = true
-
- [apim.cache.jwt_claim]
- enable = true
- expiry_time = 900
-
- [apim.oauth_config]
- remove_outbound_auth_header = true
- auth_header = "Authorization"
-
- [apim.cors]
- allow_origins = "*"
- allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
- allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction"]
- allow_credentials = false
-
- [transport.https.properties]
- proxyPort = 443
-
- [transport.passthru_https.sender.parameters]
- HostnameVerifier = "AllowAll"
-
- [apim.event_hub]
- service_url = "https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443"
- event_listening_endpoints = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:5672","tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:5672"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9711"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9711"]
- {{- end }}
diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml
deleted file mode 100644
index a206a02d..00000000
--- a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-deployment
- namespace: {{ .Release.Namespace }}
-spec:
- replicas: {{ .Values.wso2.deployment.am.gateway.replicas }}
- strategy:
- rollingUpdate:
- maxSurge: {{ .Values.wso2.deployment.am.gateway.strategy.rollingUpdate.maxSurge }}
- maxUnavailable: {{ .Values.wso2.deployment.am.gateway.strategy.rollingUpdate.maxUnavailable }}
- type: RollingUpdate
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway
- template:
- metadata:
- annotations:
- checksum.am.km.conf: {{ include (print $.Template.BasePath "/am/gateway/wso2am-pattern-2-am-gateway-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway
- spec:
- initContainers:
- - name: init-apim-analytics
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";']
- - name: init-km
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of Key Manager deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-km-service 9443; do sleep 1; printf "-"; done; echo -e " >> Key Manager has started";']
- - name: init-apim-1
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager instance one deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-1-service 9611; do sleep 1; printf "-"; done; echo -e " >> API Manager instance one has started";']
- - name: init-apim-2
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager instance two deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-2-service 9611; do sleep 1; printf "-"; done; echo -e " >> API Manager instance two has started";']
- containers:
- - name: wso2am-gateway
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.am) | indent 8 }}
- env:
- - name: PROFILE_NAME
- value: gateway-worker
- - name: NODE_IP
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: status.podIP
- - name: JVM_MEM_OPTS
- value: "-Xms{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xmx }}"
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 8243
- initialDelaySeconds: {{ .Values.wso2.deployment.am.gateway.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.am.gateway.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 8243
- initialDelaySeconds: {{ .Values.wso2.deployment.am.gateway.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.am.gateway.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.am.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.am.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.am.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.am.resources.limits.cpu }}
- imagePullPolicy: {{ .Values.wso2.deployment.am.imagePullPolicy }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 8280
- protocol: TCP
- - containerPort: 8243
- protocol: TCP
- - containerPort: 9763
- protocol: TCP
- - containerPort: 9443
- protocol: TCP
- volumeMounts:
- - name: wso2am-gateway-storage-volume
- mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/synapse-configs
- - name: wso2am-gateway-conf
- mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/deployment.toml
- subPath: deployment.toml
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if .Values.wso2.deployment.am.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds
- {{ end }}
- volumes:
- - name: wso2am-gateway-storage-volume
- persistentVolumeClaim:
- claimName: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim
- - name: wso2am-gateway-conf
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-conf
diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-service.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-service.yaml
deleted file mode 100644
index 4b39c96e..00000000
--- a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-service.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway
- ports:
- # ports that this service should serve on
- -
- name: pass-through-http
- protocol: TCP
- port: 8280
- -
- name: pass-through-https
- protocol: TCP
- port: 8243
- -
- name: servlet-http
- protocol: TCP
- port: 9763
- -
- name: servlet-https
- protocol: TCP
- port: 9443
diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml
deleted file mode 100644
index 4bdec299..00000000
--- a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.synapseConfigs }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
diff --git a/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-conf.yaml b/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-conf.yaml
deleted file mode 100644
index 4f13e8cf..00000000
--- a/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-conf.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-km-conf
- namespace : {{ .Release.Namespace }}
- {{ if .Values.wso2.deployment.am.km.config }}
-data:
- {{- range $index, $content := .Values.wso2.deployment.am.km.config }}
- {{ $index }}: |-
- {{ tpl $content $ | indent 4 }}
- {{- end }}
-
- {{ else }}
-data:
- deployment.toml: |-
- [server]
- hostname = "{{ template "am-pattern-2.resource.prefix" . }}-km"
- node_ip = "$env{NODE_IP}"
- server_role = "api-key-manager"
-
- [user_store]
- type = "database_unique_id"
-
- [super_admin]
- username = "admin"
- password = "admin"
- create_admin_account = true
-
- [database.apim_db]
- type = "mysql"
- url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false"
- username = "wso2carbon"
- password = "wso2carbon"
- driver = "com.mysql.cj.jdbc.Driver"
-
- [database.shared_db]
- type = "mysql"
- url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_SHARED_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false"
- username = "wso2carbon"
- password = "wso2carbon"
- driver = "com.mysql.cj.jdbc.Driver"
-
- [keystore.tls]
- file_name = "wso2carbon.jks"
- type = "JKS"
- password = "wso2carbon"
- alias = "wso2carbon"
- key_password = "wso2carbon"
-
- [truststore]
- file_name = "client-truststore.jks"
- type = "JKS"
- password = "wso2carbon"
-
- [[event_handler]]
- name="userPostSelfRegistration"
- subscriptions=["POST_ADD_USER"]
-
- [[event_listener]]
- id = "token_revocation"
- type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler"
- name = "org.wso2.is.notification.ApimOauthEventInterceptor"
- order = 1
- [event_listener.properties]
- notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify"
- username = "${admin.username}"
- password = "${admin.password}"
- 'header.X-WSO2-KEY-MANAGER' = "default"
-
- [apim.throttling]
- username= "$ref{super_admin.username}"
- password= "$ref{super_admin.password}"
- throttle_decision_endpoints = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:5672","tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:5672"]
-
- [[apim.throttling.url_group]]
- traffic_manager_urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9611"]
- traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9711"]
- type = "loadbalance"
-
- [[apim.throttling.url_group]]
- traffic_manager_urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9611"]
- traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9711"]
- type = "loadbalance"
-
- [apim.event_hub]
- service_url = "https://{{ template "am-pattern-2.resource.prefix" . }}-am-service:9443"
- event_listening_endpoints = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:5672","tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:5672"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-1-service:9711"]
-
- [[apim.event_hub.publish.url_group]]
- urls = ["tcp://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9611"]
- auth_urls = ["ssl://{{ template "am-pattern-2.resource.prefix" . }}-am-2-service:9711"]
- {{- end }}
diff --git a/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-statefulset.yaml b/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-statefulset.yaml
deleted file mode 100644
index 9f6bb26c..00000000
--- a/advanced/am-pattern-2/templates/am/km/wso2am-pattern-2-am-km-statefulset.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-km-statefulset
- namespace: {{ .Release.Namespace }}
-spec:
- selector:
- matchLabels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-km
- replicas: {{ .Values.wso2.deployment.am.km.replicas }}
- serviceName: {{ template "am-pattern-2.resource.prefix" . }}-km-service
- template:
- metadata:
- annotations:
- checksum.am.km.conf: {{ include (print $.Template.BasePath "/am/km/wso2am-pattern-2-am-km-conf.yaml") . | sha256sum }}
- labels:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-km
- spec:
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- initContainers:
- - name: init-mysql-db
- image: busybox:1.32
- command: ['sh', '-c', 'echo -e "Checking for the availability of DBMS service"; while ! nc -z "wso2am-mysql-db-service" 3306; do sleep 1; printf "-"; done; echo -e " >> MySQL Server has started";']
- - name: init-mysql-connector-download
- image: busybox:1.32
- command:
- - /bin/sh
- - "-c"
- - |
- set -e
- connector_version=8.0.17
- wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/${connector_version}/mysql-connector-java-${connector_version}.jar -P /mysql-connector-jar/
- volumeMounts:
- - name: mysql-connector-jar
- mountPath: /mysql-connector-jar
- {{- end }}
- containers:
- - name: wso2am-km
-{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.am) | indent 10 }}
- imagePullPolicy: {{ .Values.wso2.deployment.am.imagePullPolicy }}
- env:
- - name: PROFILE_NAME
- value: api-key-manager
- - name: NODE_IP
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: status.podIP
- - name: JVM_MEM_OPTS
- value: "-Xms{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xmx }}"
- livenessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9443
- initialDelaySeconds: {{ .Values.wso2.deployment.am.km.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.am.km.livenessProbe.periodSeconds }}
- readinessProbe:
- exec:
- command:
- - /bin/sh
- - -c
- - nc -z localhost 9443
- initialDelaySeconds: {{ .Values.wso2.deployment.am.km.readinessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.am.km.readinessProbe.periodSeconds }}
- lifecycle:
- preStop:
- exec:
- command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
- resources:
- requests:
- memory: {{ .Values.wso2.deployment.am.resources.requests.memory }}
- cpu: {{ .Values.wso2.deployment.am.resources.requests.cpu }}
- limits:
- memory: {{ .Values.wso2.deployment.am.resources.limits.memory }}
- cpu: {{ .Values.wso2.deployment.am.resources.limits.cpu }}
- securityContext:
- runAsUser: 802
- ports:
- - containerPort: 9763
- protocol: TCP
- - containerPort: 9443
- protocol: TCP
- volumeMounts:
- - name: wso2am-km-conf
- mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/deployment.toml
- subPath: deployment.toml
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- mountPath: /home/wso2carbon/wso2-artifact-volume/repository/components/dropins
- {{ end }}
- serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
- {{- if .Values.wso2.deployment.am.imagePullSecrets }}
- imagePullSecrets:
- - name: {{ .Values.wso2.deployment.am.imagePullSecrets }}
- {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
- imagePullSecrets:
- - name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds
- {{ end }}
- volumes:
- - name: wso2am-km-conf
- configMap:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-km-conf
- {{ if .Values.wso2.deployment.dependencies.mysql }}
- - name: mysql-connector-jar
- emptyDir: {}
- {{ end }}
diff --git a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-service.yaml b/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-service.yaml
deleted file mode 100644
index 624c1c8e..00000000
--- a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-service.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-service
- namespace : {{ .Release.Namespace }}
-spec:
- # label keys and values that must match in order to receive traffic for this service
- selector:
- deployment: {{ template "am-pattern-2.resource.prefix" . }}-am
- ports:
- # ports that this service should serve on
- - name: servlet-http
- protocol: TCP
- port: 9763
- - name: servlet-https
- protocol: TCP
- port: 9443
diff --git a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-volume-claims.yaml b/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-volume-claims.yaml
deleted file mode 100644
index bf4a05b8..00000000
--- a/advanced/am-pattern-2/templates/am/pub-devportal-tm/wso2am-pattern-2-am-volume-claims.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-shared-executionplans-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.executionPlans }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
- {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }}
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-1-local-carbon-database-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-1-solr-indexed-data-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-2-local-carbon-database-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-am-2-solr-indexed-data-volume-claim
- namespace : {{ .Release.Namespace }}
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData }}
- storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}
- {{ end }}
diff --git a/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml
new file mode 100644
index 00000000..e3c18adf
--- /dev/null
+++ b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml
@@ -0,0 +1,98 @@
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-deployment
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "am-pattern-2.labels" . | indent 4 }}
+spec:
+ replicas: {{ .Values.wso2.deployment.mi.replicas }}
+ strategy:
+ rollingUpdate:
+ maxSurge: {{ .Values.wso2.deployment.mi.strategy.rollingUpdate.maxSurge }}
+ maxUnavailable: {{ .Values.wso2.deployment.mi.strategy.rollingUpdate.maxUnavailable }}
+ type: RollingUpdate
+ selector:
+ matchLabels:
+ deployment: {{ template "am-pattern-2.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2
+ template:
+ metadata:
+ labels:
+ deployment: {{ template "am-pattern-2.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2
+ spec:
+ initContainers:
+ - name: init-am
+ image: busybox:1.32
+ command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager deployment"; while ! nc -z {{ template "am-pattern-1.resource.prefix" . }}-am-service 9443; do sleep 1; printf "-"; done; echo -e " >> API Manager has started";']
+ containers:
+ - name: wso2micro-integrator
+{{- include "image" (dict "Values" .Values "deployment" .Values.wso2.deployment.mi) | indent 10 }}
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ args:
+ - "-DsynapseTest=true"
+ {{- end }}
+ livenessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - nc -z localhost 8290
+ initialDelaySeconds: {{ .Values.wso2.deployment.mi.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.mi.livenessProbe.periodSeconds }}
+ readinessProbe:
+ httpGet:
+ path: /healthz
+ port: 9201
+ initialDelaySeconds: {{ .Values.wso2.deployment.mi.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.mi.readinessProbe.periodSeconds }}
+ resources:
+ requests:
+ memory: {{ .Values.wso2.deployment.mi.resources.requests.memory }}
+ cpu: {{ .Values.wso2.deployment.mi.resources.requests.cpu }}
+ limits:
+ memory: {{ .Values.wso2.deployment.mi.resources.limits.memory }}
+ cpu: {{ .Values.wso2.deployment.mi.resources.limits.cpu }}
+ imagePullPolicy: Always
+ securityContext:
+ runAsUser: 802
+ ports:
+ - containerPort: 8290
+ protocol: TCP
+ - containerPort: 9201
+ protocol: TCP
+ - containerPort: 9164
+ protocol: TCP
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ - containerPort: 9008
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.wso2.deployment.mi.envs }}
+ env:
+ {{- range $key, $val := .Values.wso2.deployment.mi.envs }}
+ - name: {{ $key }}
+ value: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
+ {{- if .Values.wso2.deployment.mi.imagePullSecrets }}
+ imagePullSecrets:
+ - name: {{ .Values.wso2.deployment.mi.imagePullSecrets }}
+ {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
+ imagePullSecrets:
+ - name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-wso2-private-registry-creds
+ {{ end }}
diff --git a/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-service.yaml b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-service.yaml
new file mode 100644
index 00000000..cad50efd
--- /dev/null
+++ b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-service.yaml
@@ -0,0 +1,50 @@
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-service
+ namespace : {{ .Release.Namespace }}
+ labels:
+ deployment: {{ template "am-pattern-2.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2
+{{ include "am-pattern-2.labels" . | indent 4 }}
+spec:
+ type: ClusterIP
+ ports:
+ - port: 8290
+ targetPort: 8290
+ protocol: TCP
+ name: pass-through-http
+ - port: 8253
+ targetPort: 8253
+ protocol: TCP
+ name: pass-through-https
+ - port: 9201
+ targetPort: 9201
+ protocol: TCP
+ name: metrics
+ - port: 9164
+ targetPort: 9164
+ protocol: TCP
+ name: management
+ {{- if .Values.wso2.deployment.mi.synapseTest.enabled }}
+ - port: 9008
+ targetPort: 9008
+ protocol: TCP
+ name: synapse-test
+ {{- end}}
+ selector:
+ deployment: {{ template "am-pattern-2.resource.prefix" . }}-mi
+ node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2
diff --git a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-ingress.yaml b/advanced/am-pattern-2/templates/mi/wso2am-pattern-2-mi-management-ingress.yaml
similarity index 54%
rename from advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-ingress.yaml
rename to advanced/am-pattern-2/templates/mi/wso2am-pattern-2-mi-management-ingress.yaml
index 4cfe2bc4..76ddefec 100644
--- a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-ingress.yaml
+++ b/advanced/am-pattern-2/templates/mi/wso2am-pattern-2-mi-management-ingress.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,21 +15,21 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: {{ template "am-pattern-3.resource.prefix" . }}-am-devportal-ingress
+ name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-management-ingress
namespace : {{ .Release.Namespace }}
-{{- if .Values.wso2.deployment.am.devportal.ingress.annotations }}
+{{- if .Values.wso2.deployment.mi.ingress.management.annotations }}
annotations:
-{{ toYaml .Values.wso2.deployment.am.devportal.ingress.annotations | indent 4 }}
+{{ toYaml .Values.wso2.deployment.mi.ingress.management.annotations | indent 4 }}
{{- end }}
spec:
tls:
- hosts:
- - {{ .Values.wso2.deployment.am.devportal.ingress.hostname }}
+ - {{ .Values.wso2.deployment.mi.ingress.management.hostname | quote }}
rules:
- - host: {{ .Values.wso2.deployment.am.devportal.ingress.hostname }}
+ - host: {{ .Values.wso2.deployment.mi.ingress.management.hostname | quote }}
http:
paths:
- - path: /
- backend:
- serviceName: {{ template "am-pattern-3.resource.prefix" . }}-am-devportal-service
- servicePort: 9443
+ - path: /
+ backend:
+ serviceName: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-service
+ servicePort: 9164
diff --git a/advanced/am-pattern-2/templates/wso2am-pattern-2-secrets.yaml b/advanced/am-pattern-2/templates/wso2am-pattern-2-secrets.yaml
index 1872c2df..0041fb41 100644
--- a/advanced/am-pattern-2/templates/wso2am-pattern-2-secrets.yaml
+++ b/advanced/am-pattern-2/templates/wso2am-pattern-2-secrets.yaml
@@ -1,4 +1,4 @@
-{{ if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }}
+{{ if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) (eq (default "docker.wso2.com" .Values.wso2.deployment.mi.dockerRegistry) "docker.wso2.com") }}
# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,13 +16,13 @@
{{- $username := .Values.wso2.subscription.username }}
{{- $password := .Values.wso2.subscription.password }}
{{- $email := .Values.wso2.subscription.username }}
-{{- $regId := default "docker.wso2.com" .Values.wso2.dockerRegistry }}
+{{- $regId := default "docker.wso2.com" .Values.wso2.deployment.mi.dockerRegistry }}
{{- $auth := printf "%s:%s" $username $password | b64enc }}
{{- $files := .Files }}
apiVersion: v1
kind: Secret
metadata:
- name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds
+ name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-wso2-private-registry-creds
namespace: {{ .Release.Namespace }}
type: kubernetes.io/dockerconfigjson
data:
diff --git a/advanced/am-pattern-2/values.yaml b/advanced/am-pattern-2/values.yaml
index 5f89ebb0..e13edd4a 100644
--- a/advanced/am-pattern-2/values.yaml
+++ b/advanced/am-pattern-2/values.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,168 +21,132 @@ wso2:
password: ""
deployment:
- dependencies:
- # The configuration should be set to be 'true' if a MySQL database should be spawned as a pod within the cluster
- mysql: true
- # Enable NFS dynamic provisioner for Kubernetes
- nfsServerProvisioner: true
-
- # Persisted and shared runtime artifacts for API Manager
- # See official documentation (from https://apim.docs.wso2.com/en/latest/install-and-setup/setup/reference/common-runtime-and-configuration-artifacts/#persistent-runtime-artifacts)
- persistentRuntimeArtifacts:
- # Kubernetes Storage Class to be used to dynamically provision the relevant Persistent Volumes
- # Only persistent storage solutions supporting ReadWriteMany access mode are applicable (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes)
- # Defaults to Kubernetes Storage Class generated using the NFS Server Provisioner (https://github.com/helm/charts/tree/master/stable/nfs-server-provisioner)
- storageClass: &storage_class "nfs"
-
- # Define capacities for persistent runtime artifact directories which are shared between instances of the relevant API Manager profile
- sharedArtifacts:
- capacity:
- # For execution plans shared between the Traffic Manager profile instances
- executionPlans: 20M
- # For synapse artifacts of APIs shared between the Gateway profile instances
- synapseConfigs: 50M
-
- # Persistent runtime artifacts for Apache Solr-based indexing
- apacheSolrIndexing:
- # Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled
- # By default, this is disabled
- enabled: false
- # Define capacities for persistent runtime artifact directories
- capacity:
- # For persisting the H2 based local Carbon database file
- carbonDatabase: 50M
- # For persisting the indexed data
- solrIndexedData: 50M
-
- am:
- # Container image configurations
- # If a custom image must be used, uncomment 'dockerRegistry' and provide its value
+ mi:
+ # If a custom image must be used, uncomment 'dockerRegistry' and provide its value.
# dockerRegistry: ""
- imageName: "wso2am"
- imageTag: "3.2.0"
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- imagePullPolicy: Always
-
+ imageName: "wso2mi"
+ imageTag: "4.0.0"
+ # Number of deployment replicas
+ replicas: 2
+ strategy:
+ rollingUpdate:
+ # The maximum number of pods that can be scheduled above the desired number of pods.
+ maxSurge: 1
+ # The maximum number of pods that can be unavailable during the update.
+ maxUnavailable: 0
+ # Indicates whether the container is running.
+ livenessProbe:
+ # Number of seconds after the container has started before liveness probes are initiated.
+ initialDelaySeconds: 35
+ # How often (in seconds) to perform the probe.
+ periodSeconds: 10
+ # Indicates whether the container is ready to service requests.
+ readinessProbe:
+ # Number of seconds after the container has started before readiness probes are initiated.
+ initialDelaySeconds: 35
+ # How often (in seconds) to perform the probe.
+ periodSeconds: 10
+ # These are the minimum resource recommendations for running WSO2 Micro Integrator
resources:
- # These are the resource recommendations for running WSO2 API Management product profiles with profile optimization
- # Resource configurations defined here are applicable for Gateway and Key Manager profile deployments, which use profile optimization
requests:
+ # The minimum amount of memory that should be allocated for a Pod
+ memory: "512Mi"
+ # The minimum amount of CPU that should be allocated for a Pod
+ cpu: "500m"
+ limits:
+ # The maximum amount of memory that should be allocated for a Pod
memory: "1Gi"
+ # The maximum amount of CPU that should be allocated for a Pod
cpu: "1000m"
- limits:
- memory: "2Gi"
- cpu: "2000m"
- # JVM settings
- # These are the resource allocation configurations associated with the JVM
- # Refer to the official documentation for advanced details (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/)
- jvm:
- # Resource allocation for the Java Heap
- heap:
- memory:
- # Initial and minimum Heap size
- xms: "512m"
- # Maximum Heap size
- xmx: "512m"
-
- # API Manager's Gateway specific configurations
- gateway:
- # Indicates whether the container is running
- livenessProbe:
- # Number of seconds after the container has started before liveness probes are initiated
- initialDelaySeconds: 60
- # How often (in seconds) to perform the probe
- periodSeconds: 10
- # Indicates whether the container is ready to service requests
- readinessProbe:
- # Number of seconds after the container has started before readiness probes are initiated
- initialDelaySeconds: 60
- # How often (in seconds) to perform the probe
- periodSeconds: 10
-
- # Number of deployment replicas
- replicas: 2
-
- # Kubernetes RollingUpdate strategy configurations
- strategy:
- rollingUpdate:
- # The maximum number of pods that can be scheduled above the desired number of pods
- maxSurge: 2
- # The maximum number of pods that can be unavailable during the update
- maxUnavailable: 0
-
- # If the deployment configurations for the Gateway profile of WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml),
- # add the customized configuration file under (wso2 -> deployment -> am -> gateway -> config -> deployment.toml)
-# config:
-# deployment.toml: |-
-# # deployment configurations for the Gateway profile of WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml)
+ # Environment variables for the Micro integrator deployment.
+ envs:
+ # ENV_NAME: ENV_VALUE
+ # Configure synapse testing.
+ synapseTest:
+ enabled: false
- # Configure Ingress
- ingress:
- # Hostname for Gateway profile
- hostname: "gateway.am.wso2.com"
- # Annotations for the API Manager Gateway service Ingress
+ # Configure Ingresses
+ ingress:
+ # Configure management ingress
+ management:
+ # Hostname for the Micro Integrator management endpoint.
+ hostname: "tenant2.management.mi.wso2.com"
+ # Annotations for the Micro Integrator management Ingress.
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
- # API Manager's Key Manager specific configurations
- km:
- livenessProbe:
- # Number of seconds after the container has started before liveness probes are initiated
- initialDelaySeconds: 60
- # How often (in seconds) to perform the probe
- periodSeconds: 10
- # Indicates whether the container is ready to service requests
- readinessProbe:
- # Number of seconds after the container has started before readiness probes are initiated
- initialDelaySeconds: 60
- # How often (in seconds) to perform the probe
- periodSeconds: 10
-
- # Number of deployment replicas
- replicas: 2
-
- # If the deployment configurations for the Key Manager profile of WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml),
- # add the customized configuration file under (wso2 -> deployment -> am -> km -> config -> deployment.toml)
-# config:
-# deployment.toml: |-
-# # deployment configurations for the Key Manager profile of WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml)
+kubernetes:
+ # Name of Kubernetes service account
+ serviceAccount: &service_account "wso2am-pattern-2-svc-account"
+
+am-pattern-1:
+ wso2:
+ # WSO2 Subscription parameters (https://wso2.com/subscription/)
+ # If provided, these parameters will be used to obtain official WSO2 product Docker images available at WSO2 Private Docker Registry (https://docker.wso2.com/)
+ # for this deployment
+ subscription:
+ username: ""
+ password: ""
+
+ # WSO2 Choreo Analytics Parameters
+ # If provided, these parameters will be used publish analytics data to Choreo Analytics environment (https://apim.docs.wso2.com/en/latest/observe/api-manager-analytics/configure-analytics/register-for-analytics/).
+ choreoAnalytics:
+ enabled: false
+ endpoint: ""
+ onpremKey: ""
+
+ deployment:
+ dependencies:
+ # The configuration should be set to be 'true' if a MySQL database should be spawned as a pod within the cluster
+ mysql: true
+ # Enable NFS dynamic provisioner for Kubernetes
+ nfsServerProvisioner: true
+
+ # Persisted and shared runtime artifacts for API Manager
+ # See official documentation (from https://apim.docs.wso2.com/en/latest/install-and-setup/setup/reference/common-runtime-and-configuration-artifacts/#persistent-runtime-artifacts)
+ persistentRuntimeArtifacts:
+ # Kubernetes Storage Class to be used to dynamically provision the relevant Persistent Volumes
+ # Only persistent storage solutions supporting ReadWriteMany access mode are applicable (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes)
+ # Defaults to Kubernetes Storage Class generated using the NFS Server Provisioner (https://github.com/helm/charts/tree/master/stable/nfs-server-provisioner)
+ storageClass: &storage_class "nfs"
+
+ # Persistent runtime artifacts for Apache Solr-based indexing
+ apacheSolrIndexing:
+ # Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled
+ # By default, this is disabled
+ enabled: false
+ # Define capacities for persistent runtime artifact directories
+ capacity:
+ # For persisting the H2 based local Carbon database file
+ carbonDatabase: 50M
+ # For persisting the indexed data
+ solrIndexedData: 50M
+
+ am:
+ # Container image configurations
+ # If a custom image must be used, uncomment 'dockerRegistry' and provide its value
+ # dockerRegistry: ""
+ imageName: "wso2am"
+ imageTag: "4.0.0"
+ # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
+ imagePullPolicy: Always
- pubDevPortalTM:
# Indicates whether the container is running
livenessProbe:
# Number of seconds after the container has started before liveness probes are initiated
initialDelaySeconds: 180
# How often (in seconds) to perform the probe
periodSeconds: 10
- # Indicates whether the container is ready to service requests
+ # Indicates whether the container is ready to service requests
readinessProbe:
# Number of seconds after the container has started before readiness probes are initiated
initialDelaySeconds: 180
# How often (in seconds) to perform the probe
periodSeconds: 10
- # If the deployment configurations for the Publisher-Store-TM of WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml),
- # add the customized configuration file under (wso2 -> deployment -> am -> pubDevPortalTM -> instanceTwo -> config -> deployment.toml)
-# config: ""
-# deployment.toml: |-
-# # deployment configurations for All-In-One WSO2 API Manager v3.2.0 (/repository/conf/deployment.toml)
-
- # Configure Ingress
- ingress:
- # Hostname for API Manager Carbon Management Console, Publisher, DevPortal and Admin Portal
- hostname: "am.wso2.com"
- # Annotations for the API Manager Publisher-DevPortal services Ingress
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
- nginx.ingress.kubernetes.io/affinity: "cookie"
- nginx.ingress.kubernetes.io/session-cookie-name: "route"
- nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"
-
resources:
- # These are the resource recommendations for running WSO2 API Management All-In-One deployment
+ # These are the minimum resource recommendations for running WSO2 API Management product profiles
# as per official documentation (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/)
requests:
memory: "2Gi"
@@ -202,138 +166,99 @@ wso2:
# Maximum Heap size
xmx: "1024m"
- analytics:
- dashboard:
- # Container image configurations
- # If a custom image must be used, uncomment 'dockerRegistry' and provide its value
- # dockerRegistry: ""
- imageName: "wso2am-analytics-dashboard"
- imageTag: "3.2.0"
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- imagePullPolicy: Always
+ # If the deployment configurations for the WSO2 API Manager v4.0.0 (/repository/conf/deployment.toml),
+ # add the customized configuration file under (wso2 -> deployment -> am -> config -> deployment.toml)
+ # config: ""
+ # deployment.toml: |-
+ # # deployment configurations for the WSO2 API Manager v4.0.0 (/repository/conf/deployment.toml)
+ # Configure Ingresses
+ ingress:
+ management:
+ # Hostname for API Manager Carbon Management Console, Publisher, DevPortal and Admin Portal
+ hostname: "am.wso2.com"
+ # Annotations for the API Manager Publisher-DevPortal services Ingress
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
+ nginx.ingress.kubernetes.io/affinity: "cookie"
+ nginx.ingress.kubernetes.io/session-cookie-name: "route"
+ nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"
+ gateway:
+ # Hostname for Gateway profile
+ hostname: "gateway.am.wso2.com"
+ # Annotations for the API Manager Gateway service Ingress
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
+ websub:
+ hostname: "websub.am.wso2.com"
+ # Annotations for the API Manager WebSub service Ingress
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
+
+ mi:
+ # If a custom image must be used, uncomment 'dockerRegistry' and provide its value.
+ # dockerRegistry: ""
+ imageName: "wso2mi"
+ imageTag: "4.0.0"
# Number of deployment replicas
- replicas: 1
-
- # Kubernetes RollingUpdate strategy configurations
+ replicas: 2
strategy:
rollingUpdate:
- # The maximum number of pods that can be scheduled above the desired number of pods
+ # The maximum number of pods that can be scheduled above the desired number of pods.
maxSurge: 1
- # The maximum number of pods that can be unavailable during the update
+ # The maximum number of pods that can be unavailable during the update.
maxUnavailable: 0
-
- # Indicates whether the container is running
- livenessProbe:
- # Number of seconds after the container has started before liveness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
- # Indicates whether the container is ready to service requests
- readinessProbe:
- # Number of seconds after the container has started before readiness probes are initiated
- initialDelaySeconds: 20
- # How often (in seconds) to perform the probe
- periodSeconds: 10
-
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- # If the deployment configurations for the Dashboard profile of WSO2 API Manager Analytics v3.2.0 (/conf/dashboard/deployment.yaml),
- # add the customized configuration file under (wso2 -> deployment -> analytics -> dashboard -> config -> deployment.yaml)
-# config:
-# deployment.yaml: |-
-# # deployment configurations for the Dashboard profile of WSO2 API Manager Analytics v3.2.0 (/conf/dashboard/deployment.yaml)
-
- resources:
- # These are the resource recommendations for running WSO2 Stream Processor based server profiles
- # as per official documentation (https://docs.wso2.com/display/SP440/Installation+Prerequisites).
- requests:
- memory: "4Gi"
- cpu: "2000m"
- # Please see the official documentation on WSO2 Stream Processor based Performance Analysis and Resource recommendations
- # (https://docs.wso2.com/display/SP440/Performance+Analysis+Results) and tune the limits according to your needs
- # where necessary.
- limits:
- memory: "4Gi"
- cpu: "2000m"
- # JVM settings
- # These are the resource allocation configurations associated with the JVM
- # Refer to the official documentation for advanced details (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- jvm:
- # Resource allocation for the Java Heap
- heap:
- memory:
- # Initial and minimum Heap size
- xms: "2048m"
- # Maximum Heap size
- xmx: "2048m"
-
- # Configure Ingress
- ingress:
- # Hostname for API Manager Analytics Dashboard
- hostname: "analytics.am.wso2.com"
- # Annotations for the API Manager Analytics Dashboard service Ingress
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-
- worker:
- # Container image configurations
- # If a custom image must be used, uncomment 'dockerRegistry' and provide its value.
- # dockerRegistry: ""
- imageName: "wso2am-analytics-worker"
- imageTag: "3.2.0"
- # Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images)
- imagePullPolicy: Always
-
# Indicates whether the container is running.
livenessProbe:
# Number of seconds after the container has started before liveness probes are initiated.
- initialDelaySeconds: 20
+ initialDelaySeconds: 35
# How often (in seconds) to perform the probe.
periodSeconds: 10
# Indicates whether the container is ready to service requests.
readinessProbe:
# Number of seconds after the container has started before readiness probes are initiated.
- initialDelaySeconds: 20
+ initialDelaySeconds: 35
# How often (in seconds) to perform the probe.
periodSeconds: 10
-
- # If the deployment configurations for the Worker profile of WSO2 API Manager Analytics v3.2.0 (/conf/worker/deployment.yaml),
- # add the customized configuration file under (wso2 -> deployment -> analytics -> worker -> config -> deployment.yaml)
-# config:
-# deployment.yaml: |-
-# # deployment configurations for the Worker profile of WSO2 API Manager Analytics v3.2.0 (/conf/worker/deployment.yaml)
-
+ # These are the minimum resource recommendations for running WSO2 Micro Integrator
resources:
- # These are the resource recommendations for running WSO2 Stream Processor based server profiles
- # as per official documentation (https://docs.wso2.com/display/SP440/Installation+Prerequisites).
requests:
- memory: "4Gi"
- cpu: "2000m"
- # Please see the official documentation on WSO2 Stream Processor based Performance Analysis and Resource recommendations
- # (https://docs.wso2.com/display/SP440/Performance+Analysis+Results) and tune the limits according to your needs
- # where necessary.
+ # The minimum amount of memory that should be allocated for a Pod
+ memory: "512Mi"
+ # The minimum amount of CPU that should be allocated for a Pod
+ cpu: "500m"
limits:
- memory: "4Gi"
- cpu: "2000m"
- # JVM settings
- # These are the resource allocation configurations associated with the JVM
- # Refer to the official documentation for advanced details (https://docs.wso2.com/display/SP440/Installation+Prerequisites)
- jvm:
- # Resource allocation for the Java Heap
- heap:
- memory:
- # Initial and minimum Heap size
- xms: "2048m"
- # Maximum Heap size
- xmx: "2048m"
-
-kubernetes:
- # Name of Kubernetes service account
- serviceAccount: "wso2am-pattern-2-svc-account"
-
-# Override sub chart parameters
-mysql-am:
- mysql:
- persistence:
- storageClass: *storage_class
+ # The maximum amount of memory that should be allocated for a Pod
+ memory: "1Gi"
+ # The maximum amount of CPU that should be allocated for a Pod
+ cpu: "1000m"
+ # Environment variables for the Micro integrator deployment.
+ envs:
+ # ENV_NAME: ENV_VALUE
+ # Configure synapse testing.
+ synapseTest:
+ enabled: false
+
+ # Configure Ingresses
+ ingress:
+ # Configure management ingress
+ management:
+ # Hostname for the Micro Integrator management endpoint.
+ hostname: "tenant1.management.mi.wso2.com"
+ # Annotations for the Micro Integrator management Ingress.
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
+
+ kubernetes:
+ # Name of Kubernetes service account
+ serviceAccount: *service_account
+
+ # Override sub chart parameters
+ mysql-am:
+ mysql:
+ persistence:
+ storageClass: *storage_class
diff --git a/advanced/am-pattern-3/Chart.yaml b/advanced/am-pattern-3/Chart.yaml
index 79aeae2b..716c07ed 100644
--- a/advanced/am-pattern-3/Chart.yaml
+++ b/advanced/am-pattern-3/Chart.yaml
@@ -13,8 +13,8 @@
# limitations under the License.
apiVersion: v1
-appVersion: "3.2.0"
+appVersion: "4.0.0"
description: A Helm chart for the deployment of WSO2 API Management deployment pattern 3
name: am-pattern-3
-version: 3.2.0-4
+version: 4.0.0-1
icon: https://wso2.cachefly.net/wso2/sites/all/images/wso2logo.svg
diff --git a/advanced/am-pattern-3/README.md b/advanced/am-pattern-3/README.md
index 0bc4cbd6..999eadad 100644
--- a/advanced/am-pattern-3/README.md
+++ b/advanced/am-pattern-3/README.md
@@ -1,12 +1,11 @@
-# Helm Chart for deployment of a Fully Distributed Setup of WSO2 API Manager with WSO2 API Manager Analytics
+# Pattern 3: Helm Chart for deployment of a Simple Scalable Deployment of WSO2 API Manager
-Resources for building a Helm chart for deployment of a [fully distributed setup of WSO2 API Manager with WSO2 API Manager Analytics
-support](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/deployment-patterns/#pattern-3-fully-distributed-setup).
+Resources for building a Helm chart for deployment of a [simple scalable deployment of WSO2 API Manager](https://apim.docs.wso2.com/en/4.0.0/install-and-setup/setup/deployment-overview/#simple-scalable-deployment).
-![WSO2 API Manager pattern 3 deployment](https://apim.docs.wso2.com/en/latest/assets/img/setup-and-install/3-fully-distributed-setup.png)
+![WSO2 API Manager pattern 3 deployment](https://apim.docs.wso2.com/en/4.0.0/assets/img/setup-and-install/basic-scalable-deployment.png)
For advanced details on the deployment pattern, please refer to the official
-[documentation](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/deploying-wso2-api-m-in-a-distributed-setup/).
+[documentation](https://apim.docs.wso2.com/en/4.0.0/install-and-setup/setup/distributed-deployment/deploying-wso2-api-m-in-a-distributed-setup/).
## Contents
@@ -58,7 +57,7 @@ You can install the relevant Helm chart either from [WSO2 Helm Chart Repository]
Helm version 2
```
- helm install --name wso2/am-pattern-3 --version 3.2.0-1 --namespace
+ helm install --name wso2/am-pattern-3 --version 4.0.0-1 --namespace
```
Helm version 3
@@ -66,7 +65,7 @@ You can install the relevant Helm chart either from [WSO2 Helm Chart Repository]
- Deploy the Kubernetes resources using the Helm Chart
```
- helm install wso2/am-pattern-3 --version 3.2.0-1 --namespace --create-namespace
+ helm install wso2/am-pattern-3 --version 4.0.0-1 --namespace --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -77,7 +76,7 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
```
- helm install --name wso2/am-pattern-3 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+ helm install --name wso2/am-pattern-3 --version 4.0.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
```
#### Install Chart From Source
@@ -98,7 +97,7 @@ git clone https://github.com/wso2/kubernetes-apim.git
Helm version 2
```
- helm install --dep-up --name /am-pattern-3 --version 3.2.0-1 --namespace
+ helm install --dep-up --name /am-pattern-3 --version 4.0.0-1 --namespace
```
Helm version 3
@@ -106,7 +105,7 @@ git clone https://github.com/wso2/kubernetes-apim.git
- Deploy the Kubernetes resources using the Helm Chart
```
- helm install /am-pattern-3 --version 3.2.0-1 --namespace --dependency-update --create-namespace
+ helm install /am-pattern-3 --version 4.0.0-1 --namespace --dependency-update --create-namespace
```
The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.
@@ -117,9 +116,45 @@ please provide your WSO2 Subscription credentials via input values (using `--set
Please see the following example.
```
- helm install --name /am-pattern-3 --version 3.2.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
+ helm install --name /am-pattern-3 --version 4.0.0-1 --namespace --set wso2.subscription.username= --set wso2.subscription.password=
```
+Or else, you can configure the default configurations inside the am-pattern-3 helm chart [values.yaml](https://github.com/wso2/kubernetes-apim/blob/master/advanced/am-pattern-3/values.yaml) file. Refer [this](https://helm.sh/docs/chart_template_guide/values_files/) for to learn more details about the `values.yaml` file.
+
+
+> **Note:**
+From the above Helm commands, base image of a Micro Integrator is deployed (without any integration solution). To deploy your integration solution with the Helm charts follow the below steps.
+>1. [Create an integration service using WSO2 Integration Studio and expose it as a Managed API](https://apim.docs.wso2.com/en/4.0.0/tutorials/integration-tutorials/service-catalog-tutorial/#exposing-an-integration-service-as-a-managed-api). Then [create a Docker image](https://apim.docs.wso2.com/en/4.0.0/integrate/develop/create-docker-project/#creating-docker-exporter) and push it to your private or public Docker registry.
+ - `INTEGRATION_IMAGE_REGISTRY` will refer to the Docker registry that created Docker image has been pushed
+ - `INTEGRATION_IMAGE_NAME` will refer to the name of the created Docker image
+ - `INTEGRATION_IMAGE_TAG` will refer to the tag of the created Docker image
+>2. If your Docker registry is a private registry, [create an imagePullSecret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
+ - `IMAGE_PULL_SECRET` will refer to the created image pull secret
+>3. Deploy the helm resource using following command.
+> ```
+> helm install wso2/am-pattern-3 --version 4.0.0-1 --namespace --set wso2.deployment.mi.dockerRegistry= --set wso2.deployment.mi.imageName= --set wso2.deployment.mi.imageTag= --set wso2.deployment.mi.imagePullSecrets=
+> ```
+
+### Choreo Analytics
+
+If you need to enable Choreo Analytics with WSO2 API Manager, please follow the documentation on [Register for Analytics](https://apim.docs.wso2.com/en/4.0.0/observe/api-manager-analytics/configure-analytics/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 wso2/am-pattern-3 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey=
+```
+
+Helm v3
+
+```
+helm install wso2/am-pattern-3 --version 4.0.0-1 --namespace --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint= --set wso2.choreoAnalytics.onpremKey= --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.
@@ -130,33 +165,33 @@ kubectl get ing -n
The output under the relevant column stands for the following.
-API Manager Publisher
-
-- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-3-am-publisher-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager's Publisher service (``)
-- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager's Publisher service to outside of the Kubernetes environment
-- PORTS: Externally exposed service ports of the API Manager's Publisher service
+API Manager Control Plane
-API Manager DevPortal
-
-- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-3-am-devportal-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager's DevPortal service (``)
-- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager's DevPortal service to outside of the Kubernetes environment
-- PORTS: Externally exposed service ports of the API Manager service
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-3-am-cp-ingress`)
+- HOSTS: Hostname of the WSO2 API Manager's Control Plane service (``)
+- 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
API Manager Gateway
- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-3-am-gateway-ingress`)
- HOSTS: Hostname of the WSO2 API Manager's Gateway service (``)
- 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's DevPortal service
+- PORTS: Externally exposed service ports of the API Manager's Gateway service
+
+API Manager Websub
-API Manager Analytics Dashboard
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to wso2am-pattern-3-am-websub-ingress)
+- HOSTS: Hostname of the WSO2 API Manager's Websub service (``)
+- ADDRESS: External IP (EXTERNAL-IP) exposing the API Manager's Websub service to outside of the Kubernetes environment
+- PORTS: Externally exposed service ports of the API Manager's Websub service
-- NAME: Metadata name of the Kubernetes Ingress resource (defaults to `wso2am-pattern-3-am-analytics-dashboard-ingress`)
-- HOSTS: Hostname of the WSO2 API Manager Analytics Dashboard service (``)
-- ADDRESS: External IP (`EXTERNAL-IP`) exposing the API Manager Analytics Dashboard service to outside of the Kubernetes environment
-- PORTS: Externally exposed service ports of the API Manager Analytics Dashboard service
+Micro Integrator Management APIs
+
+- NAME: Metadata name of the Kubernetes Ingress resource (defaults to wso2am-pattern-3-mi-1-management-ingress)
+- HOSTS: Hostname of the WSO2 Micro Integrator service (``)
+- ADDRESS: External IP (EXTERNAL-IP) exposing the Micro Integrator service to outside of the Kubernetes environment
+PORTS: Externally exposed service ports of the Micro Integrator service
### 3. Add a DNS record mapping the hostnames and the external IP
@@ -166,18 +201,11 @@ 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.
-```
-
-```
-
### 4. Access Management Consoles
-- API Manager Publisher: `https:///publisher`
-
-- API Manager DevPortal: `https:///devportal`
-
-- API Manager Analytics Dashboard: `https:///analytics-dashboard`
+- API Manager Publisher: `https:///publisher`
+- API Manager DevPortal: `https:///devportal`
## Configuration
@@ -189,6 +217,9 @@ The following tables lists the configurable parameters of the chart and their de
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `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`.
@@ -216,7 +247,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `wso2.deployment.am.dockerRegistry` | Registry location of the Docker image to be used to create API Manager instances | - |
| `wso2.deployment.am.imageName` | Name of the Docker image to be used to create API Manager instances | `wso2am` |
-| `wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 3.2.0 |
+| `wso2.deployment.am.imageTag` | Tag of the image used to create API Manager instances | 4.0.0 |
| `wso2.deployment.am.imagePullPolicy` | Refer to [doc](https://kubernetes.io/docs/concepts/containers/images#updating-images) | `Always` |
| `wso2.deployment.am.resources.requests.memory` | The minimum amount of memory that should be allocated for running API Manager product profiles with profile optimization | 1Gi |
| `wso2.deployment.am.resources.requests.cpu` | The minimum amount of CPU that should be allocated for running API Manager product profiles with profile optimization | 1000m |
@@ -226,65 +257,49 @@ If you do not have an active WSO2 subscription, **do not change** the parameters
| `wso2.deployment.am.livenessProbe.periodSeconds` | Period of the live-ness probe for API Manager optimized profile | 10 |
| `wso2.deployment.am.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe for API Manager optimized profile | 60 |
| `wso2.deployment.am.readinessProbe.periodSeconds` | Period of the readiness probe for API Manager optimized profile | 10 |
+| `wso2.deployment.am.websub.ingress.hostname` | Hostname for API Manager WebSub service | `websub.am.wso2.com` |
+| `wso2.deployment.am.websub.ingress.annotations` | Ingress resource annotations for API Manager WebSub | Community NGINX Ingress controller annotations |
| `wso2.deployment.am.gateway.ingress.hostname` | Hostname for API Manager Gateway | `gateway.am.wso2.com` |
| `wso2.deployment.am.gateway.ingress.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations |
| `wso2.deployment.am.gateway.replicas` | Number of replicas of API Manager Gateway to be started | 2 |
| `wso2.deployment.am.gateway.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 2 |
| `wso2.deployment.am.gateway.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
| `wso2.deployment.am.gateway.config` | Custom deployment configuration file for Gateway profile (`/repository/conf/deployment.toml`) | - |
-| `wso2.deployment.am.km.replicas` | Number of replicas of API Manager Key Manager to be started | 2 |
-| `wso2.deployment.am.km.strategy.rollingUpdate.maxSurge` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 2 |
-| `wso2.deployment.am.km.strategy.rollingUpdate.maxUnavailable` | Refer to [doc](https://v1-14.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#deploymentstrategy-v1-apps) | 0 |
-| `wso2.deployment.am.km.config` | Custom deployment configuration file for Key Manager profile (`