Helm 차트 배포

Tableau Server Helm 차트 - 배포

중요: 이 설명서에서는 Helm 및 Helm 차트에 대한 지식이 있다고 가정하며 상세한 설명적 예를 제공하지 않습니다. 설명서는 Tableau Server와 Helm 및 Helm 차트에 익숙한 고객을 대상으로 작성되었습니다.

이 항목에서는 Helm 차트를 사용하여 Kubernetes에 Tableau Server를 배포하는 개략적인 단계를 안내합니다.

필수 요건

시작하기 전에 필수 요건을 충족하는지 확인하십시오. 자세한 내용은 Tableau Server Helm 차트 - 필수 요건을 참조하십시오.

Helm 차트 다운로드

Helm 차트는 Tableau Server 컨테이너 설정 도구(tableau-server-container-setup-tool-<version>.tar.gz)의 일부로 제공되며, Tableau Server 다운로드 페이지에서 다운로드할 수 있습니다.

추출 후 필요한 Helm 차트 파일은 helm/tableau 디렉터리에 위치합니다.

Helm 차트를 사용하여 Tableau Server를 배포하는 방법에 대한 빠른 개요

중요: 다음은 Helm 차트를 사용하여 Tableau Server를 배포하는 방법에 대한 기본적이고 개략적인 설명입니다. 이는 전체 절차가 아닙니다. Helm 및 Helm 차트에 대한 지식이 있다는 것을 전제로 합니다.

시작하기 전에 Helm 차트를 사용하여 Tableau Server를 배포하기 위한 필수 요건을 충족하는지 확인하십시오. 자세한 내용은 Tableau Server Helm 차트 - 필수 요건을 참조하십시오.

values.yaml에 라이선스 키 추가

values.yaml을 편집하고 라이선스 키를 설정합니다.

단일 노드 Tableau Server 배포

명령 프롬프트에서 다음 명령을 실행하여 Tableau Server의 단일 노드 인스턴스를 배포하십시오. 참고로, <namespace>를 사용자의 릴리스 네임스페이스(예: tableau 또는 default)로 대체하십시오.

helm install tableau-server ./helm/tableau-server \
-n <namespace> \
--create-namespace \ -f ./helm/tableau-server/values-single.yaml

다중 노드 Tableau Server 배포

위와 동일한 네임스페이스 규칙을 사용하여 프롬프트에서 다음 명령을 실행하여 Server의 다중 노드 인스턴스를 배포합니다.

helm install tableau-server ./helm/tableau-server \
-n <namespace> \
--create-namespace \ -f ./helm/tableau-server/values-multinode.yaml

EKS 다중 노드 실행서(네임스페이스 + 정적 부트스트랩 PV)

이 섹션에서는 EKS의 작업 순서(전용 네임스페이스, EFS CSI 추가 기능, 노드 역할의 IAM, 정적 부트스트랩 PV 및 Helm)에 대해 설명합니다.

  1. 전용 네임스페이스를 만듭니다.

    부트스트랩 PV의 claimFef.namespace와 일치해야 합니다. 이 예에서는 tableau를 사용합니다.

    kubectl create namespace tableau-server
    kubectl get namespace tableau
  2. EFS CSI 부가기능이 존재하는지 확인합니다.

    부가기능이 없는 경우 새로 만들고 상태가 ACTIVE가 될 때까지 기다립니다.

    kubectl get csidriver efs.csi.aws.com
    aws eks describe-addon \
      --cluster-name <cluster-name> \  
      --addon-name aws-efs-csi-driver \
      --region <region> \
      --query 'addon.status'
  3. StorageClass를 확인합니다.

    efs-bootstrap StorageClass - 아직 없는 경우 적용합니다. 자세한 내용은 Amazon EKS(Elastic Kubernetes Service) 필수 요건을 참조하십시오.

    kubectl get csidriver efs.csi.aws.com
    aws eks describe-addon \
      --cluster-name <cluster-name> \  
      --addon-name aws-efs-csi-driver \
      --region <region> \
      --query 'addon.status'
  4. 정적 부트스트랩 PV를 확인합니다.

    claimRef는 Helm 차트에서 만드는 것과 동일한 네임스페이스 및 PVC 이름(tableau-server-bootstrap)을 참조합니다. fs-...를 EFS 파일 시스템 ID로 바꿉니다.

    cat > /tmp/tableau-bootstrap-pv.yaml <<'EOF'
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: tableau-bootstrap-pv
    spec:
      capacity:
        storage: 1Gi
      volumeMode: Filesystem
      accessModes:
        - ReadWriteMany
    persistentVolumeReclaimPolicy: Retain
    storageClassName: efs-bootstrap
    claimRef:
      namespace: tableau
      name: tableau-server-bootstrap
    csi:
      driver: efs.csi.aws.com
      volumeHandle: <fs-xxxxxxxxxxxxxxxxx>
    EOF
    kubectl apply -f /tmp/tableau-bootstrap-pv.yaml
    kubectl get pv tableau-bootstrap-pv
  5. 노드 인스턴스 역할의 IAM을 확인합니다.

    EFS 클라이언트 및 EC2 읽기 전용 정책을 연결합니다. 노드 그룹의 <your-node-instance-role>을 확인하려면 Amazon EKS(Elastic Kubernetes Service) 필수 요건을 참조하십시오.

    efs-bootstrap StorageClass - 아직 없는 경우 적용합니다. 자세한 내용은 Amazon EKS(Elastic Kubernetes Service) 필수 요건을 참조하십시오.

    kubectl get csidriver efs.csi.aws.com
    aws eks describe-addon \
      --cluster-name <cluster-name> \  
      --addon-name aws-efs-csi-driver \
      --region <region> \
      --query 'addon.status'
  6. 값

    values-multinode.yaml(또는 오버레이)에서 수동 정적 PV 모드를 설정합니다.

    persistence:
      bootstrap:
    createPV: false
    volumeName: tableau-bootstrap-pv
    storageClass: efs-bootstrap
  7. image.repository, image.tag를 확인합니다. 암호/라이선스는 필요에 따라 설정됩니다.

  8. Helm 차트를 설치합니다.

    PV claimRef와 동일한 네임스페이스에 차트를 설치합니다.

    helm install tableau-server ./helm/tableau-server \
      -n tableau \
    -f ./helm/tableau-server/values-multinode.yaml
  9. 저장소 및 포드를 확인합니다.

    kubectl get pv,pvc -n tableau
    kubectl get pods -n tableau -w
  10. 데이터 PVC 상태

    데이터 PVC는 EBS 볼륨이 연결될 때까지 잠시 Pending으로 표시될 수 있습니다. 모든 PVC는 Bound, Running을 거쳐 최종적으로 READY 1/1로 전환되어야 합니다.

  11. 토폴로지(선택 사항)

    설치 후 후크가 사용되지 않도록 설정된 경우 clustercontroller 노드를 설정하고 보류 중인 변경 내용을 적용해야 할 수 있습니다(이 문서 뒷부분의 설치 후 토폴로지 자동화(후크) 참조). 여러 Tableau 노드가 있는 경우 tsm pending-changes apply 명령을 실행하면 인덱스 및 검색 서버 배포 또는 조정 서비스 집합에 대한 경고가 발생할 수 있습니다. 인덱스 및 검색 서버와 Tableau Server 조정 서비스에 설명된 대로 이러한 경고를 해결하십시오.

사용자 지정 설치

  1. 값을 사용자 지정

    cp ./helm/tableau-server/values.yaml 
    ./helm/tableau-server/my-values.yaml
    # Edit ./helm/tableau-server/my-values.yaml with your configuration
  2. 사용자 지정 값을 사용하여 설치

    helm install tableau-server ./helm/tableau-server -f ./helm/tableau-server/my-values.yaml

구성

배포 모드

단일 노드 배포

단일 노드 배포는 Tableau Server를 단일 컨테이너로 실행합니다.

values-single.yaml을 사용하거나 다음과 같이 설정합니다.

deploymentMode: "single"
primary:
replicaCount: 1
worker:
replicaCount: 0

다중 노드 배포

다중 노드 배포는 하나의 주 작업자와 하나 이상의 작업자를 실행합니다. worker.replicaCount를 사용하여 작업자 수를 설정합니다. 1, 2 또는 클러스터 용량 및 Tableau 토폴로지에서 허용하는 더 높은 값을 사용합니다. 이 차트는 replicaCount: N에 대해 tableau-server-worker-0 … tableau-server-worker-(N-1)개를 만듭니다.

values-multinode.yaml을 사용(기본 예에서는 두 개의 작업자를 사용함)하거나, 다음과 같이 명시적으로 설정합니다.

deploymentMode: "multinode"
primary:
replicaCount: 1
worker:
replicaCount: 3 # example: three workers

토폴로지 정렬: values-multinode.yaml은 샘플 config.configJson 토폴로지(node1, node2, node3 등의 노드 ID)와 함께 제공됩니다. worker.replicaCount를 변경하거나 서비스를 다시 정렬하는 경우 TSM 노드의 수와 역할이 배포 환경과 일치하도록 토폴로지(및 관련 Tableau 프로세스 할당)를 업데이트해야 합니다. 클러스터링 및 프로세스 레이아웃에 대한 자세한 내용은 Tableau Server 도움말을 참조하십시오.

키 구성 옵션

이미지 구성

image:
repository: tableau_server_image
tag: "latest"
pullPolicy: IfNotPresent
pullSecrets: []

라이선스 및 암호

secrets:
  licenseKey: "YOUR-LICENSE-KEY"
tsmRemotePassword: "password"
tableauUsername: "admin"
tableauPassword: "password"

또는 환경 변수를 사용하여 설정할 수 있습니다.

env:
LICENSE_KEY: "YOUR-LICENSE-KEY"
TSM_REMOTE_PASSWORD: "password"
TABLEAU_USERNAME: "admin"
TABLEAU_PASSWORD: "password"

별도의 파일(예: secrets.yaml)을 사용하고 -f 스위치와 함께 전달하는 것이 좋습니다.

secrets.yaml:

secrets:
licenseKey: "YOUR-LICENSE-KEY"
tsmRemotePassword: "YOUR-TSM-PASSWORD"
tableauUsername: "YOUR-ADMIN-USER"
tableauPassword: "YOUR-ADMIN-PASSWORD"

secrets.yaml을 사용한 설치/업그레이드 예:

helm upgrade --install tableau-server ./helm/tableau-server \
-n default \
-f ./helm/tableau-server/values-multinode.yaml \
-f ./helm/tableau-server/secrets.yaml

참고: 기존 Kubernetes Secret(예: secrets.existingSecret)를 참조하는 것은 현재 지원되지 않습니다. 지원되는 유일한 방법은 별도의 암호 값 파일과 함께 차트 값을 사용하는 것입니다.

외부 PostgreSQL 리포지토리

Helm 차트는 전용 값 키를 사용하는 외부 리포지토리를 기본적으로 사용하도록 설정하지 않습니다.

다음 단계를 수행하여 외부 리포지토리를 사용하도록 설정하는 것이 좋습니다.

  1. 차트를 배포하고 주 차트가 정상적인지 확인합니다.

  2. 주 포드에서 Tableau tsm external repository 명령을 실행합니다.

  3. 보류 중인 변경 내용을 적용합니다.

워크플로우 예(명령 검색 및 적용):

# Discover command syntax for your Tableau version
kubectl exec -n default tableau-server-primary-0 -- sh -lc 'tsm topology external-services repository enable --help'
# After enabling external repository with Tableau-supported args/options:
kubectl exec -n default tableau-server-primary-0 -- sh -lc 'tsm pending-changes apply -iw --ignore-prompt'
kubectl exec -n default tableau-server-primary-0 -- sh -lc 'tsm status -v'

참고:

  • SSL 모드, 장애 조치 옵션, 자격 증명 필드 등 외부 리포지토리 구성은 Tableau 버전에 따라 다릅니다. 자세한 내용은 Tableau Server 외부 리포지토리 및 tsm topology를 참조하십시오.

  • 고객 배포의 경우, 데이터베이스 자격 증명을 Kubernetes Secret에 저장하고 셸 기록에 일반 텍스트를 사용하지 마십시오.

영구 저장소

persistence:
enabled: true
storageClass: "standard"
accessMode: ReadWriteOnce
size: 100Gi

# Bootstrap volume (required for multi-node)
bootstrap:
enabled: true
storageClass: "standard"
accessMode: ReadWriteMany
size: 1Gi
createPV: false

정적 EFS CSI를 사용하는 클러스터(예: mounttargetip)의 경우, Helm은 부트스트랩 PV와 PVC를 모두 관리할 수 있습니다.

persistence:
bootstrap:
enabled: true
storageClass: "efs-bootstrap"
accessMode: ReadWriteMany
size: 1Gi
createPV: true
permissionsFix:
enabled: true
pv:
name: "tableau-bootstrap-pv"
csi:
driver: efs.csi.aws.com
volumeHandle: "fs-xxxxxxxx"
volumeAttributes:
mounttargetip: "10.x.x.x"

permissionsFix.enabled는 Tableau 프로세스(UID/GID 999:998)가 기본적으로 root:root로 마운트되는 공유 EFS 마운트에 bootstrap.json을 쓸 수 있도록 chown/chmods /docker/config/bootstrap을 수행하는 초기화 컨테이너를 추가합니다.

createPV: true인 경우, 차트는 값(예: tableau-bootstrap-pv)을 기반으로 부트스트랩 PV를 만들고 tableau-server-bootstrap PVC를 여기에 바인딩합니다.

부트스트랩 PV를 수동으로 관리하는 경우 tableau-bootstrap-pv를 먼저 만들고 createPV: false 및 volumeName: tableau-bootstrap-pv:를 사용하여 Helm을 설치합니다.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: tableau-bootstrap-pv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: efs-bootstrap
  csi:
    driver: efs.csi.aws.com
    volumeHandle: fs-xxxxxxxx
    volumeAttributes:
      mounttargetip: 10.x.x.x
kubectl apply -f tableau-bootstrap-pv.yaml
kubectl get pv tableau-bootstrap-pv

리소스 제한

primary:
  resources:
    limits:
      cpu: "4"
      memory: "8Gi"
    requests:
      cpu: "2"
      memory: "4Gi"

worker:
  resources:
    limits:
      cpu: "4"
      memory: "8Gi"
    requests:
      cpu: "2"
      memory: "4Gi"

서비스 구성

service:
  primary:
    type: ClusterIP  # or NodePort, LoadBalancer
    ports:
      http: 80
      https: 8080
      tsm: 8850

Ingress

ingress:
  enabled: true
  className: "nginx"
  hosts:
    - host: tableau.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: tableau-tls
      hosts:
        - tableau.example.com

Ingress 설치 실행서(예: NGINX Ingress 컨트롤러)

  1. 클러스터에 Ingress 컨트롤러를 설치합니다(Ingress 차트를 사용하도록 설정하기 전에 필요).

  2. 값 파일에서 Ingress 값을 설정합니다.

    ingress:
    enabled: true
    className: "nginx"
    annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "64m"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
    hosts:
    - host: tableau.example.com
    paths:
    - path: /
    pathType: Prefix
    tls:
    - secretName: tableau-tls
    hosts:
    - tableau.example.com
  3. tableau.example.com을 Ingress/LoadBalancer 끝점으로 연결하는 DNS 레코드를 만듭니다.

  4. 릴리스 네임스페이스에서 TLS 암호를 만들거나 cert-manager를 사용합니다.

  5. 차트를 배포/업그레이드하고 Ingress를 확인합니다.

    helm upgrade --install tableau-server ./helm/tableau-server -n default -f ./helm/tableau-server/values.yaml
    kubectl get ingress -n default
    kubectl describe ingress tableau-server

자세한 내용은 다음을 참조하십시오.

상태 검사

차트는 시작, 실행 상태 및 준비 상태 프로브를 지원합니다. 시작 프로브는 실행 상태/준비 상태가 실행되기 전에 최초 초기화가 오랜 기간 소요되는 것(예: failureThreshold: 200 x periodSeconds)을 허용합니다.

healthChecks:
  startup:
    enabled: true
    initialDelaySeconds: 300
    periodSeconds: 15
    timeoutSeconds: 30
    failureThreshold: 200
  liveness:
    enabled: true
    initialDelaySeconds: 300
    periodSeconds: 30
    timeoutSeconds: 10
    failureThreshold: 3
  readiness:
    enabled: true
    initialDelaySeconds: 300
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 3

다중 노드 작업자 포드의 경우 작업자가 제한된 프로세스 집합(예: 관리 에이전트 + 클러스터 컨트롤러만 해당)을 실행할 때 잘못된 프로브 실패를 방지하기 위해 차트는 기본적으로 worker.healthChecks.enabled: false로 설정합니다.

사용법

Tableau Server 액세스

설치 후에는 서비스 구성을 기반으로 Tableau Server에 액세스합니다.

  • ClusterIP: 포트 전달 또는 Ingress 사용

  • NodePort: <node-ip>:<node-port>를 통해 액세스

  • LoadBalancer: 제공된 외부 IP를 통한 액세스

TSM 명령 사용

# Get pod name
POD_NAME=$(kubectl get pods -l app.kubernetes.io/component=primary -o jsonpath='{.items[0].metadata.name}')

# Run tabcmd
kubectl exec -it $POD_NAME -- tsm status
kubectl exec -it $POD_NAME -- tsm configuration get

tabcmd 사용

# Get pod name
POD_NAME=$(kubectl get pods -l app.kubernetes.io/component=primary -o jsonpath='{.items[0].metadata.name}')

# Run tabcmd
kubectl exec -it $POD_NAME -- tabcmd login -u admin -p password
kubectl exec -it $POD_NAME -- tabcmd sites

Tableau Server 로그 보기

# Primary node logs
kubectl logs -l app.kubernetes.io/component=primary -f

# Worker node logs (multi-node)
kubectl logs -l app.kubernetes.io/component=worker -f

# All logs
kubectl logs -l app.kubernetes.io/instance=tableau-server -f

셸 액세스

# Get pod name
POD_NAME=$(kubectl get pods -l app.kubernetes.io/component=primary -o jsonpath='{.items[0].metadata.name}')

# Open shell
kubectl exec -it $POD_NAME -- /bin/bash

업그레이드

Tableau Server Helm 차트 업그레이드

helm upgrade tableau-server ./helm/tableau-server -f ./helm/tableau-server/values.yaml

새 값으로 업그레이드

helm upgrade tableau-server ./helm/tableau-server -f ./helm/tableau-server/new-values.yaml

설치 후 토폴로지 자동화(후크)

다중 노드 설치의 경우 이 차트는 다음과 같은 설치 후/업그레이드 후 후크 작업을 실행할 수 있습니다.

  • 작업자 노드가 TSM에 등록될 때까지 대기

  • 작업자 clustercontroller 프로세스 할당 설정

  • 변경 사항이 보류 중인 경우 tsm pending-changes apply -iw --ignore-prompt 실행

구성:

hooks:
  autoApplyWorkerTopology:
    enabled: true
    kubectlImage: "bitnami/kubectl:latest"
    timeoutSeconds: 3600

기본값:

  • values.yaml에서 사용하지 않도록 설정

  • values-multinode.yaml에서 hooks.autoApplyWorkerTopology.enabled 확인(릴리스에 따라 true 또는 false 일 수 있으며, 최초 작업자 clustercontroller 설치에 대해 사용하도록 설정)

후크 실행 확인:

kubectl get jobs -n default
kubectl get pods -n default -l job-name=tableau-server-hook-topology
kubectl logs -n default job/tableau-server-hook-topology

후크가 사용되지 않도록 설정되었거나 실패하는 경우 수동 대체 - 각 작업자 TSM 노드(작업자가 N개인 경우 일반적으로 node2부터 node(1+N)까지)에 대해 tsm topology set-process 실행(tsm topology list-nodes -v로 ID 확인):

kubectl exec -n default tableau-server-primary-0 -- sh -lc '
tsm topology set-process -n node2 -pr clustercontroller -c 1
tsm topology set-process -n node3 -pr clustercontroller -c 1
# Add one line per additional worker node, e.g. for four workers:
# tsm topology set-process -n node4 -pr clustercontroller -c 1
# tsm topology set-process -n node5 -pr clustercontroller -c 1
tsm pending-changes apply -iw --ignore-prompt
tsm topology list-nodes -v

tsm status -v

참고: tsm pending-changes apply에 -iw를 사용하십시오. -ig 옵션은 이 환경에서 유효하지 않습니다.

설치 제거

helm uninstall tableau-server

경고: 설치를 제거하면 영구 볼륨을 포함한 모든 리소스가 삭제됩니다. 제거하기 전에 데이터를 백업하십시오.

유효성 검사 단계

차트를 릴리스하기 전에 또는 변경할 때 다음 명령을 실행합니다.

  1. Lint:

    helm lint helm/tableau-server -f helm/tableau-server/values-single.yaml
    helm lint helm/tableau-server -f helm/tableau-server/values-multinode.yaml
  2. 템플릿(시범 실행):

    helm template tableau-server helm/tableau-server -f helm/tableau-server/values-single.yaml
    helm template tableau-server helm/tableau-server -f helm/tableau-server/values-multinode.yaml
  3. 설치 테스트(선택 사항):

    1. 테스트 네임스페이스에서 values-single 또는 values-multinode와 함께 helm install을 실행합니다.

    2. kubectl rollout status를 실행하고(StatefulSet의 경우 포드가 Ready 상태 될 때까지 대기) 및 기본 성능 검사(예: tsm status 또는 서비스에 대한 HTTP 연결)를 수행합니다.

자세한 문제 해결은 Tableau Server Helm 차트 - 문제 해결을 참조하십시오.

추가 리소스