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.6k
Other Decks in Technology
See All in Technology
Two Blades, One Journey: Engineering While Managing
ohbarye
4
2.1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
19k
ディスプレイ広告(Yahoo!広告・LINE広告)におけるバックエンド開発
lycorptech_jp
PRO
0
380
Iceberg Meetup Japan #1 : Iceberg and Databricks
databricksjapan
0
370
PHPで印刷所に入稿できる名札データを作る / Generating Print-Ready Name Tag Data with PHP
tomzoh
0
190
ウォンテッドリーのデータパイプラインを支える ETL のための analytics, rds-exporter / analytics, rds-exporter for ETL to support Wantedly's data pipeline
unblee
0
130
急成長する企業で作った、エンジニアが輝ける制度/ 20250227 Rinto Ikenoue
shift_evolve
0
140
Pwned Labsのすゝめ
ken5scal
2
450
EMConf JP 2025 懇親会LT / EMConf JP 2025 social gathering
sugamasao
2
200
Autonomous Database Serverless 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
17
45k
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
160
Cracking the Coding Interview 6th Edition
gdplabs
14
28k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
4 Signs Your Business is Dying
shpigford
182
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
GraphQLとの向き合い方2022年版
quramy
44
14k
Code Reviewing Like a Champion
maltzj
521
39k
Building Adaptive Systems
keathley
40
2.4k
Being A Developer After 40
akosma
89
590k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Practical Orchestrator
shlominoach
186
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
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 • 継続的な計測・改善