MLOps Architecture - Gitea + ArgoCD + DVC
Go to file
Cloud User c55fa3b934 Add nodeSelector policy for infra components
- Gitea Runner: nodeSelector nodegroup=nd
- Define scheduling policy in config.yaml:
  - infra components → nodegroup: nd
  - monitoring → nodegroup: prometheus
  - workloads excluded from this rule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:04:46 +09:00
.dvc Add DVC with NAS remote storage 2026-02-25 14:52:14 +09:00
argocd Add ArgoCD integration with Gitea repo 2026-02-25 14:43:50 +09:00
gitea-runner Add nodeSelector policy for infra components 2026-02-25 15:04:46 +09:00
manifests Add ArgoCD integration with Gitea repo 2026-02-25 14:43:50 +09:00
.dvcignore Add DVC with NAS remote storage 2026-02-25 14:52:14 +09:00
.gitignore Initial commit: MLOps architecture project setup 2026-02-25 14:40:05 +09:00
README.md Add Gitea Runner deployment on K8s 2026-02-25 15:00:42 +09:00
config.yaml Add nodeSelector policy for infra components 2026-02-25 15:04:46 +09:00

README.md

MLOps Architecture

Gitea + Gitea Runner + ArgoCD + DVC 기반 MLOps 파이프라인 구성 프로젝트

Repository

https://gitea.inje-private.com/selee/mlops-architecture

환경 정보

항목
K8s 클러스터 v1.34.3 / Master 3 + Worker 14
Gitea v1.22.1 — https://gitea.inje-private.com (외부 클러스터)
ArgoCD v2.12.3 — https://argocd.gpulive.cloud
DVC Remote NAS 192.168.0.43
Storage Class component-nas (default), internal-nas, user-nas

컴포넌트 설치 상태

컴포넌트 상태 위치
Gitea installed 외부 클러스터
Gitea Runner installed (v0.3.0) 이 클러스터 (soo ns)
ArgoCD installed + repo 연동 완료 이 클러스터 (argocd ns)
DVC installed (v3.66.1) 로컬 + NAS (/ainas/dvc-storage)

1. Gitea (외부 클러스터, 설치됨)

외부 클러스터에서 운영 중. 이 프로젝트 repo 생성 완료.

# repo 생성 (API)
curl -sk -X POST "https://gitea.inje-private.com/api/v1/user/repos" \
  -u "$GITEA_ADMIN_USER:$GITEA_ADMIN_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"name":"mlops-architecture","description":"MLOps Architecture","private":true,"auto_init":false}'

# 로컬 연결
git init && git branch -m main
git remote add origin https://gitea.inje-private.com/selee/mlops-architecture.git
git add config.yaml README.md .gitignore
git commit -m "Initial commit"
git push -u origin main

2. Gitea Runner (설치 완료)

이 클러스터 soo 네임스페이스에 배포. Docker-in-Docker(DinD) sidecar 방식.

  • Runner 이름: mlops-runner
  • 이미지: gitea/act_runner:latest (v0.3.0)
  • Labels: ubuntu-latest, ubuntu-22.04, self-hosted
  • Gitea instance: https://gitea.inje-private.com
# 1. repo에서 Actions 활성화 (API)
curl -sk -X PATCH "https://gitea.inje-private.com/api/v1/repos/selee/mlops-architecture" \
  -u "$GITEA_ADMIN_USER:$GITEA_ADMIN_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"has_actions": true}'

# 2. Runner 배포
kubectl apply -f gitea-runner/deployment.yaml

# 3. 상태 확인
kubectl get pods -n soo -l app=gitea-runner
kubectl logs -n soo -l app=gitea-runner -c runner --tail=20

# 4. Gitea에서 Runner 등록 확인
# https://gitea.inje-private.com/selee/mlops-architecture/settings/actions/runners

3. ArgoCD (설치됨 + Gitea repo 연동 완료)

Helm으로 설치 완료. Gitea repo 등록 및 Application 생성 완료.

  • App 이름: mlops-architecture
  • Source: gitea.inje-private.com/selee/mlops-architecturemanifests/
  • Destination: 이 클러스터 soo 네임스페이스
  • SyncPolicy: automated (prune + selfHeal)
# 상태 확인
kubectl get pods -n argocd
kubectl get app mlops-architecture -n argocd

# ArgoCD에 Gitea repo 등록 (이미 완료)
# ArgoCD API를 통해 등록됨 - argocd/application.yaml 참조

# Application 적용
kubectl apply -f argocd/application.yaml

# sync 상태 확인
kubectl get app mlops-architecture -n argocd -o jsonpath='{.status.sync.status}'; echo

4. DVC (설치 + NAS remote 설정 완료)

  • 버전: v3.66.1
  • Remote: NAS (/ainas/dvc-storage)
  • NAS 마운트: 192.168.0.43:/GJ_SHARE_FS2/.../ainas
# 설치
sudo apt-get install -y python3-pip
pip3 install dvc

# 초기화
dvc init

# NAS remote 설정 (NAS가 /ainas에 마운트된 상태)
sudo mkdir -p /ainas/dvc-storage && sudo chown ubuntu:ubuntu /ainas/dvc-storage
dvc remote add -d nas /ainas/dvc-storage

# 확인
dvc remote list
dvc version

# 사용 예시
# dvc add data/dataset.csv        # 파일 추적
# dvc push                        # NAS로 push
# dvc pull                        # NAS에서 pull

파일 구조

mlops_architecture/
├── .env              # 접속 정보, 시크릿 (git 제외)
├── .gitignore
├── config.yaml       # 인프라 구성 정보
├── README.md         # 설치 가이드 (이 파일)
├── .dvc/                 # DVC 설정 (remote 등)
├── argocd/
│   └── application.yaml  # ArgoCD Application 정의
├── gitea-runner/
│   └── deployment.yaml   # Gitea Runner K8s 배포 (Secret+ConfigMap+Deployment)
└── manifests/            # K8s 배포 manifest (ArgoCD가 감시)

설정 파일 사용법

  • .env : 계정 정보, 토큰 등 민감 정보 → git에 포함되지 않음
  • config.yaml : 클러스터/컴포넌트 메타 정보 → git 추적 가능
  • 컴포넌트 설치할 때마다 이 README와 config.yaml을 업데이트합니다