Repository for dip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2.6 KiB

litellm 배포

1. 배포 방법

1) 배포시 주의 사항

  • 사용할 모델에 따라서 적절한 자원(CPU, Memory, GPU)를 설정한 후 배포 해야한다.

2) 배포 방법

git clone https://github.com/paasup/dip-catalog.git
cd charts/litellm
helm upgrade litellm ./ -f custom-values.yaml  --install -n litellm --create-namespace

2.custom-values.yaml 설명

  • custom-values.yaml에 정의된 값에 대한 설명이다.

1) Pod 설정

Name 설명 기본값
image.repository 오프라인 설치 시에 설정.
오프라인 설치시에는 "paasup.io"로 설정
"ghcr.io/berriai/litellm-database"
image.tag 이미지 태그 설정 'main-latest'
resources Litellm 서버의 시스템 자원 설정.
필요한 자원 확인 필요
custom-values.yaml 참고

2) litellm 사용자 설정

  • litellm에서 사용할 Admin 계정의 패스워드를 설정한다. (이 패스워드는 API 요청시 Key로도 사용된다.)
Name 설명 기본값
masterkey Admin 계정 및 API 엑세스 Key 정의 "changeit"

3) Ingress 설정

3.1) tls 시크릿 직접 생성

  • litellm에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.

    ingress:
      enabled: true
        hosts:
        - host: litellm.example.org
          paths:
          - path: /
        tls: 
        -  hosts:
          - litellm.example.org
          secretName: litellm-tls-secret
    
  • ingress 사용을 위해서는 인증서를 secret으로 제공해야한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다.

    kubectl create secret tls ltellm-tls-secret --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
    

3.2) cert-manager를 이용한 자동 생성

  • cert manager를 통해 인증서 자동 생성 시 custom-values.yaml 수정한다.

  • ingress.annotations.cert-manager.io/cluster-issuer에 미리 배포된 Cluster Issuer의 이름으로 변경한다.

    ingress:
      enabled: true
      annotations: 
        cert-manager.io/cluster-issuer: "root-ca-issuer" 
        cert-manager.io/duration: 8760h  
        cert-manager.io/renew-before: 720h
      hosts:
      - host: litellm.example.org
        paths:
          - /
      tls: 
      -  hosts:
        - litellm.example.org
        secretName: litellm-tls-secret