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
1.6k
3
Share
CircleCIの活用事例とCI高速化/circleci-community-meetup3-speedup
bungoume
April 23, 2019
More Decks by bungoume
See All by bungoume
djangocongressjp2023_password_hash
bungoume
2
1.6k
日経電子版でのDjango活用事例紹介 / djangocongressjp2022-nikkei
bungoume
4
6.9k
Password Hashing djangocongress 20180519
bungoume
5
4.2k
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
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
440
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
240
スクラムの中で AI-DLC workflow を 使い始めて3ヶ月の振り返り
kaminashi
0
130
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
310
AI와 협업하는 조직으로의 여정
arawn
0
510
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
120
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
250
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
79k
巨大プラットフォームを進化させる「第3のROI」
recruitengineers
PRO
2
1.2k
AWS Transform CustomでIaCコードを自由自在に変換しよう
duelist2020jp
0
140
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
170
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
120
Featured
See All Featured
The Curse of the Amulet
leimatthew05
1
11k
So, you think you're a good person
axbom
PRO
2
2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
GraphQLとの向き合い方2022年版
quramy
50
15k
Faster Mobile Websites
deanohume
310
31k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Deep Space Network (abreviated)
tonyrice
0
120
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Paper Plane
katiecoart
PRO
1
49k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
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Ҏ͙Β͍͕ඪ • • ֬ೝ͠ͳ͕ΒೖΕ·͠ΐ͏ •