ibm-websphere-traditional

by Helm

Helm chartv1.3.0App 9.0.5.0Apache-2.0

WebSphere Application Server Base Edition

About this chart

IBM WebSphere Application Server traditional

Encapsulates Helm chart and other cloud pak artifacts for WebSphere Application Server traditional.

Introduction

This chart deploys IBM WebSphere Application Server traditional Base edition. WebSphere Application Server traditional excels as the foundation for a service-oriented architecture. Version 9.0 offers support for Java™ SE 8 and Java EE 7 technology and several enhancements.

Chart Details

This chart will install the following:

Prerequisites

If you prefer to install from the command prompt, you will need:

  • The cloudctl, kubectl and helm commands available.
  • Your environment configured to connect to the target cluster.

The installation environment has the following prerequisites:

  • Kubernetes version 1.9.0.
  • PersistentVolume support in the underlying infrastructure if logs.persistLogs is set to true (See "Create Persistent Volumes" below).

PodSecurityPolicy Requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. Choose either a predefined PodSecurityPolicy or have your cluster administrator create a custom PodSecurityPolicy for you:

  • Predefined PodSecurityPolicy name: ibm-restricted-psp
  • Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
  name: ibm-websphere-traditional-psp
spec:
  allowPrivilegeEscalation: false
  forbiddenSysctls:
  - '*'
  fsGroup:
    ranges:
    - max: 65535
      min: 1
    rule: MustRunAs
  requiredDropCapabilities:
  - ALL
  runAsUser:
    rule: MustRunAsNonRoot
  seLinux:
    rule: RunAsAny
  supplementalGroups:
    ranges:
    - max: 65535
      min: 1
    rule: MustRunAs
  volumes:
  - configMap
  - emptyDir
  - projected
  - secret
  - downwardAPI
  - persistentVolumeClaim
  • Custom ClusterRole for the custom PodSecurityPolicy:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ibm-websphere-traditional-clusterrole
rules:
- apiGroups:
  - extensions
  resourceNames:
  - ibm-websphere-traditional-psp
  resources:
  - podsecuritypolicies
  verbs:
  - use

Configuration scripts can be used to create the required resources

Download the following scripts located at /ibm_cloud_pak/pak_extensions/pre-install directory.

  • The pre-install instructions are located at clusterAdministration/createSecurityClusterPrereqs.sh for cluster admins to create the PodSecurityPolicy and ClusterRole for all releases of this chart.

  • The namespace scoped instructions are located at namespaceAdministration/createSecurityNamespacePrereqs.sh for team admin/operator to create the RoleBinding for the namespace. This script takes one argument; the name of a pre-existing namespace where the chart will be installed.

    • Example usage: ./createSecurityNamespacePrereqs.sh myNamespace

Configuration scripts can be used to clean up resources created

Download the following scripts located at /ibm_cloud_pak/pak_extensions/post-delete directory.

  • The post-delete instructions are located at clusterAdministration/deleteSecurityClusterPrereqs.sh for cluster admins to delete the PodSecurityPolicy and ClusterRole for all releases of this chart.

  • The namespace scoped instructions are located at namespaceAdministration/deleteSecurityNamespacePrereqs.sh for team admin/operator to delete the RoleBinding for the namespace. This script takes one argument; the name of the namespace where the chart was installed.

    • Example usage: ./deleteSecurityNamespacePrereqs.sh myNamespace

Red Hat OpenShift SecurityContextConstraints Requirements

This chart requires a SecurityContextConstraints to be bound to the target namespace prior to installation. To meet this requirement there may be cluster scoped as well as namespace scoped pre and post actions that need to occur.

The predefined SecurityContextConstraints name: ibm-restricted-scc has been verified for this chart, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.

This chart defines a custom SecurityContextConstraints which can be used to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom SecurityContextConstraints resource using the supplied instructions or scripts in the pak_extensions/pre-install directory.

  • From the user interface, you can copy and paste the following snippets to enable the custom SecurityContextConstraints

    • Custom SecurityContextConstraints definition:
    apiVersion: security.openshift.io/v1
    kind: SecurityContextConstraints
    metadata:
      annotations:
      name: ibm-websphere-traditional-scc
    allowHostDirVolumePlugin: false
    allowHostIPC: false
    allowHostNetwork: false
    allowHostPID: false
    allowHostPorts: false
    allowPrivilegedContainer: false
    allowedCapabilities: []
    allowedFlexVolumes: []
    defaultAddCapabilities: []
    fsGroup:
      type: MustRunAs
      ranges:
      - max: 65535
        min: 1
    readOnlyRootFilesystem: false
    requiredDropCapabilities:
    - ALL
    runAsUser:
      type: MustRunAsNonRoot
    seccompProfiles:
    - docker/default
    seLinuxContext:
      type: RunAsAny
    supplementalGroups:
      type: MustRunAs
      ranges:
      - max: 65535
        min: 1
    volumes:
    - configMap
    - downwardAPI
    - emptyDir
    - persistentVolumeClaim
    - projected
    - secret
    priority: 0
    
  • From the command line, you can run the setup scripts included under pak_extensions/pre-install

    As a cluster admin the pre-install instructions are located at:

    • pre-install/clusterAdministration/createSecurityClusterPrereqs.sh

    As team admin the namespace scoped instructions are located at:

    • pre-install/namespaceAdministration/createSecurityNamespacePrereqs.sh

Docker Image Requirements

The Helm chart requires the Docker image to have certain directory linked. The ibmcom/websphere-traditional image from Docker Hub already has the expected links. If you are not extending from this image, you must add the following to your Dockerfile:

RUN ln -s /opt/IBM/WebSphere/AppServer/profiles/${PROFILE_NAME}/logs /logs \
  && chown $USER:$GROUP /logs

The Helm chart also assumes that the Docker image has a startup script that looks for properties files inside /etc/websphere and automatically applies them to the application server. The ibmcom/websphere-traditional image from Docker Hub already has this script.

If you are using Docker registries that require credentials please see the image.pullSecrets parameter below for instructions on how to prepare the secret for installation

Internal (In Cluster) Network Encryption - Recommended

Use IPSec between the nodes in your cluster to ensure all internal connections are encrypted. More details can be found at Encrypting cluster data network traffic with IPsec

Resources Required

This chart has the following minimum resource requirements per pod by default: 0.5 CPU 1 GiB memory

See System Requirements for WebSphere Application Server v9.0 and Preparing the operating system for product installation for more information.

Installing the Chart

There are three steps to run your application on IBM WebSphere Application Server traditional in your environment:

  • Create an application image based on IBM WebSphere Application Server traditional
  • Create persistent volumes (Optional)
  • Install the Helm chart

Create Persistent Volumes

Persistence is not enabled by default so no persistent volumes are required. If you are not using persistence, you can skip this section.

Enable persistence if you want logs generated by the server to be retained in the event of a restart. If persistence is enabled, one physical volume will be required for each instance of the server.

To create physical volumes, you must have the Cluster administrator role.

You can find more information about storage requirements below.

For volumes that support ownership management, specify the group ID of the group owning the persistent volumes' file systems using the persistence.fsGroupGid parameter.

Create an application image

You need to create an application image that extends from the base IBM WebSphere Application Server traditional image found on Docker Hub. You can find detailed information on this process on the official GitHub page.

Install the Helm chart

Add the IBM Cloud Private internal Helm repository called local-charts to the Helm CLI as an external repository, as described here.

Install the chart, specifying the release name and namespace with the following command:

helm install --name <release_name> --namespace=<namespace_name> ibm-websphere-traditional --tls

NOTE: The release name should consist of lower-case alphanumeric characters and not start with a digit or contain a space.

The command deploys IBM WebSphere Application Server traditional on the Kubernetes cluster with the default configuration.

The Configuration lists the parameters that can be overridden during installation by adding them to the Helm install command as follows:

--set key=value[,key=value]

Verifying the Chart

See the instruction (from NOTES.txt within chart) after the helm installation completes for chart verification. The instruction can also be viewed by running the command: helm status my-release --tls.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release --purge --tls

This command removes all the Kubernetes components associated with the chart, except any persistent volume claims (PVCs) which is created when logs.persistLogs is set to true. This is the default behavior of Kubernetes, and ensures that valuable data is not deleted. In order to delete the server data, you can delete the PVC using the following command:

kubectl delete pvc my-pvc

Note: You can use kubectl get pvc to see the list of available PVCs.

Cleanup any pre-reqs that were created

If cleanup scripts were included in the pak_extensions/post-delete directory; run them to cleanup namespace and cluster scoped resources when appropriate.

Configuration

The following tables lists the configurable parameters of the IBM WebSphere Application Server traditional chart and their default values.

ParameterDescriptionDefault
replicaCountThe number of desired replica pods that run simultaneously1
image.repositoryDocker image repositoryibmcom/websphere-traditional
image.pullPolicyDocker image pull policy. Defaults to Always when the latest tag is specified.IfNotPresent
image.tagDocker image tag9.0.5.0
image.pullSecretsImage pull secrets, if using Docker registries that require credentials.[]
image.extraEnvsAdditional Environment Variables[]
image.extraVolumeMountsExtra Volume Mounts[]
image.securityConfigure the security attributes of the image{}
deployment.annotationsCustom deployment annotations{}
deployment.labelsCustom deployment labels{}
pod.annotationsCustom pod annotations{}
pod.labelsCustom pod labels{}
pod.extraVolumesAdditional Volumes for server pods.{}
pod.security

Deploy ibm-websphere-traditional with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-websphere-traditional 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 chartibm-websphere-traditional is pinned at v1.3.0 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