Skip to content

Commit

Permalink
Merge pull request #8533 from PasanT9/k8s-master
Browse files Browse the repository at this point in the history
Update 4.4.0 docs
  • Loading branch information
PasanT9 authored Oct 30, 2024
2 parents 4d41110 + ba8f1f0 commit 4fc842e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
Follow the instructions below to use Kubernetes (K8s) and Helm resources for container-based deployments of WSO2 API Manager (API-M).

!!! note
- In the context of this document, **<`KUBERNETES_HOME> `** refers to a local copy of the [`wso2/kubernetes-apim `](https://github.com/wso2/kubernetes-apim/) Git repository that **includes Helm Resources for WSO2 API Manager.**
- **&lt;`HELM_HOME>`** will refer to **&lt;`<KUBERNETES_HOME>/simple`**.
- In the context of this document, **&lt;`HELM_HOME> `** refers to a local copy of the [`wso2/helm-apim `](https://github.com/wso2/helm-apim/).

!!! Prerequisites

- In order to use WSO2 Helm resources, you need an active [WSO2 Subscription](https://wso2.com/subscription).
If you do not possess an active WSO2 Subscription already, you can sign up for a WSO2 Free Trial Subscription from [here](https://wso2.com/free-trial-subscription).
Otherwise you can proceed with Docker images, which are created using GA releases.<br><br>

- Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Helm](https://helm.sh/docs/intro/install/), [Dep](https://golang.github.io/dep/docs/installation.html)
and [Kubernetes client](https://kubernetes.io/docs/tasks/tools/install-kubectl/) in order to run the steps
provided in the following quick start guide.<br><br>
Expand All @@ -20,52 +15,35 @@ Follow the instructions below to use Kubernetes (K8s) and Helm resources for con

- Install [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/). Please note that Helm resources for WSO2 product
deployment patterns are compatible with NGINX Ingress Controller Git release [`nginx-0.22.0`](https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.22.0).

- Add the WSO2 Helm chart repository.

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

1. Checkout the Helm Resources for WSO2 API Manager Git repository using `git clone` :

```
git clone https://github.com/wso2/kubernetes-apim.git
git checkout tags/v4.0.0.1
git clone https://github.com/wso2/helm-apim.git
cd helm-apim
git checkout tags/all-in-one-4.4.0
```
2. Provide the necessary configurations.
!!! note
The default product configurations for deployment of WSO2 API Manager are available [here](https://github.com/wso2/kubernetes-apim/tree/v4.0.0.1/simple/am-single/templates) folder. Change the configurations, as necessary.
The default product configurations for deployment of WSO2 API Manager are available [here](https://github.com/wso2/helm-apim/tree/all-in-one-4.4.0/all-in-one) folder. Change the configurations, as necessary.
Open the `<HELM_HOME>/am-single/values.yaml` and provide the following values for WSO2 Subscription Configurations.
Open the `<HELM_HOME>/all-in-one/values.yaml` and provide the following values for WSO2 Subscription Configurations.
| Parameter | Description | Default Value |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `wso2.subscription.username` | Your WSO2 Subscription username | "" |
| `wso2.subscription.password` | Your WSO2 Subscription password | "" |
!!! note
If you do not have an active WSO2 subscription, do not change the parameters `wso2.subscription.username` and `wso2.subscription.password`.
3. Deploy WSO2 API Manager with WSO2 API Manager Analytics.
Refer the [Getting Started Guide]({{base_path}}/api-analytics/getting-started-guide) to setup the cloud Analytics solution and obtain an on-prem key.
| `wso2.deployment.image.registry` | Registry of the APIM Docker image | "" |
| `wso2.deployment.image.repository` | Repostiory of the APIM Docker image | "" |
| `wso2.deployment.image.digest` | Digest of the APIM Docker image | "" |
| "" |
```
helm install --dependency-update --name <RELEASE_NAME> <HELM_HOME>/am-single --namespace <NAMESPACE> --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint=<CHOREO_ANALYTICS_ENDPOINT> --set wso2.choreoAnalytics.onpremKey=<ONPREM_KEY>
```
You can also provide the above configurations in the `<HELM_HOME>/am-single/values.yaml` file.
3. Deploy WSO2 API Manager
| Parameter | Description | Default Value |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| `wso2.choreoAnalytics.enabled` | Analytics enabled or not | false |
| `wso2.choreoAnalytics.endpoint` | Analytics data publishing endpoint | https://analytics-event-auth.choreo.dev/auth/v1 |
| `wso2.choreoAnalytics.onpremKey` | On-prem key for Analytics | "" |
```
helm install --dependency-update <RELEASE_NAME> <HELM_HOME>/all-in-one/ --namespace <NAMESPACE>
```
4. Access Management Console.
Expand All @@ -75,28 +53,25 @@ Follow the instructions below to use Kubernetes (K8s) and Helm resources for con
kubectl get ing -n <NAMESPACE>
```
Example:
```
NAME HOSTS ADDRESS PORTS AGE
wso2am-single-node-am-gateway-ingress <RELEASE_NAME>-gateway <EXTERNAL-IP> 80, 443 7m
wso2am-single-node-am-ingress <RELEASE_NAME>-am <EXTERNAL-IP> 80, 443 7m
wso2am-single-node-am-websub-ingress <RELEASE_NAME>-websub <EXTERNAL-IP> 80, 443 7m
NAME CLASS HOSTS ADDRESS PORTS AGE
<RELEASE_NAME>-am-all-in-one-am-gateway-ingress nginx gw.wso2.com 80, 443 8s
<RELEASE_NAME>-am-all-in-one-am-ingress nginx am.wso2.com 80, 443 8s
<RELEASE_NAME>-am-all-in-one-am-websocket-ingress nginx websocket.wso2.com 80, 443 8s
<RELEASE_NAME>-am-all-in-one-am-websub-ingress nginx websub.wso2.com 80, 443 8s
```
2. Add the above hosts as entries in `/etc/hosts` file as follows:
```
<EXTERNAL-IP> <RELEASE_NAME>-am
<EXTERNAL-IP> <RELEASE_NAME>-gateway
<EXTERNAL-IP> <RELEASE_NAME>-websub
<EXTERNAL-IP> am.wso2.com
<EXTERNAL-IP> gw.wso2.com
<EXTERNAL-IP> websocket.wso2.com
<EXTERNAL-IP> websub.wso2.com
```
3. Try navigating to `https://<RELEASE_NAME>-am/carbon`, `https://<RELEASE_NAME>-am/publisher` and `https://<RELEASE_NAME>-am/devportal` from your favorite browser.
3. Try navigating to `https://am.wso2.com/carbon`, `https://am.wso2.com/publisher` and `https://am.wso2.com/devportal` from your favorite browser.
!!! note
You can read the [README guide](https://github.com/wso2/kubernetes-apim/blob/v4.0.0.1/simple/am-single/README.md) of WSO2 API Manager Git repository for further details on other dependencies and configurations.
For more information, see the deployment configurations with regard to the [Advanced Deployment Patterns]({{base_path}}/install-and-setup/setup/deployment-overview/).
You can read the [README guide](https://github.com/wso2/helm-apim/tree/all-in-one-4.4.0/all-in-one/README.md) of WSO2 API Manager Git repository for further details on other dependencies and configurations.
- [Standard HA Deployment](https://github.com/wso2/kubernetes-apim/blob/v4.0.0.1/advanced/am-pattern-1/README.md)
- [Standard HA Deployment with Multitenancy](https://github.com/wso2/kubernetes-apim/blob/v4.0.0.1/advanced/am-pattern-2/README.md)
- [Simple Scalable Deployment](https://github.com/wso2/kubernetes-apim/blob/v4.0.0.1/advanced/am-pattern-3/README.md)
For different deployment patterns, see the deployment configurations with regard to the [Advanced Deployment Patterns]({{base_path}}/install-and-setup/setup/deployment-overview/).
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The structure of an exported API ZIP file is explained below:
<td>If the exported revision is deployed in one or more gateway environments, this file will contain the list of those deployed gateways.
<pre><code>
type: deployment_environments
version: v4.2.0
version: v4.4.0
data:
-
displayOnDevportal: true
Expand All @@ -171,7 +171,7 @@ data:
Apart from the above <code>client_certificates.yaml</code> file, this folder contains the certificate files (.crt). Those file names should be included in the <code>client_certificates.yaml</code> by mapping to the corresponding alias name. Below is an example file for a <code>client_certificates.yaml</code> file which has mapped the certificates Alias1.crt and Alias2.crt to the corresponding aliases Alias1 and Alias2 accordingly.
<pre><code>
type: client_certificates
version: v4.2.0
version: v4.4.0
data:
-
alias: Alias1
Expand Down Expand Up @@ -210,7 +210,7 @@ data:
<td> This folder contains documentation attached to a particular API. Each document will have a separate folder by its name. Each folder contains a file named <code>document.yaml</code> which contains the meta information related to a document. Example for a <code>document.yaml</code> file is shown below.
<pre><code>
type: document
version: v4.2.0
version: v4.4.0
data:
documentId: 7be89b14-6b7c-4e1f-8bee-f72295dd65cb
name: Doc1
Expand All @@ -237,7 +237,7 @@ data:
Apart from the above <code>endpoint_certificates.yaml</code> file, this folder contains the certificate files (.crt). Those file names should be included in the <code>endpoint_certificates.yaml</code> by mapping to the corresponding alias name. Below is an example file for a <code>endpoint_certificates.yaml</code> file which has mapped the certificates Alias3.crt and Alias4.crt to the corresponding aliases Alias3 and Alias4 accordingly.
<pre><code>
type: endpoint_certificates
version: v4.2.0
version: v4.4.0
data:
-
alias: Alias4
Expand Down Expand Up @@ -266,7 +266,7 @@ data:
<code>&lt;custom-policy-1-name>_&lt;custom-policy-1-version>.yaml</code>: This is the definition file that contains the meta data of the operation policy such as category, name, version, display name, description, applicable flows, supported Gateways, supported API types and policy attributes. An example <code>.yaml</code> definition is shown below.
<pre><code>
type: operation_policy_specification
version: v4.2.0
version: v4.4.0
data:
category: Mediation
name: addHeader
Expand Down Expand Up @@ -489,11 +489,11 @@ mentioned gateway environments. If the **deployment environments are not provide
- After importing, if the APIs are not visible in the API Publisher UI, do the following to re-index the artifacts in the registry.
1. Shut down the WSO2 API-M 4.2.0, backup and delete the `<API-M_4.2.0_HOME>/solr` directory.
1. Shut down the WSO2 API-M 4.4.0, backup and delete the `<API-M_4.4.0_HOME>/solr` directory.
2. Rename the `<lastAccessTimeLocation>` element in the `<API-M_4.2.0_HOME>/repository/conf/registry.xml` file. If you use a **distributed WSO2 API-M setup**, change the file in the API Publisher node. For example, change the `/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime` registry path to `/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1 `
2. Rename the `<lastAccessTimeLocation>` element in the `<API-M_4.4.0_HOME>/repository/conf/registry.xml` file. If you use a **distributed WSO2 API-M setup**, change the file in the API Publisher node. For example, change the `/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime` registry path to `/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1 `
3. Restart WSO2 API-M 4.2.0 server.
3. Restart WSO2 API-M 4.4.0 server.
- If you want to verify the final import artifact just before it is sent to the WSO2 API-M server, use `--skip-cleanup`
with `--verbose` logs. In the verbose logs, you can find the temporary directory location.
Expand Down

0 comments on commit 4fc842e

Please sign in to comment.