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を導入した話
Search
urmot
January 25, 2019
Technology
0
57
CircleCIを導入した話
urmot
January 25, 2019
Tweet
Share
More Decks by urmot
See All by urmot
DDDにおける認可の扱いとKotlinにおける実装パターン / authorization-for-ddd-and-kotlin-implement-pattern
urmot
4
690
ログラスを支える設計標準について / loglass-design-standards
urmot
12
2.6k
ログラスを支える技術的投資の仕組み / loglass-technical-investment
urmot
10
5.6k
実践!CloudFormation Best Practice ~CloudFormationで始める組織改革~
urmot
2
3.1k
SPA on AWS
urmot
0
170
実践!CloudFormation Best Practice
urmot
0
160
RDBのログを取る時にDMSを使うという選択肢
urmot
0
89
ベンチャー企業のインフラを運用して学んだ99のこと
urmot
0
1.1k
Other Decks in Technology
See All in Technology
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
620
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
120
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Scaling GitHub
holman
458
140k
A better future with KSS
kneath
238
17k
A Philosophy of Restraint
colly
203
16k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Transcript
CircleCIΛಋೖͨ͠ ϝσΟΧϧࣄۀ෦ اը։ൃνʔϜ ଜຊ ༤ଠ
Agenda 1. എܠ) Background 2. ௐࠪ) Study 3. ߏ) Architecture
4. ·ͱΊ) Summary
എܠ
എܠ • ϝσΟΧϧࣄۀ෦ ϦχϡʔΞϧνʔϜ • ։ൃऀ: 1ਓɺΤϯδχΞ: 13ਓ • ׂ͝ͱʹϦϙδτϦΛ͚͍ͯΔ(90ݸ͘Β͍)
• privateͳϥΠϒϥϦɺpackage৴αʔόΛΦϯ ϓϨ্ʹཱͯͯ৴͍ͯ͠Δ(satisαʔό) • ఆظతʹεςʔδϯάʹσϓϩΠ • εςʔδϯάσϓϩΠޙɺςελʔ͞Μ͕ಈ࡞֬ೝ
CIಋೖલͷσϓϩΠϑϩʔ ΤϯδχΞ ऀ ᶃ Create Pull Request ᶅ ఆظతʹdev ->
master ᶄ PRग़ͨ͠Αʔ σϓϩΠαʔό ᶆ ssh Deployer ᶈ deploy ᶇ Run deployment ᶈ Wait deployment ᶉ Finish deployment ᶊ exit ᶋ σϓϩΠ௨ Staging VPC ςελʔ
1. ऀ͕σϓϩΠ͢Δ·ͰεςʔδϯάαʔόͰಈ࡞֬ ೝΛߦ͑ͳ͍ 2. εςʔδϯάαʔόͷσϓϩΠʹऀͷ͕࣌ؒऔΒΕ ͯ͠·͏ 3. σϓϩΠ͢ΔࡍʹɺॳาతͳΤϥʔʹૺ۰͢Δ͜ͱ͕Կ ͔͋Δ
CIπʔϧΛಋೖͯ͠σϓϩΠΛࣗಈԽʂʂ
ௐࠪ
CIπʔϧൺֱ • Jenkins • TravisCI • CircleCI • Wercker •
AWS CodePipeline • etc…
Jenkins • ϝϦοτ • ֦ுੑ͕ߴ͘ɺͳΜͰͰ͖Δ • ΦϯϓϨ্ʹߏங͢ΔͨΊɺIP͕ݻఆ • هࣄ๛ •
σϝϦοτ • αʔόΛ༻ҙ͢Δඞཁ͕͋ΔͨΊอकɾӡ༻͕ඞཁ • ຊ൪ΛؚΊϫʔΫϑϩʔʹΈࠐΉͨΊɺಋೖܭըతʹߦ͏ ඞཁ͕͋Δ • ཧΛଵΔͱJobͷৄࡉ͕࡞ͬͨਓ͔͠Θ͔Βͳ͘ͳͬͯ͠·͏
Jenkins • ϝϦοτ • ֦ுੑ͕ߴ͘ɺͳΜͰͰ͖Δ • ΦϯϓϨ্ʹߏங͢ΔͨΊɺIP͕ݻఆ • هࣄ๛ •
σϝϦοτ • αʔόΛ༻ҙ͢Δඞཁ͕͋ΔͨΊอकɾӡ༻͕ඞཁ • ຊ൪ΛؚΊϫʔΫϑϩʔʹΈࠐΉͨΊɺಋೖܭըతʹߦ͏ ඞཁ͕͋Δ • ཧΛଵΔͱJobͷৄࡉ͕࡞ͬͨਓ͔͠Θ͔Βͳ͘ͳͬͯ͠·͏
TravisCI • ϝϦοτ • CloudͰ͋ΔͨΊɺαʔόͷཧɾӡ༻ෆཁ • GithubͱͷੑߴΊ • هࣄ๛ •
σϝϦοτ • ίϯςφʹsshͰೖΕͳ͍ͷͰσόοά͠ʹ͍͘ • $129͕͔͔ΔͨΊɺCIΛ͡Ίͯಋೖ͢ΔࡍʹఏҊ͠ʹ͍͘ • CloudͳͷͰϏϧυͷʹIP͕มΘΔ
TravisCI • ϝϦοτ • CloudͰ͋ΔͨΊɺαʔόͷཧɾӡ༻ෆཁ • GithubͱͷੑߴΊ • هࣄ๛ •
σϝϦοτ • ίϯςφʹsshͰೖΕͳ͍ͷͰσόοά͠ʹ͍͘ • $129͕͔͔ΔͨΊɺCIΛ͡Ίͯಋೖ͢ΔࡍʹఏҊ͠ʹ͍͘ • CloudͳͷͰϏϧυͷʹIP͕มΘΔ
CircleCI • ϝϦοτ • CloudͰ͋ΔͨΊɺαʔόͷཧɾӡ༻ෆཁ • αϙʔτ͕खް͍ • هࣄ๛ •
sshͰίϯςφʹೖΕΔͷͰɺσόοά͍͢͠ • ແྉͰ͍࢝ΊΒΕΔ • σϝϦοτ • ClouldͳͷͰϏϧυͷʹຖճIP͕มΘΔ
CircleCI • ϝϦοτ • CloudͰ͋ΔͨΊɺαʔόͷཧɾӡ༻ෆཁ • αϙʔτ͕खް͍ • هࣄ๛ •
sshͰίϯςφʹೖΕΔͷͰɺσόοά͍͢͠ • ແྉͰ͍࢝ΊΒΕΔ • σϝϦοτ • ClouldͳͷͰϏϧυͷʹຖճIP͕มΘΔ
ߏ
CircleCIಋೖޙͷσϓϩΠϑϩʔ σϓϩΠαʔό Deployer Staging VPC ςετ & σϓϩΠ ΤϯδχΞ ऀ
ᶃ Create Pull Request ᶅ Merge ᶄ PRग़ͨ͠Αʔ ᶆ CI Build Start ᶋ ௨ ςελʔ ᶇ ᶈ Run Deployer ᶊ Finish Deploy ᶉ deploy
݁Ռ • ऀ͕σϓϩΠʹ࣌ؒΛऔΒΕͳͯ͘ࡁΉΑ͏ʹͳͬ ͨ • σϓϩΠલʹςετΛΒͤΔ͜ͱͰɺখ͍͞όάΛσ ϓϩΠલʹൃݟ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨ (CI) • ఆظతʹσϓϩΠ͍ͯͨ͠ͷ͕ɺ1ճͷϚʔδͰܧଓత
ʹසൟʹσϓϩΠͰ͖ΔΑ͏ʹͳͬͨ (CD)
·ͱΊ
͔͑ͨͬͨ͜ͱ • CIͷಋೖͷΑ͏ͳվળ͕·ͩ·ͩ͋Δ • ੵۃతʹఏҊ͢Δ͜ͱͰɺ৽ଔ1ͰղܾͰ͖Δ • ఏҊͯࣗ͠Ͱղܾ͢Δͷ͕͖ͳਓੋඇϨόϨδʔζ ʹདྷ͍ͯͩ͘͞