ibm-unified-console

by Helm

Helm chartv1.3.1App 1.4.0Apache-2.0

IBM Unified Console

About this chart

Unified Console

Unified Console on RHOS

Introduction

This doc describes how to install Console in the same namespace with existing Db2(Warehouse or AESE).

User can access console via route generated by script.

Chart Details

This chart will do the following:

  • Deploy console api and console ui.
  • Share existing PVC with Db2

Prerequisites

  • Kubernetes Level - ">=1.11.3"
  • Helm Level - ">=2.14.0" "<3.0" (https://blog.openshift.com/getting-started-helm-openshift/)
  • OpenShift Version - "3.11, 4.3"
  • Db2 Warehouse or AESE installed in the same cluster with LDAP service enabled

Resources Required

  • Minimum 2.3 vCPU (2 for the Console api and 0.3 for Console ui services)
  • Minimum 4.5 GiB Memory (4GiB for the Console api and 0.5GiB for Console ui services) Note: To convert GiB to GB, multiply the GiB value by 1.048.

Reference

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-privileged-scc or the SecurityContextConstraints defined in Db2 Warehouse/AESE has been verified for this chart, if your target namespace is bound to SecurityContextConstraints resource above you can proceed to install the chart.

This chart also 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/scripts in the pak_extension pre-install directory.

  • From the user interface, you can copy and paste the following snippets to enable the custom SecurityContextConstraints
    • Custom SecurityContextConstraints definition:
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
  name: uc-scc
allowHostDirVolumePlugin: true
allowHostIPC: true
allowHostNetwork: false
allowHostPID: false
allowHostPorts: true
# privileged container is only needed for the init container that sets kernel parameters
allowPrivilegedContainer: true
allowedCapabilities:
- "SYS_RESOURCE"
- "IPC_OWNER"
- "SYS_NICE"
# Default capabilities add by docker if not drop.
- "CHOWN"
- "DAC_OVERRIDE"
- "FSETID"
- "FOWNER"
- "SETGID"
- "SETUID"
- "SETFCAP"
- "SETPCAP"
- "NET_BIND_SERVICE"
- "SYS_CHROOT"
- "KILL"
- "AUDIT_WRITE"
priority: 10
runAsUser:
    type: RunAsAny
seLinuxContext:
    type: MustRunAs
fsGroup:
    type: RunAsAny
supplementalGroups:
    type: RunAsAny

PodSecurityPolicy Requirements

This chart requires the same PodSecurityPolicy ibm-privileged-psp defined for Db2 RHOS standalone.

Custom PodSecurityPolicy definition:

No Custom PSP is Defined for Unified Console for the current release

Installing the Chart

  • Switch to the Db2 project.
# oc project <project name>
  • Locate deploy_console.sh script under ./ibm_cloud_pak/pak_extensions and proceed to install the charts. The usage of deploy_console.sh is:
Usage: ./deploy-console.sh --console-release-name STRING --db-release-name STRING [OTHER ARGUMENTS...]

    Install arguments:
        --console-release-name STRING       release name for helm (required)
        --db-release-name STRING            existing Db2 helm release name (required)
        --image-secret-name STRING          secret for image pull
    
    Helm arguments:
        --tls                               enable TLS for request

Example:

# cd ./ibm_cloud_pak/pak_extensions
# ./deploy_console.sh \
      --console-release-name myuc \
      --db-release-name mydb \

Once the api pod ibm-unified-console-api and ui pod ibm-unified-console-ui both in the Ready 1/1 State Running, installation complete. Example:

NAME                                           READY     STATUS
myuc-ibm-unified-console-api-d7f9958fb-jvjbw   1/1       Running   
myuc-ibm-unified-console-ui-5c758bb784-wxwjh   1/1       Running   

Uninstall the Chart

To delete the deployment:

# helm delete <console-release-name> --purge
  • enable tls:
# helm delete <console-release-name> --purge --tls

Configuration

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

ParameterDescriptionDefault
consoleArchIn RHOS standalone, console will use ui_separate archui_separate
image.pullPolicyAlways, Never, or IfNotPresent.IfNotPresent
ucui.image.repositoryThis container carries console UI.icr.io/obs/hdm/db2u/unified-console-zdtproxy
ucui.image.tagThe UI container tag that used to pull the version of the needed container.rhos-db2u-56-x86_64
ucui.resources.requests.memoryMemory request for the UI.500Mi
ucui.resources.requests.cpuCPU request for the UI.300m
ucui.resources.limits.memoryMemory limit for the UI.1Gi
ucui.resources.limits.cpuCPU limit for the UI.0.5
ucui.service.httpsPortUI service https port.8443
ucui.service.httpsPort2UI service https port2.443
ucui.service.typeUI service type.ClusterIP
ucui.service.nameUI service name.""
ucapi.image.repositoryThis container carries console API.icr.io/obs/hdm/db2u/unified-console
ucapi.image.tagThe API container tag that used to pull the version of the needed container.rhos-db2u-56-x86_64
ucapi.resources.requests.memoryMemory request for the API.4Gi
ucapi.resources.requests.cpuCPU request for the API.2
ucapi.resources.limits.memoryMemory limit for the API.4Gi
ucapi.resources.limits.cpuCPU limit for the API.2
ucapi.service.httpsPortAPI service https port.11081
ucapi.service.typeAPI service type.ClusterIP
ucapi.service.nameAPI service name.""
serviceAccountNameConsole used service account name.db2u
useConfigMapWhether console will use configmap to mapping env to pod.true
configMapNameIf useConfigMap is true, console will use this value as configmap name.""
dataServer.ldap.rootPwdSecretNameConsole share ldap root password secret name with Db2.""
dataServer.metadb.pwdSecretNameConsole share Db2 function ID password secret name with Db2.""
dataServer.metadb.db2iadm1GroupIdUser in console pod will use same Group ID as Db2 .1000
dataServer.sharedPVC.enabledConsole will share PVC with Db2 service in most scenario .true
dataServer.sharedPVC.nameShared PVC name.""
dataServer.sharedPVC.mountRootPathShared PVC mount root path."/mnt/pv/uc_dsserver_shared"
dataServer.sharedPVC.subPath.downloadsDownload folder subpath."downloads"
dataServer.sharedPVC.subPath.configConfig folder subpath."uc_config"
dataServer.sharedPVC.subPath.userHomeUser home folder subpath."home"
logToStdoutStderrRedirect logs to stdout.true

How to access console

User can access console via route.

# oc get route |grep <console-release-name> |awk '{print $2}'

Example:

# oc get route |grep myuc |awk '{print $2}'

Now user can access console via the URL https://<route>.

Login user and password

Use existing LDAP user&password to login, please refer create new LDAP user step in IBM Db2 Warehouse chart or IBM Db2 chart.

Here are steps to get default user bluadmin password:

oc rsh $(oc get po | grep ldap | cut -d " " -f 1) /bin/bash
source /opt/ibm/lib/utils.sh
get_user_password bluadmin

Example output

OUSLcLGP5z1mKyzyAjPY8RSum

Now you can use the below login information to login.

Username: bluadmin
Password: OUSLcLGP5z1mKyzyAjPY8RSum 

Limitations

Deploy ibm-unified-console with OpenTenant

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