Add custom-values.yaml, CUSTOM-README.md

This commit is contained in:
wbsong111
2024-12-18 09:43:49 +09:00
parent 35f1beb309
commit b43b008550
2 changed files with 200 additions and 0 deletions
+107
View File
@@ -0,0 +1,107 @@
# Langflow IDE 배포
## 1. 배포 방법
- 명령어
``` sh
$ helm upgrade --instal langflow ../langflow-ide \
--namespace langflow \
--create-namespace \
-f custom-values.yaml
```
## 2. custom-values.yaml 설명
- custom-values.yaml에 정의된 값에 대한 설명이다.
### 1) Langflow 설정
| Name | 설명 | 기본값 |
| ---------------------- | ------------------------------------------------------------ | ------ |
| `langflow.backend.replicaCount` | Langflow 백엔드 서버의 pod 수를 설정. | `1` |
| `langflow.backend.image` | Langflow 백앤드 서버의 이미지 리포지토리와 태그를 설정. | `custom-values.yaml` 참고 |
| `langflow.backend.resource` | langflow 백엔드의 리소스를 설정. | `custom-values.yaml` 참고 |
| `langflow.backend.nodeSelector` | Langflow 백엔드 서버의 pod의 nodeSelector를 설정. | `{}` |
| `langflow.backend.tolerations` | Langflow 백엔드 서버의 pod의 toleration를 설정. | `[]` |
| `langflow.backend.backendOnly` | Langflow 백엔드 서버의 backend only 모드 실행 여부를 설정. | `true` |
| `langflow.backend.env` | Langflow 백엔드 서버의 환경 변수를 설정. 계정 정보 및 서버 설정을 추가할 수 있다. | `custom-values.yaml` 참고 |
| `langflow.backend.env.externalDatabase` | Langflow 백엔드 서버에서 외부 DB 사용 여부 및 연결 정보를 설정 | `custom-values.yaml` 참고 |
| `langflow.backend.frontend.enable` | Langflow 프론트엔드 서버의 사용 여부를 설정 | `true` |
| `langflow.backend.frontend.replicaCount` | Langflow 프론트엔드 서버의 pod 수를 설정한다. | '1' |
| `langflow.backend.frontend.image` | Langflow 프론트엔드 서버의 이미지 리포지토리와 태그를 설정한다. | `custom-values.yaml` 참고 |
| `langflow.backend.frontend.resource` | langflow 프론트엔드 서버의 리소스를 설정, | `custom-values.yaml` 참고 |
| `langflow.backend.frontend.nodeSelector` | Langflow 프론트엔드 서버의 pod의 nodeSelector를 설정. | '{}' |
| `langflow.backend.frontend.tolerations` | Langflow 프론트엔드 서버의 pod의 toleration를 설정. | `[]` |
### 2) Ingress 설정
#### 2.1) tls 시크릿 직접 생성
- Rancher에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.
``` yaml
ingress:
enabled: true
hosts:
- host: langflow.example.org
paths:
- path: /
pathType: ImplementationSpecific
servicePort: 7860
tls:
- hosts:
- langflow.example.org
secretName: langflow-tls-secret
```
- ingress 사용을 위해서는 인증서를 secret으로 제공해야한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다.
``` sh
kubectl create secret tls langflow-tls-ingress --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
```
#### 2.2) cert-manager를 이용한 자동 생성
- cert manager를 통해 인증서 자동 생성 시 `custom-values.yaml` 수정한다.
``` yaml
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: "selfsigned-issuer"
cert-manager.io/duration: 8760h
cert-manager.io/renew-before: 720h
hosts:
- host: langflow.example.org
paths:
- path: /
pathType: ImplementationSpecific
servicePort: 7860
tls:
- hosts:
- langflow.example.org
secretName: langflow-tls-secret
```
### 3) 내장 DB 배포
- langflow에서 사용할 외부 DB를 배포하기 위한 설정이다.
- 해당 postgresql의 사용자, 패스워드 정보를 `langflow.backend.externalDatabase`에 추가해야 한다.
- custom-values.yaml에 추가해야할 설정은 다음과 같다.
``` yaml
postgresql:
enabled: true
fullnameOverride: "langflow-ide-postgresql-service"
auth:
username: "langflow"
password: "langflow-postgres"
database: "langflow-db"
primary:
persistence:
size: 5Gi
storageClass: ""
```
+93
View File
@@ -0,0 +1,93 @@
langflow:
backend:
replicaCount: 1
image:
repository: langflowai/langflow-backend
tag: "v1.1.1"
resources:
requests:
cpu: 0.5
memory: 1Gi
nodeSelector: {}
tolerations: []
backendOnly: true
env:
- name: LANGFLOW_PORT
value: "7860"
- name: LANGFLOW_LOG_LEVEL
value: "info"
- name: LANGFLOW_AUTO_LOGIN
value: "False"
- name: LANGFLOW_SUPERUSER
value: "admin"
- name: LANGFLOW_SUPERUSER_PASSWORD
value: "password"
- name: LANGFLOW_SECRET_KEY
value: "randomly_generated_secure_key"
- name: LANGFLOW_NEW_USER_IS_ACTIVE
value: "False"
externalDatabase:
enabled: true
driver:
value: "postgresql"
host:
value: "langflow-ide-postgresql-service"
port:
value: "5432"
database:
value: "langflow-db"
user:
value: "langflow"
password:
valueFrom:
secretKeyRef:
key: "password"
name: "langflow-ide-postgresql-service"
sqlite:
enabled: false
probe:
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 5
initialDelaySeconds: 5
frontend:
enabled: true
replicaCount: 1
image:
repository: langflowai/langflow-frontend
tag: "v1.1.1"
resources:
requests:
cpu: 0.3
memory: 512Mi
nodeSelector: {}
tolerations: []
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: "selfsigned-issuer"
cert-manager.io/duration: 8760h
cert-manager.io/renew-before: 720h
hosts:
- host: langflow.example.org
paths:
- path: /
pathType: ImplementationSpecific
servicePort: 7860
tls:
- hosts:
- langflow.example.org
secretName: langflow-tls-secret
postgresql:
enabled: true
fullnameOverride: "langflow-ide-postgresql-service"
auth:
username: "langflow"
password: "langflow-postgres"
database: "langflow-db"
primary:
persistence:
size: 5Gi
storageClass: ""