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
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
Search
Tadashi Nemoto
April 27, 2021
Technology
8
4.1k
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
AWS Startup Tech Meetup Online #4
https://aws-startup-community.connpass.com/event/209830/
Tadashi Nemoto
April 27, 2021
Tweet
Share
More Decks by Tadashi Nemoto
See All by Tadashi Nemoto
Best Practice CI/CD Pipeline for Deploying Container Apps to AWS
tadashi0713
0
170
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
98
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
200
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
260
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
310
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
530
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
3.9k
メルカリの開発スピードと品質を支える Selenium on Azure Kubernetes Service
tadashi0713
2
1.3k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.5k
Other Decks in Technology
See All in Technology
速くて安いWebサイトを作る
nishiharatsubasa
10
13k
Developer Summit 2025 [14-D-1] Yuki Hattori
yuhattor
19
6.2k
Classmethod AI Talks(CATs) #17 司会進行スライド(2025.02.19) / classmethod-ai-talks-aka-cats_moderator-slides_vol17_2025-02-19
shinyaa31
0
120
レビューを増やしつつ 高評価維持するテクニック
tsuzuki817
1
720
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
2.1k
白金鉱業Meetup Vol.17_あるデータサイエンティストのデータマネジメントとの向き合い方
brainpadpr
6
750
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
540
あれは良かった、あれは苦労したB2B2C型SaaSの新規開発におけるCloud Spanner
hirohito1108
2
590
リーダブルテストコード 〜メンテナンスしやすい テストコードを作成する方法を考える〜 #DevSumi #DevSumiB / Readable test code
nihonbuson
11
7.2k
N=1から解き明かすAWS ソリューションアーキテクトの魅力
kiiwami
0
130
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
17
6.8k
目の前の仕事と向き合うことで成長できる - 仕事とスキルを広げる / Every little bit counts
soudai
24
7.1k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.5k
Gamification - CAS2011
davidbonilla
80
5.1k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Six Lessons from altMBA
skipperchong
27
3.6k
Side Projects
sachag
452
42k
Become a Pro
speakerdeck
PRO
26
5.1k
YesSQL, Process and Tooling at Scale
rocio
172
14k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
The Language of Interfaces
destraynor
156
24k
Transcript
デプロイ頻度を10倍にした、 ブランチ戦略と GitHub Actions on AWS ECS Tadashi Nemoto
⾃⼰紹介 • 根本 征 (ねもと ただし) • 株式会社エクサウィザーズ • Platform
Engineer (DevOps Engineer) ◦ CI / CD 基盤の構築・改善・導⼊ ◦ 本番・検証環境の構築・運⽤ ◦ テスト⾃動化の導⼊・布教
CI / CD を導⼊していますか︖
その CI / CD パイプラインは 現在のプロダクト・開発組織に 最適でしょうか︖
State of DevOps Report 2019
State of DevOps Report 2018
State of DevOps Report 2018
https://tech.uzabase.com/entry/2021/01/28/190209
スタートアップでは変化するスピードがとても重要
None
デプロイ頻度(27回 / 2週間) 10倍以上のデプロイ頻度
アウトライン • これまでの CI / CD・デプロイフロー • 変えたこと ◦ Jenkins
→ GitHub Actions on AWS ECS ◦ Git Flow → GitLab Flow • 改善の効果 • これから
これまでの CI / CD・デプロイフロー
これまでのCI / CD・デプロイフロー • Hashicorp Nomad on AWS ◦ develop,
staging, production ◦ 簡単に複数の develop 環境が作れない • Git Flow ◦ チームによって使い⽅が多少異なる • Jenkins on AWS ◦ 本番環境へのデプロイは⼀部弊チームに依存
⼩さく・⾃律的に デプロイできるようにする
デプロイ頻度を上げる
改善したこと① Jenkins → GitHub Actions on AWS ECS
Jenkins • メンテナンスコストが⾼い ◦ バージョン・プラグインのアップデート ◦ マシンの追加・スケール ◦ 権限付与・セキュリティなど •
専任のメンバー・チームが必要 • ⾃律的なデプロイに向いていない
SaaS系 CI / CD ツール
デプロイ制限
GitHub Actions self-hosted runners
GitHub Actions self-hosted runners • GitHub Actions ではクラウド版とセルフホスト版を⽤意 • セルフホスト版は無料で利⽤可能(GitHub
ユーザー) • クラウド版同等の機能を利⽤可能 (Marketplace, Secret) • クラウド版とセルフホスト版を両⽴することが可能 ◦ デプロイはセルフホスト版、テストはクラウド版 • ワークフロー管理部分をマネージドにできる
GitHub Actions self-hosted runners on AWS ECS
https://techblog.exawizards.com/entry/2020/10/22/080000
改善したこと② Git Flow -> GitLab Flow
Git Flow
Git Flow • リリースタイミングが決まっている開発には有効 ◦ モバイルアプリ(1~2週間に1回) • 恣意的にリリースできる開発にはメリットが少ない ◦ API
/ Frontend をクラウドにいつでもデプロイできる • 不要なブランチ作業によってデプロイ頻度を下げる可能性 ◦ リリースブランチ・Hotfix ブランチ・Tag の作成
GitHub Flow
GitHub Flow 本番環境 ?環境 ?環境 • シンプルなブランチ管理 ◦ master /
feature ブランチ • リリース頻度を⾼くできる • リリース前の検証環境が課題 ◦ master ブランチ = production ◦ staging 環境︖ ◦ development 環境︖
既存の環境 (develop, staging, production) をうまく使いながら、 デプロイ頻度を上げたい
GitLab Flow • feature → master ブランチの関係 ◦ GitHub Flow
と同じ • リリースに必要なブランチを⽤意できる ◦ master ブランチ → staging 環境 ◦ production ブランチ → 本番環境 ◦ リリースするタイミングで merge Staging 環境 本番環境
Develop 環境へのデプロイ
リリースのための Pull Request を⾃動⽣成・更新 Staging 環境 本番環境
https://techblog.exawizards.com/entry/2021/01/21/111031
改善の効果
デプロイ頻度(4回 / ⽉)
デプロイ頻度(27回 / 2週間)
デプロイ頻度(27回 / 2週間) 10倍以上のデプロイ頻度
State of DevOps Report 2019
⼩さく・⾃律的にデプロイできるように
これから
継続的に計測・改善する
PRベースの環境構築 / self-hosted runners を使わない staging 環境 PR1 環境 PR2
環境
継続的テスティング / 継続的インスペクション
まとめ
まとめ • デプロイ頻度の向上はスタートアップ含めとても重要 • 2つの改善によって 10 倍以上のデプロイ頻度を実現した ◦ Jenkins ->
GitHub Actions on AWS ECS ◦ Git Flow -> GitLab Flow • 継続的な計測・改善