Managing Services

HTTP-TDB Service

Server : Bangalore - epicode-svr9 (10.10.0.10)
              Gujarat      - epicode-a-svr8 (192.168.1.9)

FilePath : Running as service : /usr/local/epi/www/httptdb/
Managing Service 

sudo service httptdb status
sudo service httptdb restart 

Look for Errors

sudo journalctl -e -u httptdb


Storage Server and Storage Gateway 

Server : Bangalore - epicode-svr9 (10.10.0.10)
              Gujarat      - epicode-a-svr8 (192.168.1.9)
Note : Storage gateway is only running in Bangalore and Storage server running in Both DC.

FilePath : Running as Pod. Yaml files available in

Look for Errors 

Kubectl get pods
kubectl logs <pod-name> 

Managing Service 

Notes

---

1. The helm charts do not add the volumes necessary for storage server as of now. So, we need to explicitly add volume and volume claim.

volume.yaml

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: recordings-volume
  labels:
type: local
spec:
  capacity:
storage: 600Gi
  accessModes:
- ReadWriteOnce
  storageClassName: local-storage
  hostPath:
path: /var/recordings

volume-claim.yaml

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: recordings-volume-claim
spec:
  accessModes:
- ReadWriteOnce
  resources:
requests:
  storage: 600Gi
  storageClassName: local-storage


2. Ingress has to be applied manually by the installer for storage-server. It is assumed that the `saarthi-ai-tls-secret` secret which is used in ingress is already available in the namespace.

storage-server-ingress.yaml

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: storage-server-https-ingress
  annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
  tls:
  - secretName: saarthi-ai-tls-secret
  rules:
  - host: prod-rec-bng.saarthi.ai
http:
  paths:
    - path: /
      pathType: Prefix
      backend:
        service:
          name: storage-server
          port:
            number: 8091


----------

1. Storage Server

helm install ss -f ss-values.yaml oci://public.ecr.aws/epicode-modules/storage-server

  ss-values.yaml

---
  config:
SS_HOST_IP: "0.0.0.0"
SS_HOST_PORT: "8091"
SS_SERVER_URL: "https://prod-rec-bng.saarthi.ai"
SS_SOURCE_DIR: "/var/recordings"
SS_TOKEN: ""

  recordings_volume:
hostPath: /var/recordings
capacity: 600Gi


2. Storage Gateway

helm install sg -f sg-values.yaml oci://public.ecr.aws/epicode-modules/storage-gateway

  sg-values.yaml

  ---
  config:
config.yaml: |-
  host_ip: "0.0.0.0"
  host_port: "8090"
  http_client_timeout: "5" # in seconds
  storage_servers:
    teleindia:
      url: "http://storage-server.default.svc.cluster.local:8091"
      token: ""
    teleindia_gj:
      url: "https://prod-rec-ahmd.saarthi.ai"
      token: ""


CDB Service  

Server : Bangalore - epicode-svr12 (10.10.0.13)
              Gujarat      - epicode-a-svr10 (192.168.1.11) 

                                   epicode-a-svr11 (192.168.1.12)

FilePath : Running as service : /usr/local/epi/cdb


Managing service 

sudo service cdb status
sudo service cdb restart 

Look for Errors 

StandardOutput : /var/log/epi/cdb/cdb_out.log
StandardError : /var/log/epi/cdb/cdb_err.log