Update README.md
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# MLflow 배포 (OIDC Auth)
|
# MLflow 배포 (OIDC Auth)
|
||||||
|
|
||||||
MLflow 3.11.1 + mlflow-oidc-auth v7.0.3를 Keycloak과 연동하여 배포하는 가이드이다.
|
MLflow 3.11.1 + mlflow-oidc-auth를 Keycloak과 연동하여 배포하는 가이드이다.
|
||||||
커스텀 이미지 `wbsong111/mlflow:v3.11.1-oidc`에 OIDC 플러그인이 포함되어 있다.
|
커스텀 이미지 `paasup/mlflow:v3.11.1-oidc`에 OIDC 플러그인이 포함되어 있다.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -82,13 +82,13 @@ git clone https://github.com/paasup/dip-catalog.git
|
|||||||
cd dip-catalog
|
cd dip-catalog
|
||||||
|
|
||||||
# 신규 설치
|
# 신규 설치
|
||||||
helm install mlflow manifests/helm/mlflow/1.8.1/ \
|
helm install mlflow manifests/helm/mlflow/1.9.0/ \
|
||||||
-f manifests/helm/mlflow/1.8.1/custom-values.yaml \
|
-f manifests/helm/mlflow/1.9.0/custom-values.yaml \
|
||||||
-n mlflow --create-namespace
|
-n mlflow --create-namespace
|
||||||
|
|
||||||
# 업그레이드
|
# 업그레이드
|
||||||
helm upgrade mlflow manifests/helm/mlflow/1.8.1/ \
|
helm upgrade mlflow manifests/helm/mlflow/1.9.0/ \
|
||||||
-f manifests/helm/mlflow/1.8.1/custom-values.yaml \
|
-f manifests/helm/mlflow/1.9.0/custom-values.yaml \
|
||||||
-n mlflow
|
-n mlflow
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ OIDC 플러그인이 포함된 커스텀 이미지를 사용한다.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
image:
|
image:
|
||||||
repository: wbsong111/mlflow
|
repository: paasup/mlflow
|
||||||
tag: "v3.11.1-oidc"
|
tag: "v3.11.1-oidc"
|
||||||
|
|
||||||
initImages:
|
initImages:
|
||||||
mlflowDbMigration:
|
mlflowDbMigration:
|
||||||
repository: wbsong111/mlflow
|
repository: paasup/mlflow
|
||||||
tag: "v3.11.1-oidc"
|
tag: "v3.11.1-oidc"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -132,15 +132,6 @@ extraEnvVars:
|
|||||||
OIDC_ALEMBIC_VERSION_TABLE: "mlflow_oidc_alembic_version"
|
OIDC_ALEMBIC_VERSION_TABLE: "mlflow_oidc_alembic_version"
|
||||||
```
|
```
|
||||||
|
|
||||||
**주의사항**
|
|
||||||
|
|
||||||
| 항목 | 올바른 값 | 잘못된 값 | 이유 |
|
|
||||||
|------|-----------|-----------|------|
|
|
||||||
| `SSL_CERT_FILE` | `SSL_CERT_FILE` | `REQUESTS_CA_BUNDLE` | mlflow-oidc-auth는 httpx를 사용하며 httpx는 `SSL_CERT_FILE` 환경변수를 인식 |
|
|
||||||
| `OIDC_SCOPE` | `"openid email profile"` | `"openid,email,profile"` | OAuth2 RFC 6749 표준: 스코프는 공백으로 구분 |
|
|
||||||
| `OIDC_REDIRECT_URI` | `.../callback` | `.../oidc/callback` | mlflow-oidc-auth auth_router에 prefix가 없어 실제 경로는 `/callback` |
|
|
||||||
| `OIDC_ALEMBIC_VERSION_TABLE` | `"mlflow_oidc_alembic_version"` | 기본값(`alembic_version`) | MLflow와 mlflow-oidc-auth가 동일한 alembic_version 테이블을 사용하면 마이그레이션 충돌 발생 |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3.3 OIDC App 활성화
|
### 3.3 OIDC App 활성화
|
||||||
@@ -186,7 +177,29 @@ extraVolumeMounts:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3.6 Ingress 설정
|
### 3.6 OIDC Auth Middleware 패치
|
||||||
|
|
||||||
|
`mlflow-oidc-auth` 플러그인의 `auth_middleware.py`를 차트에 포함된 버전으로 교체한다.
|
||||||
|
워크스페이스 지원(`x-mlflow-workspace` 헤더 처리) 등 업스트림 수정 사항을 반영한다.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
oidcAuthPatch:
|
||||||
|
enabled: true
|
||||||
|
mountPath: "/usr/local/lib/python3.11/site-packages/mlflow_oidc_auth/middleware/auth_middleware.py"
|
||||||
|
```
|
||||||
|
|
||||||
|
파일 소스: `files/auth_middleware.py`
|
||||||
|
|
||||||
|
> **Python 버전 확인**: 컨테이너 이미지의 Python 버전이 다를 경우 `mountPath`를 수정한다.
|
||||||
|
>
|
||||||
|
> ```sh
|
||||||
|
> kubectl exec -n mlflow <pod> -- python -c \
|
||||||
|
> "import mlflow_oidc_auth.middleware.auth_middleware as m; print(m.__file__)"
|
||||||
|
> ```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.7 Ingress 설정
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ingress:
|
ingress:
|
||||||
@@ -211,7 +224,7 @@ ingress:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3.7 PostgreSQL 설정
|
### 3.8 PostgreSQL 설정
|
||||||
|
|
||||||
내장 PostgreSQL을 사용한다.
|
내장 PostgreSQL을 사용한다.
|
||||||
|
|
||||||
@@ -238,7 +251,7 @@ extraEnvVars:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3.8 S3 (MinIO) 설정
|
### 3.9 S3 (MinIO) 설정
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
artifactRoot:
|
artifactRoot:
|
||||||
|
|||||||
Reference in New Issue
Block a user