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
99
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.6k
Other Decks in Technology
See All in Technology
目標と時間軸 〜ベイビーステップでケイパビリティを高めよう〜
kakehashi
PRO
8
940
事業モメンタムを生み出すプロダクト開発
macchiitaka
0
100
入門 PEAK Threat Hunting @SECCON
odorusatoshi
0
180
データモデルYANGの処理系を再発明した話
tjmtrhs
0
230
困難を「一般解」で解く
fujiwara3
7
1.7k
2025/3/1 公共交通オープンデータデイ2025
morohoshi
0
100
開発組織を進化させる!AWSで実践するチームトポロジー
iwamot
2
510
サバイバルモード下でのエンジニアリングマネジメント
konifar
20
5.8k
[OpsJAWS Meetup33 AIOps] Amazon Bedrockガードレールで守る安全なAI運用
akiratameto
1
130
4th place solution Eedi - Mining Misconceptions in Mathematics
rist
0
150
Pwned Labsのすゝめ
ken5scal
2
550
生成AI×財務経理:PoCで挑むSlack AI Bot開発と現場巻き込みのリアル
pohdccoe
1
800
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
Side Projects
sachag
452
42k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Making Projects Easy
brettharned
116
6k
Designing Experiences People Love
moore
140
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Optimizing for Happiness
mojombo
377
70k
Visualization
eitanlees
146
15k
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 • 継続的な計測・改善