1. Vấn đề cần giải quyết

2. Hướng dẫn cấu hình VPN để kết nối với các thành phần hạ tầng của production

Lưu ý:

3. Hướng dẫn cấu hình hệ thống monitor cho đội vận hành

3.1. Cài đặt và cấu hình Loki phục vụ lưu trữ log

Thêm helm chart grafana

helm repo add grafana [<https://grafana.github.io/helm-charts>](<https://grafana.github.io/helm-charts>)

Chuẩn bị file value.yaml

loki:
  schemaConfig:
    configs:
      - from: "2024-04-01"
        store: tsdb
        object_store: s3
        schema: v13
        index:
          prefix: loki_index_
          period: 24h
  ingester:
    chunk_encoding: snappy
  tracing:
    enabled: true
  querier:
    # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing
    max_concurrent: 4

#gateway:
#  ingress:
#    enabled: true
#    hosts:
#      - host: FIXME
#        paths:
#          - path: /
#            pathType: Prefix

deploymentMode: SimpleScalable

backend:
  replicas: 3
read:
  replicas: 3
write:
  replicas: 3

# Enable minio for storage
minio:
  enabled: true

# Zero out replica counts of other deployment modes
singleBinary:
  replicas: 0

ingester:
  replicas: 0
querier:
  replicas: 0
queryFrontend:
  replicas: 0
queryScheduler:
  replicas: 0
distributor:
  replicas: 0
compactor:
  replicas: 0
indexGateway:
  replicas: 0
bloomCompactor:
  replicas: 0
bloomGateway:
  replicas: 0

Cài đặt loki

helm upgrade -i --values values.yaml loki grafana/loki

3.2. Cài đặt và cấu hình Prometheus phục vụ lưu trữ metric hạ tầng

Thêm helm chart prometheus

helm repo add prometheus-community <https://prometheus-community.github.io/helm-charts>

Cài đặt promentheus

helm install prometheus prometheus-community/prometheus

3.3. Cài đặt và cấu hình Grafana phục vụ trực quan hoá hiện trạng hạ tầng