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
910
PipeCDを使用したBucketeerのGitOps-style CI/CD
muras
January 20, 2021
Tweet
Share
More Decks by muras
See All by muras
Vim Tips
muras
0
730
Java研修成果発表
muras
0
730
Other Decks in Technology
See All in Technology
AWSにおけるサイバー攻撃の傾向と具体的な対策
yuobayashi
8
760
リポジトリをまるっとAIに食わせるRepomixの話
yamadashy
0
220
eBPF-based Process Lifecycle Monitoring
yukinakanaka
1
150
MLflowの現在と未来 / MLflow Present and Future
databricksjapan
1
210
Oracle Cloud Infrastructure:2025年3月度サービス・アップデート
oracle4engineer
PRO
0
190
パスキー導入の課題と ベストプラクティス、今後の展望
ritou
1
250
OCI Oracle Database Services新機能アップデート(2024/12-2025/02)
oracle4engineer
PRO
2
160
これからクラウドエンジニアになるために本当に必要なスキル 5選
hiyanger
1
400
Github Copilot Chatは本日よりケ◯ロ軍曹でありま〜〜〜すッ!!!(たぶん)
yu_yukk_y
1
120
EMの仕事、あるいは顧客価値創出のアーキテクト
radiocat
0
110
ランチの間に GitHub Copilot Agent が仕事を終わらせてくれた話
bicstone
5
610
UDDのすすめ
maguroalternative
0
600
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
290
Raft: Consensus for Rubyists
vanstee
137
6.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
It's Worth the Effort
3n
184
28k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
134
33k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Producing Creativity
orderedlist
PRO
344
40k
Designing Experiences People Love
moore
140
23k
Building Your Own Lightsaber
phodgson
104
6.3k
Docker and Python
trallard
44
3.3k
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!