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
900
日経電子版でのDjango活用事例紹介 / djangocongressjp2022-nikkei
bungoume
4
3.6k
Password Hashing djangocongress 20180519
bungoume
5
3.7k
OSSで始めるセキュリティログ収集/oss-securitylog-builderscon2017
bungoume
29
10k
日経電子版のアプリ開発を支えるログ活用術/nikkei-log-201609
bungoume
1
1.1k
Kibanaで秒間1万件のアクセスを可視化した話/nikkei-kibana-loganalyst2015
bungoume
20
16k
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
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
260
MapLibreとAmazon Location Service
dayjournal
1
170
Grafana x PagerDuty Better Together
jacopen
1
210
GrafanaMeetup_AmazonManagedGrafanaのアクセス制御機能とマルチテナント環境下でのアクセス制御について
daitak
0
350
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
3
200
VS CodeでAWSを操作しよう
smt7174
9
1.9k
web-application-security
matsuihidetoshi
1
180
MixIT 2024 - Pulumi : Gérer son infra avec son langage de programmation préféré
ju_hnny5
1
110
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
390
EM完全に理解した と思ったけど、 やっぱり何も分からなかった話 / EM Night Fukuoka #1
hirutas
0
140
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.5k
.NET Profiler in 2024.
kkamegawa
2
630
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Designing for Performance
lara
602
67k
GraphQLの誤解/rethinking-graphql
sonatard
54
9.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.7k
Designing the Hi-DPI Web
ddemaree
276
33k
Become a Pro
speakerdeck
PRO
12
4.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
5
1.3k
Web development in the modern age
philhawksworth
203
10k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
10
1.5k
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Ҏ͙Β͍͕ඪ • • ֬ೝ͠ͳ͕ΒೖΕ·͠ΐ͏ •