is-pattern-1

by Helm

Helm chartv6.0.0-1App 6.0.0

A Helm chart for the deployment of WSO2 Identity And Access Management pattern 1

About this chart

Helm Chart for a clustered deployment of WSO2 Identity Server

Resources for building a Helm chart for a clustered deployment of WSO2 Identity Server.

For advanced details on the deployment pattern, please refer the official documentation.

Contents

  • Prerequisites
  • Quick Start Guide
  • Configuration
  • Runtime Artifact Persistence and Sharing
  • Managing Java Keystores and Truststores
  • Centralized Logging

Prerequisites

  • WSO2 product Docker images used for the Kubernetes deployment.

    WSO2 product Docker images available at DockerHub package General Availability (GA) versions of WSO2 products with no WSO2 Updates.

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

  • Install Git, Helm and Kubernetes client in order to run the steps provided in the following quick start guide.

  • An already setup Kubernetes cluster.

  • Ensure Kubernetes cluster has enough resources

  • Install NGINX Ingress Controller.

  • Add the WSO2 Helm chart repository.

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

Quick Start Guide

1. Install the Helm Chart

You can install the relevant Helm chart either from WSO2 Helm Chart Repository or by source.

Note:

  • NAMESPACE should be the Kubernetes Namespace in which the resources are deployed.

Install Chart From WSO2 Helm Chart Repository

Helm version 2

helm install --name <RELEASE_NAME> wso2/is-pattern-1 --version 5.11.0-5 --namespace <NAMESPACE>

Helm version 3

  • Create the Kubernetes Namespace.

    kubectl create ns <NAMESPACE>
    
  • Deploy the Kubernetes resources using the Helm Chart

    helm install <RELEASE_NAME> wso2/is-pattern-1 --version 5.11.0-5 --namespace <NAMESPACE>
    

The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.

If you are using WSO2 product Docker images available from WSO2 Private Docker Registry, please provide your WSO2 Subscription Credentials via input values (using --set argument).

Refer the following example.

Helm version 2

 helm install --name <RELEASE_NAME> wso2/is-pattern-1 --version 5.11.0-5 --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>

Helm version 3

 helm install <RELEASE_NAME> wso2/is-pattern-1 --version 5.11.0-5 --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>

Install Chart From Source

In the context of this document,

  • KUBERNETES_HOME will refer to a local copy of the wso2/kubernetes-is Git repository.
  • HELM_HOME will refer to <KUBERNETES_HOME>/advanced.

Clone the Helm Resources for WSO2 Identity Server Git repository.

git clone https://github.com/wso2/kubernetes-is.git

Deploy Helm chart for a clustered deployment of WSO2 Identity Server.

Helm version 2

helm install --dep-up --name <RELEASE_NAME> <HELM_HOME>/is-pattern-1 --namespace <NAMESPACE>

Helm version 3

  • Create the Kubernetes Namespace to which you desire to deploy the Kubernetes resources.

    kubectl create ns <NAMESPACE>
    
  • Deploy the Kubernetes resources using the Helm Chart

    helm install <RELEASE_NAME> <HELM_HOME>/is-pattern-1 --namespace <NAMESPACE> --dependency-update
    

The above steps will deploy the deployment pattern using WSO2 product Docker images available at DockerHub.

If you are using WSO2 product Docker images available from WSO2 Private Docker Registry, please provide your WSO2 Subscription Credentials via input values (using --set argument).

Refer the following example.

 helm install --name <RELEASE_NAME> <HELM_HOME>/is-pattern-1 --namespace <NAMESPACE> --set wso2.subscription.username=<SUBSCRIPTION_USERNAME> --set wso2.subscription.password=<SUBSCRIPTION_PASSWORD>

2. Obtain the external IP

Obtain the external IP (EXTERNAL-IP) of the Identity Server Ingress resource, by listing down the Kubernetes Ingresses.

kubectl get ing -n <NAMESPACE>

The output under the relevant column stands for the following.

  • NAME: Metadata name of the Kubernetes Ingress resource (defaults to wso2is-pattern-1-identity-server-ingress)
  • HOSTS: Hostname of the WSO2 Identity service (<wso2.deployment.wso2is.ingress.identity.hostname>)
  • ADDRESS: External IP (EXTERNAL-IP) exposing the Identity service to outside of the Kubernetes environment
  • PORTS: Externally exposed service ports of the Identity service

3. Add a DNS record mapping the hostname and the external IP

If the defined hostname (in the previous step) is backed by a DNS service, add a DNS record mapping the hostname and the external IP (EXTERNAL-IP) in the relevant DNS service.

If the defined hostname is not backed by a DNS service, for the purpose of evaluation you may add an entry mapping the hostname and the external IP in the /etc/hosts file at the client-side.

<EXTERNAL-IP> <wso2.deployment.wso2is.ingress.identity.hostname>

4. Access Management Console, Console and My Account

  • Identity Server's Carbon Management Console: https://<wso2.deployment.wso2is.ingress.identity.hostname>/carbon
  • Identity Server's Console: https://<wso2.deployment.wso2is.ingress.identity.hostname>/console
  • Identity Server's My Account: https://<wso2.deployment.wso2is.ingress.identity.hostname>/myaccount

Configuration

The following tables lists the configurable parameters of the chart and their default values.

WSO2 Subscription Configurations

ParameterDescriptionDefault Value
wso2.subscription.usernameYour WSO2 Subscription username-
wso2.subscription.passwordYour WSO2 Subscription password-

If you do not have an active WSO2 subscription, do not change the parameters wso2.subscription.username and wso2.subscription.password.

Chart Dependencies

ParameterDescriptionDefault Value
wso2.deployment.dependencies.mysql.enabledEnable the deployment and usage of WSO2 IAM MySQL based Helm Charttrue

We recommend you to persist the database data of the Kubernetes based MySQL deployment using an appropriate Kubernetes StorageClass. You can achieve this by setting the property mysql-is.mysql.persistence.storageClass to the desired StorageClass.

Important: In a production grade deployment, it is highly recommended to host the product databases in an external database server.

Persistent Runtime Artifact Configurations

ParameterDescriptionDefault Value
wso2.deployment.persistentRuntimeArtifacts.storageClassAppropriate Kubernetes Storage Class-
wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.enabledEnable persistence/sharing of runtime artifacts between instances of the Identity Server profilefalse
wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.tenantsCapacity for tenant data between Identity Server instances100M
wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.userstoresCapacity for secondary user stores between Identity Server instances50M

Please refer to the section Runtime Artifact Persistence and Sharing for details.

Identity Server Configurations

ParameterDescriptionDefault Value
wso2.deployment.wso2is.dockerRegistryRegistry location of the Docker image to be used to create Identity Server instances-
wso2.deployment.wso2is.imageNameName of the Docker image to be used to create Identity Server instanceswso2is
wso2.deployment.wso2is.imageTagTag of the image used to create Identity Server instances5.11.0
wso2.deployment.wso2is.imagePullPolicyRefer to docAlways
wso2.deployment.wso2is.replicasNumber of replicas for IS node2
wso2.deployment.wso2is.startupProbe.initialDelaySecondsInitial delay for the startup probe for IS node60
wso2.deployment.wso2is.startupProbe.periodSecondsPeriod of the startup probe for IS node5
wso2.deployment.wso2is.startupProbe.failureThresholdFailed attempt count threshold of startup probe for IS node30
wso2.deployment.wso2is.livenessProbe.periodSecondsPeriod of the live-ness probe for IS node10
wso2.deployment.wso2is.readinessProbe.initialDelaySecondsInitial delay for the readiness probe for IS node60
wso2.deployment.wso2is.readinessProbe.periodSecondsPeriod of the readiness probe for IS node10
wso2.deployment.wso2is.resources.requests.memoryThe minimum amount of memory that should be allocated for a Pod2Gi
wso2.deployment.wso2is.resources.requests.cpuThe minimum amount of CPU that should be allocated for a Pod1000m
wso2.deployment.wso2is.resources.limits.memoryThe maximum amount of memory that should be allocated for a Pod4Gi
wso2.deployment.wso2is.resources.limits.cpuThe maximum amount of CPU that should be allocated for a Pod2000m
wso2.deployment.wso2is.resources.jvm.heap.memory.xmsThe initial memory allocation for JVM

Deploy is-pattern-1 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has is-pattern-1 on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartis-pattern-1 is pinned at v6.0.0-1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply