Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PipeCDを使用したBucketeerのGitOps-style CI/CD
Search
muras
January 20, 2021
Technology
0
940
PipeCDを使用したBucketeerのGitOps-style CI/CD
muras
January 20, 2021
Tweet
Share
More Decks by muras
See All by muras
Vim Tips
muras
0
750
Java研修成果発表
muras
0
740
Other Decks in Technology
See All in Technology
S3アクセス制御の設計ポイント
tommy0124
3
200
はじめてのOSS開発からみえたGo言語の強み
shibukazu
1
130
DDD集約とサービスコンテキスト境界との関係性
pandayumi
3
280
職種の壁を溶かして開発サイクルを高速に回す~情報透明性と職種越境から考えるAIフレンドリーな職種間連携~
daitasu
0
170
slog.Handlerのよくある実装ミス
sakiengineer
4
150
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
9
73k
いま注目のAIエージェントを作ってみよう
supermarimobros
0
290
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
200
JTCにおける内製×スクラム開発への挑戦〜内製化率95%達成の舞台裏/JTC's challenge of in-house development with Scrum
aeonpeople
0
230
Django's GeneratedField by example - DjangoCon US 2025
pauloxnet
0
150
dbt開発 with Claude Codeのためのガードレール設計
10xinc
2
1.2k
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
570
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.2k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
It's Worth the Effort
3n
187
28k
Practical Orchestrator
shlominoach
190
11k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Code Reviewing Like a Champion
maltzj
525
40k
Navigating Team Friction
lara
189
15k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
How GitHub (no longer) Works
holman
315
140k
Transcript
Developer Productivity Study #1 PipeCDを使用した Bucketeerの GitOps-style CI/CD Seiya Muramatsu
(@mura_s_)
• Seiya Muramatsu • GitHub: mura-s • Twitter: @mura_s_ •
Team: Bucketeer • Role: Backend Engineer
• Bucketeerのアーキテクチャの概要 • バックエンドのCI/CDの概要 • PipeCDを使ったGitOps & Progressive Delivery •
まとめ アジェンダ
Bucketeerのアーキテクチャの概要
• Feature Flag & A/B Testing機能を 提供する社内SaaSプロダクト • GCPプロジェクト ◦
bucketeer-dev-host ◦ bucketeer-prd-host ◦ bucketeer-dev-srv ◦ bucketeer-uat-srv ◦ bucketeer-abematv-srv: 専用prd環境 ◦ bucketeer-media-srv: 共用prd環境 ◦ bucketeer-load-srv • マルチプロジェクト/テナント アーキテクチャ
バックエンドのCI/CDの概要
• GitHubリポジトリ ◦ bucketeer: App Code (Monorepo) ◦ bucketeer-config: App
Config ◦ bucketeer-ops: CI, Terraform, ... • Buildツール ◦ Bazel (GoやPythonをbuild) • CIツール ◦ Argo Events ◦ Argo Workflows • CDツール ◦ PipeCD v0.9.4 • マニフェスト管理 ◦ Helm v3 CI/CDの全体像
• ArgoのCI Workflow ◦ 1a) Build ◦ 1b) Unit test
◦ 2) 変更されたサービスの検出 ◦ 3) GCRにImagesをpush ◦ 4) dev環境用のPR作成, マージ CIについて ◦ 5) pipectlを使ってsync & wait ◦ 6) E2E test ◦ 7a) stage環境用のPR作成, マージ ◦ 7b) prd環境用のPR作成 ◦ 7c) Git Tag, Release Note作成 ◦ 8) Slack通知
CDについて • PipeCDで計198 Appsを管理 • GitOps & Progressive Delivery •
CDの流れ ◦ CIでImageのバージョンアップを行うPR作成 ◦ PRマージ (自動/手動) ◦ カナリアPodデプロイ (prd環境のみ) ◦ 自動デプロイ分析 (prd環境のみ) ◦ 全Podsデプロイ • 詳細は次のセクションで
PipeCDを使った GitOps & Progressive Delivery
PipeCD UIでの設定 • Piped & Environment ◦ GCPプロジェクト単位で作成
PipeCD UIでの設定 • Project & API Key
Pipedの設定 • analysisProviders ◦ Automated Deployment Analysisで使用 ◦ Cluster内のPrometheusを設定 •
notifications ◦ デプロイ失敗時にSlack通知 abematv.yaml
• bucketeer-config repoの設定 (後述) • pipectlを使ったscriptを作成 ◦ Environmentを指定してAppsを一括登録 ◦ EnvironmentとAppを指定して登録
Applicationの登録 ➢ pipectlはCIでも使用 ◦ pipectl application sync --wait-status ...
Applicationの登録 • Appリスト & 詳細ページ
bucketeer-config repoの構成 ディレクトリ構成 • charts, configの下にサービスが並んでいる • Environmentごとのconfigはディレクトリで分割 ◦ デメリットもあるが現状は運用しやすさを優先
◦ cf. ブランチで分割、リポジトリで分割
bucketeer-config repoの構成 ディレクトリ構成 .pipe/analysis-template.yaml • AnalysisTemplateにはgrpc_error_rateのmetricsを設定
bucketeer-config repoの構成 ディレクトリ構成 account/dev/.pipe.yaml account/abematv/.pipe.yaml • prd環境以外はQuickSync • prd環境のみDeploy Pipeline
を設定
dev環境のデプロイ dev環境へのPR + 自動マージ
dev環境のデプロイ QuickSync
prd環境のデプロイ prd環境へのPR + 手動マージ
prd環境のデプロイ Deploy Pipeline
prd環境のデプロイ (Failure) • 自動でRollback • Slack通知
手動Rollback • リリース完了後に何らかの問題 があってRollbackしたいケース • PRをRevertしてマージするだけ
まとめ
• CI/CDの全体像 (再掲) • PipeCDを使ってどのように GitOps & Progressive Delivery を行っているかを紹介した
まとめ
• Pros ◦ PipeCD単体でGitOps, Progressive Deliveryが可能 ◦ 独自のCustom Resourceを使用せず、K8SのDeploymentのまま扱える ◦
ControlPlaneの社内SaaSが提供されている ◦ 身近で開発されているのでやりとりがしやすい • Cons ◦ 競合ツールと比べて若干の機能不足や不安定さを感じることがある ◦ コミュニティの活発さ => 一緒に盛り上げていきましょう! • 要望 ◦ Cascade deleteの実装 ▪ https://github.com/pipe-cd/pipe/issues/1285 PipeCDについての所感
Thanks!