From 5a1b9022955345081301bab107fcd47820be76a6 Mon Sep 17 00:00:00 2001 From: kuroweb Date: Wed, 10 Jan 2024 23:51:27 +0900 Subject: [PATCH] docs: update --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1c30a596..788f6eb3 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,19 @@ Web上にある欲しい物の価格監視を行うことができる - Go - gqlgen -### Backend (Price Monitoring Domain) +### Backend - Rails -### 開発インフラ +##  Infra + +### Development - Docker Compose -### デプロイ +### Production - 自宅Kubernetes (Master Node x 1, Worker Node x 2構成) -- ArgoCDで自動デプロイ ## アーキテクチャ @@ -70,8 +71,6 @@ bff--REST API-->price ## ER -### Price Monitoring - ```mermaid erDiagram products { @@ -115,6 +114,41 @@ erDiagram products ||--o{ mercari_products : "1:N" ``` +## 自動デプロイ + +- ArgoCDによるGitOps +- [k8sマニフェスト](https://github.com/kuroweb/k8s) + +```mermaid +sequenceDiagram + participant repo_pm as Repository - price-monitoring + participant repo_k8s as Repository - k8s + participant deploy as GitHub Actions - Deployment + participant vpn as 自宅サーバ - OpenVPN + participant kp_registry as Kubernetes Pod - Docker Registry + participant kp_argocd as Kubernetes Pod - ArgoCD + participant kp_pm as Kubernetes Pod - price-monitoring + + repo_pm->>repo_pm : commit + repo_pm->>deploy : execute + activate deploy + deploy->>deploy : docker build + deploy->>vpn : connect vpn + vpn-->>deploy : + deploy->>kp_registry : push + kp_registry-->>deploy : + deploy->>repo_k8s : update manifest + repo_k8s-->>deploy : + deploy-->>repo_pm : + deactivate deploy + kp_argocd->>repo_k8s : Auto Sync + activate kp_argocd + repo_k8s-->>kp_argocd : + kp_argocd->>kp_pm : apply manifest + kp_pm-->>kp_argocd : + deactivate kp_argocd +``` + ## Docs ### seedファイル