Perform Local Installation
In this section, you will install GoodData.CN on your local Kubernetes cluster. You will configure the installation with the necessary settings, deploy the required Docker images, and use Helm to set up GoodData.CN in your local environment.
Configure Installation
In this section, you will configure the necessary settings for your GoodData.CN installation. For a default setup, you only need to create a namespace, set up encryption keys, and add your license key.
Steps:
Create a namespace for GoodData.CN:
kubectl apply -f - << END apiVersion: v1 kind: Namespace metadata: name: gooddata-cn labels: kubernetes.io/metadata.name: gooddata-cn ENDCreate a installation configuration file
customized-values.yaml. In the following steps you will add specific configuration settings to this file.Prepare keyset for metadata encryption:
Create a new keyset using Tinkey and output it into a
output_keyset.jsonfile:tinkey create-keyset --key-template AES256_GCM --out output_keyset.jsonCreate a Kubernetes secret from the generated keyset:
kubectl -n gooddata-cn create secret generic gdcn-encryption --from-file keySet=output_keyset.jsonAdd the following snippet to
customized-values.yaml:metadataApi: encryptor: existingSecret: gdcn-encryption
Create a secret using your GoodData.CN license key:
kubectl -n gooddata-cn create secret generic gooddata-cn-license --from-literal=license=key/eyJhY2NvdW50I_a_very_long_string_GfMjaRJZcg==Add the following snippet to
customized-values.yaml:license: existingSecret: gooddata-cn-licenseFor the purposed of this local installation, also add the following lines to
customized-values.yaml:Reduce the number of replicas to 1 to reduce resource usage for local testing:
replicaCount: 1Specify the Docker registry prefix for local images:
image: repositoryPrefix: "k3d-registry:5000"Disable unnecessary components for local testing:
deployVisualExporter: false
Finalize your
customized-values.yamlfile, if you followed the installation instructions exactly, your file should look like this:metadataApi: encryptor: existingSecret: gdcn-encryption license: existingSecret: gooddata-cn-license replicaCount: 1 image: repositoryPrefix: "k3d-registry:5000" deployVisualExporter: false
Perform Installation
Having prepared the customized-values.yaml file with all necessary configurations, you can proceed with the installation of GoodData.CN using Helm.
Steps:
Before installing GoodData.CN, you need to transfer necessary Docker images to your local registry. Create file
imgcp.shand add the following script to it that automates the process of pulling, tagging, and pushing required images:#!/bin/bash IMAGE_TAG="3.13.0" REGISTRY="localhost:5000" IMAGES=( "afm-exec-api" "api-gateway" "auth-service" "calcique" "export-controller" "metadata-api" "result-cache" "scan-model" "sql-executor" "tabular-exporter" "apidocs" "dex" "organization-controller" "tools" "analytical-designer" "dashboards" "home-ui" "ldm-modeler" "measure-editor" "web-components" "quiver" "automation" ) img_cp() { image=$1 docker pull "gooddata/$image:$IMAGE_TAG" docker tag "gooddata/$image:$IMAGE_TAG" "$REGISTRY/$image:$IMAGE_TAG" docker push "$REGISTRY/$image:$IMAGE_TAG" } for image in "${IMAGES[@]}"; do img_cp "$image" & done waitRun the
imgcp.shscript to transfer the Docker images to your local registry:bash imgcp.shAdd the official GoodData Helm repository to your Helm configuration:
helm repo add gooddata https://charts.gooddata.com/ helm repo updateInstall GoodData.CN into your Kubernetes cluster, augmenting its configuration using values from your prepared
customized-values.yamlfile:helm install gooddata-cn gooddata/gooddata-cn --namespace gooddata-cn -f customized-values.yamlMonitor the status of GoodData.CN pods to ensure they are up and running correctly:
kubectl -n gooddata-cn get podsEnsure all the pods are ready or completed before continuing:
NAME READY STATUS RESTARTS AGE gooddata-cn-afm-exec-api-79c447f4dc-fr72k 1/1 Running 0 3m28s gooddata-cn-analytical-designer-bc9cbf8bc-f5dd9 1/1 Running 0 3m25s gooddata-cn-api-gateway-76c66d4859-qvd9k 1/1 Running 0 3m25s gooddata-cn-apidocs-7f9f46c9d9-79gpn 1/1 Running 0 3m28s gooddata-cn-auth-service-765c7fb5c8-jhrpg 1/1 Running 0 3m28s gooddata-cn-automation-766c7d7f85-fgcrj 1/1 Running 0 3m26s gooddata-cn-calcique-7c8d96dcf9-hl9g9 1/1 Running 0 3m28s gooddata-cn-dashboards-85fc644588-m9xpb 1/1 Running 0 3m28s gooddata-cn-db-pgpool-5f8c95c5dd-b8wpf 1/1 Running 0 3m26s gooddata-cn-db-pgpool-5f8c95c5dd-sscwk 1/1 Running 0 3m26s gooddata-cn-db-postgresql-0 2/2 Running 0 3m28s gooddata-cn-db-postgresql-1 2/2 Running 0 3m28s gooddata-cn-db-postgresql-2 2/2 Running 0 3m28s gooddata-cn-dex-6b854b5c6b-mkvk7 1/1 Running 0 3m25s gooddata-cn-etcd-0 1/1 Running 0 3m28s gooddata-cn-etcd-1 1/1 Running 0 3m28s gooddata-cn-etcd-2 1/1 Running 0 3m28s gooddata-cn-export-controller-789cd75ff-bb7xb 1/1 Running 0 3m26s gooddata-cn-home-ui-7f996b7685-7bl5g 1/1 Running 0 3m27s gooddata-cn-ldm-modeler-6c9c896f45-848fv 1/1 Running 0 3m27s gooddata-cn-measure-editor-665cd64764-jlwpt 1/1 Running 0 3m28s gooddata-cn-metadata-api-7fcfdcfdd7-nq6wn 1/1 Running 0 3m25s gooddata-cn-organization-controller-8d9469758-hkxnt 1/1 Running 0 3m28s gooddata-cn-quiver-cache-75ffb8fc7d-829rt 1/1 Running 0 3m27s gooddata-cn-quiver-ml-7564c59c5b-ptsgl 1/1 Running 0 3m25s gooddata-cn-quiver-xtab-6d789b884b-644vl 1/1 Running 0 3m28s gooddata-cn-redis-ha-server-0 4/4 Running 0 3m27s gooddata-cn-redis-ha-server-1 4/4 Running 0 2m12s gooddata-cn-redis-ha-server-2 4/4 Running 0 84s gooddata-cn-result-cache-745d44577c-r5kw7 1/1 Running 0 3m28s gooddata-cn-scan-model-66f86b4777-hj4dp 1/1 Running 0 3m28s gooddata-cn-sql-executor-74c448985c-94b58 1/1 Running 0 3m27s gooddata-cn-tabular-exporter-8ffdfd79f-rdpzb 1/1 Running 0 3m26s gooddata-cn-tools-7785cd494c-v7sgc 1/1 Running 0 3m26s gooddata-cn-web-components-646cf5b4c8-spg6b 1/1 Running 0 3m28sIf any pods are in an
ErrororCrashLoopBackOffstate, you may need to check the logs to diagnose and resolve any issues. To get more details about a specific pod, you can use the following command:kubectl -n gooddata-cn describe pod <pod-name>And to check the logs of a specific pod, use:
kubectl -n gooddata-cn logs <pod-name>