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-speedup
Search
bungoume
April 23, 2019
Technology
3
1.4k
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
1k
日経電子版でのDjango活用事例紹介 / djangocongressjp2022-nikkei
bungoume
4
4.1k
Password Hashing djangocongress 20180519
bungoume
5
3.8k
OSSで始めるセキュリティログ収集/oss-securitylog-builderscon2017
bungoume
29
11k
日経電子版のアプリ開発を支えるログ活用術/nikkei-log-201609
bungoume
1
1.2k
Kibanaで秒間1万件のアクセスを可視化した話/nikkei-kibana-loganalyst2015
bungoume
20
17k
uwsgi-docker-pycon2015
bungoume
11
58k
Ansibleを結構使ってみた/ansible-nikkei-2015
bungoume
32
15k
Dynamic Inventoryと参照変数
bungoume
2
4.7k
Other Decks in Technology
See All in Technology
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
AutomatedLabを使って内部ペンテストを勉強しよう! -やられ社内ネットワークの自動構築-
n_etupirka
1
610
たくさん本を読んだけど 1年後には綺麗サッパリ!を乗り越えて 学習の鬼になるぞ👹
yum3
0
160
クラウド利用者の「責任」をどう果たす?AWSセキュリティ対策のススメ #AWSSummit
hiashisan
0
270
ACRiルーム最新情報とAMD GPUサーバーのご紹介
anjn
0
150
テストケースの自動生成に生成AIの導入を試みた話と生成AIによる今後の期待
shift_evolve
0
180
ゆめみのアクセシビリティの現在地と今後
ryokatsuse
3
290
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
MySQLのロックの種類とその競合
yoku0825
6
1.6k
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
Luupの開発組織におけるインシデントマネジメントの変遷 ver.RoadtoSRENEXT2024
grimoh
1
270
Classmethod Odyssey 登壇資料
yamahiro
0
390
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Fireside Chat
paigeccino
25
2.8k
Web development in the modern age
philhawksworth
203
10k
Faster Mobile Websites
deanohume
303
30k
Mobile First: as difficult as doing things right
swwweet
219
8.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
Large-scale JavaScript Application Architecture
addyosmani
506
110k
How GitHub (no longer) Works
holman
305
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
149
45k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Art, The Web, and Tiny UX
lynnandtonic
291
20k
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Ҏ͙Β͍͕ඪ • • ֬ೝ͠ͳ͕ΒೖΕ·͠ΐ͏ •