Compared with 9.8.0.3.5, GCDW 9.8.0.4.1 from GBASE adds multi-tenant support, and its configuration changed accordingly. GCDW is the China-domestically developed cloud data warehouse built on the GBase 8a MPP database, deployed here on Kubernetes through a Helm chart. This post walks through the new values.yaml settings.
The main configuration file: values.yaml
multiTenantMode
Enables multi-tenant mode. A tenant is the account used when registering in the cloud console — do not confuse it with the administrator username. Users belong to an account, and one account can have many users.
In multi-tenant mode every account/tenant gets its own namespace. The older 9.8.0.3.5 release used a single default namespace, gcdw.
Here is the resource usage of one gcdw401 tenant. Each tenant runs its own management service (gcware), coordinator service (coordinator) and compute service (in this example two warehouses):
[root@k8s-81 chart]# kubectl get all -n gcdw401 -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/coordinator-1-0 1/1 Running 0 16h 10.244.1.77 k8s-82 <none> <none> pod/gcware-0 1/1 Running 0 16h 10.244.0.121 k8s-81 <none> <none> pod/s2-c1-0 1/1 Running 0 15h 10.244.0.122 k8s-81 <none> <none> pod/s2-c1-1 1/1 Running 0 15h 10.244.1.78 k8s-82 <none> <none> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/coordinator-1 NodePort 10.106.135.43 <none> 5258:32195/TCP 16h app=gcdw,index=1,service=coordinator,tenant=gcdw401 service/gcware ClusterIP None <none> 5919/TCP 16h app=gcdw,service=gcware,tenant=gcdw401 service/s2-c1 ClusterIP 10.97.170.191 <none> 5050/TCP 15h app=gcdw,service=warehosue,tenant=gcdw401,wh_name=s2-c1 NAME READY AGE CONTAINERS IMAGES statefulset.apps/coordinator-1 1/1 16h coordinator 172.16.3.249:8443/gcdw/gcdw-server:9.8.0.4.1 statefulset.apps/gcware 1/1 16h gcware 172.16.3.249:8443/gcdw/gcdw-server:9.8.0.4.1 statefulset.apps/s2-c1 2/2 15h s2-c1 172.16.3.249:8443/gcdw/gcdw-server:9.8.0.4.1 [root@k8s-81 chart]# Below are the default gcdw namespace and two tenant namespaces (gcdwb5 and gcdw401). The cloud front end and back end, operator, redis and ftp services all run in the default gcdw namespace; everything else belongs to the tenants themselves:
[root@k8s-81 chart]# kubectl get pod -n gcdw -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES gcdw-ftp-0 1/1 Running 0 15h 10.244.2.55 k8s-83 <none> <none> gcdw-operator-67cf7c7bf7-dfhkd 1/1 Running 0 15h 10.244.1.84 k8s-82 <none> <none> gcdw-redis-0 1/1 Running 0 15h 10.244.2.56 k8s-83 <none> <none> gcdw-saas-backend-0 1/1 Running 0 15h 10.244.2.54 k8s-83 <none> <none> gcdw-saas-frontend-0 1/1 Running 0 15h 10.244.2.57 k8s-83 <none> <none> [root@k8s-81 chart]# kubectl get pod -n gcdw401 -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES coordinator-1-0 1/1 Running 0 16h 10.244.1.77 k8s-82 <none> <none> gcware-0 1/1 Running 0 16h 10.244.0.121 k8s-81 <none> <none> s2-c1-0 1/1 Running 0 16h 10.244.0.122 k8s-81 <none> <none> s2-c1-1 1/1 Running 0 16h 10.244.1.78 k8s-82 <none> <none> [root@k8s-81 chart]# kubectl get pod -n gcdwb5 -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES coordinator-1-0 1/1 Running 0 15h 10.244.0.124 k8s-81 <none> <none> gcware-0 1/1 Running 0 15h 10.244.2.48 k8s-83 <none> <none> [root@k8s-81 chart]# Multi-tenant mode needs an extra image registry configuration. If the registry requires authentication, set a username and password too:
# Tenant mode for gcdw, true: multiple-tenant; false: single-tenant multiTenantMode: enabled: true imageRegistry: server: "172.16.3.249:8443" username: "admin" password: "XXXXX" FoundationDB metadata
Only one parameter remains, fdb_cluster:
# fdb setting metadata: fdb_cluster: "QdBWBJdf:S6QntDRlFdhyBstGIZnnQd6vVjf0ytAB@10.0.2.81:4500,10.0.2.82:4500,10.0.2.83:4500" Kerberos setting
The config suggests kerberos authentication is supported, though this new feature was not tested here:
# kerberos setting kerberos: enabled: true Namespace label setting
Not tested. Judging by the name, it looks like a prefix used to avoid collisions between newly created namespaces and existing ones:
# # Namespace label setting # namespaceLabel: "Organization=gcdw" A complete values.yaml sample
Memory, CPU and replica counts have been reduced to their minimum values here:
[root@k8s-81 chart]# cat values.yaml # Default values for gcdw. # This is a YAML-formatted file. # Declare variables to be passed into your templates. global: # images setting image: registry: "172.16.3.249:8443" pullPolicy: Always imagePullSecrets: "gcdw-regcred" # Tenant mode for gcdw, true: multiple-tenant; false: single-tenant multiTenantMode: enabled: true imageRegistry: server: "172.16.3.249:8443" username: "admin" password: "XXXXXX" # fdb setting metadata: fdb_cluster: "QdBWBJdf:S6QntDRlFdhyBstGIZnnQd6vVjf0ytAB@10.0.2.81:4500,10.0.2.82:4500,10.0.2.83:4500" # persistant storage setting for gcware storage: enabled: false storageClass: "" storageSize: "" # logging system setting logging: enabled: false filebeatImage: "" filebeatOutput: output.elasticsearch: hosts: - "" username: "" password: "" index: 'gcdw-${MY_POD_NAMESPACE}-${MY_POD_NAME}-log-%{+yyyy.MM.dd}' logrotateImage: "gcdw/gcdw-logrotate" # node affinity setting nodeAffinitySchedule: cloudServiceAffinity: key: cloudService value: gcdw coordiantorServiceAffinity: key: coordinatorService value: gcdw warehouseServiceAffinity: key: warehouseService value: gcdw # kerberos setting kerberos: enabled: true # # Namespace label setting # namespaceLabel: "Organization=gcdw" # gcdw operator values------------- operator: enabled: true image: repository: gcdw/gcdw-operator tag: 9.8.0.4.1 replicas: 1 leaderElect: true resources: requests: cpu: 1 memory: 1Gi limits: cpu: 2 memory: 2Gi # gcdw server values------------------- server: image: repository: gcdw/gcdw-server tag: 9.8.0.4.1 gcware_replicas: 1 coordinator_replicas: 1 gcware_resource: request: cpu: "1" mem: "1Gi" limit: cpu: "4" mem: 4Gi coordinator_resource: request: cpu: "1" mem: 1Gi limit: cpu: "4" mem: 16Gi warehouse_resource: request: cpu: "1" mem: 1Gi limit: cpu: "16" mem: 32Gi # gcdw saas values-------------------- saas: enabled: true # set time zone env for saas-backend TZ: "Asia/Shanghai" image: frontend: repository: gcdw/clound-database-frontend tag: 9.8.0.4.1 backend: repository: gcdw/clound-database-backend tag: 9.8.0.4.1 redis: repository: gcdw/redis tag: latest vsftpd: repository: gcdw/vsftpd tag: latest replicas: frontend: 1 backend: 1 redis: 1 vsftpd: 1 webServicePort: 32144 Going forward, check the tenant-to-namespace mapping before any upgrade of a gbase deployment, because the shared services stay in the default namespace while every tenant gets its own coordinator and warehouse. Keep that layout in the runbook so the database team never points a tenant's connection at a gbase coordinator belonging to another account.