Skip to content

Latest commit

 

History

History
110 lines (78 loc) · 2.89 KB

dcache-k8s-howto.md

File metadata and controls

110 lines (78 loc) · 2.89 KB

dCache in Kubernetes

  1. Requirements
  2. Minikube nano-HowTo
  3. Preparing Helm
  4. Starting dCache
  5. Accessing admin interface with SSH
  6. Accessing with from client host
  7. Exposing admin pages and frontend

Requirements

  • Access to kubernetes cluster (or local minikube installation). All exampled blow should work with both, unless extra noted.
  • Kubernetes cli client
  • Helm cli client

Minikube env (optional)

Download the latest version of minikube:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

Rootless installation with podman

$ minikube config set rootless true
$ minikube start --driver=podman --container-runtime=containerd 

Helm env

Install helm as described in official docs and add helm repositories:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo add dcache https://gitlab.desy.de/api/v4/projects/7648/packages/helm/test
$ helm repo update

Starting dCache

To start dCache in kubernetes two steps are required:

  1. start required external components
  2. start dcache

It's recommended to run dCache instance in a dedicated kubernetes namespace, for example, dcache-test:

kubectl create namespace dcache-test
kubectl config set-context --current --namespace=dcache-test 

All following command commands assume that the namespace is set. Otherwise -n other-namespace flag should be passes to all helm and kubeclt commands.

Then start required infrastructure (zookeeper, postgresql, kafka)

$ helm install --wait --set auth.username=dcache --set auth.password=let-me-in --set auth.database=chimera  chimera bitnami/postgresql
$ helm install --wait cells bitnami/zookeeper
$ helm install --wait --set externalZookeeper.servers=cells-zookeeper --set kraft.enabled=false billing bitnami/kafka --version 23.0.7

Then start dCache

$ helm install --wait --set image.tag=9.2.1 store dcache/dcache

All running helm charts can be listed with:

$ helm list

Accessing admin interface

$ kubectl run -ti --rm --image=kroniak/ssh-client admmin -- ssh -p 22224 admin@store-door-svc

Accessing with client

Starting a client host and attach to it.

$ kubectl run --image=almalinux:9 wn -- sleep inf
$ kubectl -ti exec wn -- /bin/bash
$ kubectl -ti exec wn -- curl -v -k -X HEAD https://store-door-svc:8083/ 

Quick access to admin pages and frontend

(For minikube users)

$ kubectl expose pod store-dcache-door-0 --type=NodePort --port=2288 --name="web-admin"
$ kubectl expose pod store-dcache-door-0 --type=NodePort --port=3880 --name="frontend" 
$ minikube service web-admin -n dcache-test