Coder Social home page Coder Social logo

kubernetes-apim's Introduction

Kubernetes and Helm Resources for WSO2 API Manager

Kubernetes and Helm Resources for container-based deployments of WSO2 API Manager deployment patterns

This repository contains Kubernetes and Helm resources required for,

  • WSO2 API Manager pattern 1

  • WSO2 API Manager pattern 2

Deploy Kubernetes resources

In order to deploy Kubernetes resources for each deployment pattern, follow the Quick Start Guides for each deployment pattern given below:

Deploy Helm resources

In order to deploy Helm resources for each deployment pattern, follow the Quick Start Guides for each deployment pattern given below:

How to update configurations

Kubernetes resources for WSO2 products use Kubernetes ConfigMaps to pass on the minimum set of configurations required to setup a product deployment pattern.

For example, the minimum set of configurations required to setup pattern 1 of WSO2 API Manager can be found in <KUBERNETES_HOME>/pattern-1/confs directory. The Kubernetes ConfigMaps are generated from these files.

If you intend to pass on any additional files with configuration changes, third-party libraries, OSGi bundles and security related artifacts to the Kubernetes cluster, you may mount the desired content to /home/wso2carbon/wso2-server-volume directory path within a WSO2 product Docker container.

The following example depicts how this can be achieved when passing additional configurations to WSO2 API Manager in pattern 1 of WSO2 API Manager:

a. In order to apply the updated configurations, WSO2 product server instances need to be restarted. Hence, un-deploy all the Kubernetes resources corresponding to the product deployment, if they are already deployed.

b. Create and export a directory within the NFS server instance.

c. Add the additional configuration files, third-party libraries, OSGi bundles and security related artifacts, into appropriate folders matching that of the relevant WSO2 product home folder structure, within the previously created directory.

d. Grant ownership to wso2carbon user and wso2 group, for the directory created in step (b).

sudo chown -R wso2carbon:wso2 <directory_name>

e. Grant read-write-execute permissions to the wso2carbon user, for the directory created in step (b).

chmod -R 700 <directory_name>

f. Map the directory created in step (b) to a Kubernetes Persistent Volume in the <KUBERNETES_HOME>/pattern-1/volumes/persistent-volumes.yaml file. For example, append the following entry to the file:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: wso2apim-with-analytics-additional-config-pv
  labels:
    purpose: apim-additional-configs
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    server: <NFS_SERVER_IP>
    path: "<NFS_LOCATION_PATH>"

Provide the appropriate NFS_SERVER_IP and NFS_LOCATION_PATH.

g. Create a Kubernetes Persistent Volume Claim to bind with the Kubernetes Persistent Volume created in step e. For example, append the following entry to the file <KUBERNETES_HOME>/pattern-1/apim/wso2apim-volume-claim.yaml:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: wso2apim-with-analytics-additional-config-volume-claim
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: ""
  selector:
    matchLabels:
      purpose: apim-additional-configs

h. Update the appropriate Kubernetes Deployment resource(s). For example in the discussed scenario, update the volumes (spec.template.spec.volumes) and volume mounts (spec.template.spec.containers[wso2apim-with-analytics-apim-worker].volumeMounts) in <KUBERNETES_HOME>/pattern-1/apim/wso2apim-deployment.yaml file as follows:

volumeMounts:
...
- name: wso2apim-with-analytics-additional-config-storage-volume
  mountPath: "/home/wso2carbon/wso2-server-volume"

volumes:
...
- name: wso2apim-with-analytics-additional-config-storage-volume
  persistentVolumeClaim:
    claimName: wso2apim-with-analytics-additional-config-volume-claim

i. Deploy the Kubernetes resources as defined in section Quick Start Guide for the pattern 1 of WSO2 API Manager.

kubernetes-apim's People

Contributors

anugayan avatar anuruddhal avatar chamithkumarage avatar chirangaalwis avatar davidkarlsen avatar dilanua avatar gayanthakaushal avatar imesh avatar irunika avatar isurulucky avatar kasunsiyambalapitiya avatar kavinduzoysa avatar kosalaherath avatar lakwarus avatar lasanthas avatar maheshika avatar msmshariq avatar pcnfernando avatar prasa7 avatar pubudu538 avatar supunmalinga avatar thilinamanamgoda avatar vihanga-liyanage avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.