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
CircleCIの活用事例とCI高速化/circleci-community-meetup3-...
Search
bungoume
April 23, 2019
Technology
3
1.5k
CircleCIの活用事例とCI高速化/circleci-community-meetup3-speedup
bungoume
April 23, 2019
Tweet
Share
More Decks by bungoume
See All by bungoume
djangocongressjp2023_password_hash
bungoume
2
1.4k
日経電子版でのDjango活用事例紹介 / djangocongressjp2022-nikkei
bungoume
4
6.1k
Password Hashing djangocongress 20180519
bungoume
5
4.1k
OSSで始めるセキュリティログ収集/oss-securitylog-builderscon2017
bungoume
29
11k
日経電子版のアプリ開発を支えるログ活用術/nikkei-log-201609
bungoume
1
1.4k
Kibanaで秒間1万件のアクセスを可視化した話/nikkei-kibana-loganalyst2015
bungoume
20
17k
uwsgi-docker-pycon2015
bungoume
10
60k
Ansibleを結構使ってみた/ansible-nikkei-2015
bungoume
32
15k
Dynamic Inventoryと参照変数
bungoume
2
5k
Other Decks in Technology
See All in Technology
Observability — Extending Into Incident Response
nari_ex
1
540
JSConf JPのwebsiteをGatsbyからNext.jsに移行した話 - Next.jsの多言語静的サイトと課題
leko
2
190
CNCFの視点で捉えるPlatform Engineering - 最新動向と展望 / Platform Engineering from the CNCF Perspective
hhiroshell
0
140
AI-Readyを目指した非構造化データのメダリオンアーキテクチャ
r_miura
1
340
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
120
Dify on AWS 環境構築手順
yosse95ai
0
150
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
140
abema-trace-sampling-observability-cost-optimization
tetsuya28
0
230
Behind Postgres 18: The People, the Code, & the Invisible Work | Claire Giordano | PGConfEU 2025
clairegiordano
0
150
re:Inventに行くまでにやっておきたいこと
nagisa53
0
600
AWS DMS で SQL Server を移行してみた/aws-dms-sql-server-migration
emiki
0
250
OSSで50の競合と戦うためにやったこと
yamadashy
3
1k
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Making Projects Easy
brettharned
120
6.4k
Agile that works and the tools we love
rasmusluckow
331
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Language of Interfaces
destraynor
162
25k
Documentation Writing (for coders)
carmenintech
75
5.1k
Docker and Python
trallard
46
3.6k
Git: the NoSQL Database
bkeepers
PRO
431
66k
How GitHub (no longer) Works
holman
315
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
ຊܦࡁ৽ฉࣾ ക࡚ ༟ར $JSDMF$* ϢʔβʔίϛϡχςΟϛʔτΞοϓ
n r . )( iK p A ZUok ,(
- W s P EabC DY , ( Mc htSe l OI
• I • • • C
AWS Elastic Beanstalk AWS Lambda S3 push, merge
300ϦϙδτϦ͕ CircleCIΛར༻ • Unit test • Deploy • E2E test
AWS Elastic Beanstalk ECR push, merge • Unit
test • Deploy • E2E test Docker image Production Standby StandbyʹσϓϩΠ͠ E2E͕௨ͬͨΒSwap 300ϦϙδτϦ͕ CircleCIΛར༻
) ( (
) (
) ( AWS Elastic Beanstalk ECR 1. Spin up 10s
3. Setup remote docker 7s 4. Restore Docker cache 10s 5. Docker build 10s, 150s Production Standby 2. checkout 1s 6. Push Docker image 20~60s 7. Deploy 60s 8. E2E 60s 9. SWAP 8s ॲཧ࣌ؒҰྫͰ͢
• • ։ൃऀͷ࣌ؒΛୣ͏ •
ςετ͕མͪͨͱ͖ͷଛࣦײ͕૿͑Δʢࣗௐʣ • • ͙͢ϦϦʔε͍ͨ͠ͷʹͰ͖ͳ͍ • • CircleCIʹ͓͕͔͔ۚΔ
•
• • • •
• • executor imageʹssh, gitؚ·Ε͍ͯ·͔͢ʁ • Fallback࣌checkout͕େ෯ʹ͘ͳͬͨࣄྫ͋Γ
• . • OrbsΛ͏ͱ؆୯ • 5GB(head1GB)ϦϙδτϦͰ90s -> 60s • .
• ٯޮՌͷέʔε! • ↓5GBͷϦϙδτϦྫ • Cacheͳ͠ • Checkout code: 70-100ඵ • Cache͋Γ • Restoring cache: 73ඵ • Checkout code: 16ඵ • Saving cache: 139ඵ
• • )$! (
• )&"# '% *+
•
, ) ( 1 •
• ! • •
• DockerfileͰ `COPY . /usr/src/app` ͍ͯ͠Δ߹ .dockerignore Λ༻ҙ • deploy_env/ .git/ .circleci/ ͳͲΞϓϦ࣮ߦʹෆཁͳϑΝΠϧؚ͕·Εͯͳ͍͔
, ) (2 R I 1) ) 3 ) -
( . 3 D.1) I • (pull, cache-from) &3 ) ) -.2 • CircleCIʹ࿈བྷͯ͠༗ྉΦϓγϣϯΛ༗ޮʹ
& • 8 : B • 2 1 +, 4
, +5
• (1 ) (1 - )
• 1 , 0 2 : 5
• • C
I • !
• - + .1 0 + • L O
C 9 OK EI RI • U_ aTRI • B 8 B R D
• C I • 5Ҏ͙Β͍͕ඪ • • ֬ೝ͠ͳ͕ΒೖΕ·͠ΐ͏ •