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
930
PipeCDを使用したBucketeerのGitOps-style CI/CD
muras
January 20, 2021
Tweet
Share
More Decks by muras
See All by muras
Vim Tips
muras
0
740
Java研修成果発表
muras
0
730
Other Decks in Technology
See All in Technology
Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
0
500
CSSDay, Amsterdam
brucel
0
140
継続戦闘能⼒
sansantech
PRO
0
220
2025advance01
minamizaki
0
130
技術書典18結果報告
mutsumix
2
180
コードの考古学 〜労務システムから発掘した成長の糧〜
kenta_smarthr
1
1.2k
mnt_data_とは?ChatGPTコード実行環境を深堀りしてみた
icck
0
210
ローカル環境でAIを動かそう!
falken
PRO
1
170
いまさら聞けない Git 超入門 〜Gitって結局なに?から始める第一歩〜
devops_vtj
0
170
テストを実施する前に考えるべきテストの話 / Thinking About Testing Before You Test
nihonbuson
PRO
14
2.1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
25k
CSS polyfill とその未来
ken7253
0
140
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
1
82
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Typedesign – Prime Four
hannesfritz
41
2.6k
Designing Experiences People Love
moore
142
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
A designer walks into a library…
pauljervisheath
205
24k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
106
19k
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!