ibm-unified-console
by Helm
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.shscript under./ibm_cloud_pak/pak_extensionsand proceed to install the charts. The usage ofdeploy_console.shis:
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.
| Parameter | Description | Default |
|---|---|---|
| consoleArch | In RHOS standalone, console will use ui_separate arch | ui_separate |
| image.pullPolicy | Always, Never, or IfNotPresent. | IfNotPresent |
| ucui.image.repository | This container carries console UI. | icr.io/obs/hdm/db2u/unified-console-zdtproxy |
| ucui.image.tag | The UI container tag that used to pull the version of the needed container. | rhos-db2u-56-x86_64 |
| ucui.resources.requests.memory | Memory request for the UI. | 500Mi |
| ucui.resources.requests.cpu | CPU request for the UI. | 300m |
| ucui.resources.limits.memory | Memory limit for the UI. | 1Gi |
| ucui.resources.limits.cpu | CPU limit for the UI. | 0.5 |
| ucui.service.httpsPort | UI service https port. | 8443 |
| ucui.service.httpsPort2 | UI service https port2. | 443 |
| ucui.service.type | UI service type. | ClusterIP |
| ucui.service.name | UI service name. | "" |
| ucapi.image.repository | This container carries console API. | icr.io/obs/hdm/db2u/unified-console |
| ucapi.image.tag | The API container tag that used to pull the version of the needed container. | rhos-db2u-56-x86_64 |
| ucapi.resources.requests.memory | Memory request for the API. | 4Gi |
| ucapi.resources.requests.cpu | CPU request for the API. | 2 |
| ucapi.resources.limits.memory | Memory limit for the API. | 4Gi |
| ucapi.resources.limits.cpu | CPU limit for the API. | 2 |
| ucapi.service.httpsPort | API service https port. | 11081 |
| ucapi.service.type | API service type. | ClusterIP |
| ucapi.service.name | API service name. | "" |
| serviceAccountName | Console used service account name. | db2u |
| useConfigMap | Whether console will use configmap to mapping env to pod. | true |
| configMapName | If useConfigMap is true, console will use this value as configmap name. | "" |
| dataServer.ldap.rootPwdSecretName | Console share ldap root password secret name with Db2. | "" |
| dataServer.metadb.pwdSecretName | Console share Db2 function ID password secret name with Db2. | "" |
| dataServer.metadb.db2iadm1GroupId | User in console pod will use same Group ID as Db2 . | 1000 |
| dataServer.sharedPVC.enabled | Console will share PVC with Db2 service in most scenario . | true |
| dataServer.sharedPVC.name | Shared PVC name. | "" |
| dataServer.sharedPVC.mountRootPath | Shared PVC mount root path. | "/mnt/pv/uc_dsserver_shared" |
| dataServer.sharedPVC.subPath.downloads | Download folder subpath. | "downloads" |
| dataServer.sharedPVC.subPath.config | Config folder subpath. | "uc_config" |
| dataServer.sharedPVC.subPath.userHome | User home folder subpath. | "home" |
| logToStdoutStderr | Redirect 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-unified-console is pinned at v1.3.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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