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
3.7k
デプロイ頻度を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
91
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
44
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
110
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
190
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
190
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
430
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
3.6k
メルカリの開発スピードと品質を支える Selenium on Azure Kubernetes Service
tadashi0713
2
1.2k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.3k
Other Decks in Technology
See All in Technology
能動学習のいろは:書籍「Human-in-the-Loop機械学習」3〜5章
hiroyoshiito
0
290
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
2
220
テストコードを書きながらCompose Multiplatformを乗りこなす
subroh0508
0
140
Password cracking: past, present, future
openwall
0
270
iThome2024 Wailing Wall of Enterprise Security
notsurprised
0
300
【リラン】AIの光と闇?失敗しないために知っておきたいAIリスクとその対応 ①政府の動き編
tkhresk
0
140
Google Cloudを組織(企業)で運用する時のベストプラクティス × 健康の環境分離戦略 #まるクラ勉強会
yasumuusan
0
170
個人的、Kubernetes の最新注目機能! (2024年5月版) / TechFeed Experts Night#28 〜 コンテナ技術最前線
pfn
PRO
3
210
「知的単純作業」を自動化する、地に足の着いた大規模言語モデル (LLM) の活用
nrryuya
8
8.3k
RailsConf 2024 Keynote "Startups on Rails in 2024"
irinanazarova
0
810
Laboratories in Science and Technology: Deep Neural Networks
keio_smilab
PRO
3
160
本当のガバクラ基礎
toru_kubota
0
320
Featured
See All Featured
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
15
1.6k
Happy Clients
brianwarren
92
6.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Web Components: a chance to create the future
zenorocha
306
41k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Thoughts on Productivity
jonyablonski
60
3.9k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
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 • 継続的な計測・改善