Add ArgoCD integration with Gitea repo
- Register Gitea repo in ArgoCD (credentials configured) - Create ArgoCD Application: watches manifests/ → deploys to soo ns - SyncPolicy: automated with prune and selfHeal - Add manifests/ directory for future K8s resources Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
08ac29a352
commit
e573b9a533
66
README.md
66
README.md
|
|
@ -2,34 +2,50 @@
|
|||
|
||||
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.gpulive.cloud` |
|
||||
| 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` |
|
||||
| Gitea Runner | **TODO** | `gitea` |
|
||||
| ArgoCD | installed | `argocd` |
|
||||
| DVC | **TODO** | - |
|
||||
| 컴포넌트 | 상태 | 위치 |
|
||||
|----------|------|------|
|
||||
| Gitea | installed | 외부 클러스터 |
|
||||
| Gitea Runner | **TODO** | 이 클러스터 (`soo` ns) |
|
||||
| ArgoCD | installed + **repo 연동 완료** | 이 클러스터 (`argocd` ns) |
|
||||
| DVC | **TODO** | 로컬 + NAS |
|
||||
|
||||
---
|
||||
|
||||
## 1. Gitea (이미 설치됨)
|
||||
## 1. Gitea (외부 클러스터, 설치됨)
|
||||
|
||||
Helm으로 설치 완료. Ingress를 통해 접근 가능.
|
||||
외부 클러스터에서 운영 중. 이 프로젝트 repo 생성 완료.
|
||||
|
||||
```bash
|
||||
# 상태 확인
|
||||
kubectl get pods -n gitea
|
||||
kubectl get ingress -n gitea
|
||||
# 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
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -44,17 +60,28 @@ kubectl get ingress -n gitea
|
|||
|
||||
---
|
||||
|
||||
## 3. ArgoCD (이미 설치됨)
|
||||
## 3. ArgoCD (설치됨 + Gitea repo 연동 완료)
|
||||
|
||||
Helm으로 설치 완료. Ingress를 통해 접근 가능.
|
||||
Helm으로 설치 완료. Gitea repo 등록 및 Application 생성 완료.
|
||||
|
||||
- App 이름: `mlops-architecture`
|
||||
- Source: `gitea.inje-private.com/selee/mlops-architecture` → `manifests/`
|
||||
- Destination: 이 클러스터 `soo` 네임스페이스
|
||||
- SyncPolicy: automated (prune + selfHeal)
|
||||
|
||||
```bash
|
||||
# 상태 확인
|
||||
kubectl get pods -n argocd
|
||||
kubectl get ingress -n argocd
|
||||
kubectl get app mlops-architecture -n argocd
|
||||
|
||||
# 초기 admin 비밀번호 확인
|
||||
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
|
||||
# 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
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -76,7 +103,10 @@ mlops_architecture/
|
|||
├── .env # 접속 정보, 시크릿 (git 제외)
|
||||
├── .gitignore
|
||||
├── config.yaml # 인프라 구성 정보
|
||||
└── README.md # 설치 가이드 (이 파일)
|
||||
├── README.md # 설치 가이드 (이 파일)
|
||||
├── argocd/
|
||||
│ └── application.yaml # ArgoCD Application 정의
|
||||
└── manifests/ # K8s 배포 manifest (ArgoCD가 감시)
|
||||
```
|
||||
|
||||
## 설정 파일 사용법
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: mlops-architecture
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitea.inje-private.com/selee/mlops-architecture.git
|
||||
targetRevision: main
|
||||
path: manifests
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: soo
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=false
|
||||
Loading…
Reference in New Issue