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_Meetup3_LT
Search
Yasuhiroki
September 15, 2017
Programming
0
570
CircleCI_Meetup3_LT
Yasuhiroki
September 15, 2017
Tweet
Share
More Decks by Yasuhiroki
See All by Yasuhiroki
自分に勉強させるには
yasuhiroki
1
380
Android Studio `Command+Shift+A`
yasuhiroki
0
310
シェルスクリプトをサーバーレスで cron したい
yasuhiroki
1
760
rails new コマンド
yasuhiroki
1
700
自動化を習慣化する
yasuhiroki
2
14k
GitHub Actions Parallel Testing
yasuhiroki
1
1.2k
circleci.vim
yasuhiroki
0
1.5k
ベンチャー企業がCircleCIを選んだ理由と活用方法
yasuhiroki
1
760
Rubyの正規表現を調べてみた
yasuhiroki
0
780
Other Decks in Programming
See All in Programming
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
最新TCAキャッチアップ
0si43
0
190
subpath importsで始めるモック生活
10tera
0
320
RubyLSPのマルチバイト文字対応
notfounds
0
120
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
イベント駆動で成長して委員会
happymana
1
340
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
110
初めてDefinitelyTypedにPRを出した話
syumai
0
420
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
610
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Writing Fast Ruby
sferik
627
61k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Ruby is Unlike a Banana
tanoku
97
11k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Faster Mobile Websites
deanohume
305
30k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
A better future with KSS
kneath
238
17k
Transcript
CircleCI 2.0 ฃಆه @yasuhiroki
Rails (ॳΊͯ) + CircleCI (ॳΊͯ) ΤϯδχΞͷฃಆه
ୈҰষ CircleCI 1.0 ͷ͜ͱΕΔ
CircleCI ͕ࣦഊ͍ͯ͠Δ
bundle install Ͱࣦഊ͍ͯ͠Δ
ͲΜͳॲཧΛ࣮ߦ͍ͯ͠ΔͷͩΖ͏ʁ
Կઃఆ͍ͯ͠ͳ͍
CircleCI 1.0 ͷΈ • CircleCIͱͷ࿈ܞΛࢼͦ͏ͱ͍ͯͨ͠Β͍͠ • ઌߦͯ͠ Android Λࢼ͍ͯͨ͠ •
CircleCI 1.0 ࣌ OOM ͰΑ͘ࢮ͵ • ຊ֨తͳ࿈ܞ৲ࠐΈ͍ͯͨ͠
CircleCI 1.0 ͷ͜ͱΕΔ • OOM ͰΑ͘ࢮ͵ͷ 1.0 ·Ͱ • CircleCI
1.0 ͷࠒʹ࠾༻ΛΜͰ͍ͨͳΒɺ CircleCI 2.0 ผͱͯ͠ݕ౼͢͠
ୈೋষ .circleci/config.yml
CircleCI ͱྑ͘ͳΓ͍ͨ
CircleCI ͱྑ͘ͳΓ͍ͨ
ॆ࣮ͷυΩϡϝϯτ
ࢥ͍͍ͭͨ͜ͱ͙͢ࢼ͢
શͯࢼ͢ʢͭΓͰ༡Ϳʣ
ͻͨ͢Βࢼ͢
ϏϧυࣦഊͷΑ͋͘ΔݪҼ • ઃఆϑΝΠϧͷߏจΤϥʔ • bundle install • XXXXX: command not
found git push ͢Δલʹؾ͖͘
खݩͰݕূͰ͖Δ CircleCI CLI
ެࣜͷྫ͕ͨ͘͞Μ͋Δ
CircleCI 2.0 ͱ࿈ܞྃ
ୈࡾষ ΑΓ͘
ͬͱྑ͘Ͱ͖Δ
docker-compose • ։ൃ Mac ͕ͩຊ൪αʔό Linux Mac Ͱ Linux
ͷಈ࡞֬ೝ͕͔ͨͬͨ͠ • ͔ͤͬ͘ docker-compose Λ࡞ͬͨͷͰɺ CircleCI Ͱ͏Α͏ʹ͍ͯͨ͠
CircleCI 2.0 Ͱ docker-compose Λ͏ʹ • ͬ͘͞ͱಈ͔͢ͳΒ `machine: true` Ϟʔυ
• docker ίϚϯυॳΊ͔Βೖ͍ͬͯΔ • docker-compose wget ͢Δ͚ͩ • खݩͰ͏ͷͱಉ͡ײ֮Ͱ͑Δ
CircleCI 2.0 ͷ docker image Ͱ docker-compose Λ͏ͱʁ • ϋϚϦϙΠϯτ͕ଟ͍
• Alpine Πϝʔδͩͱ wget ͚ͨͩ͠Ͱಈ͔ͳ͍ • docker daemon ͕Ͳ͜Ͱಈ͍͍ͯΔͷ͔ҙ͓ࣝͯ͘͠ ඞཁ͕͋Δ • ίϯςφͷ docker όʔδϣϯ͕৽ͯ͘͠ɺ docker daemon ผͰಈ͍͍ͯͯόʔδϣϯ͕ݹ͍
machine: true Ͱμϝʁ • ॳظىಈ͕͍ • ඞཁͳπʔϧΛࣗͰΠϯετʔϧ͠ͳ͚Ε ͳΒͳ͍ • yaml
ϑΝΠϧ͕ଠΔ
machine: true Ͱμϝʁ • Note: There is an overhead for
provisioning a machine executor and use of the machine key may require additional fees in a future pricing update. - https://circleci.com/docs/2.0/docker- compose/ • কདྷɺ՝ۚରʹͳΔ͔͠Εͳ͍
docker-compose ΛΊΔ
Docker ΠϝʔδΛ༻ҙ • CircleCIͰϏϧυ͢Δઐ༻ͷDockerΠϝʔδ Λ༻ҙ͢Δ • docker-compose Ͱ༻͢Δ DockerΠϝʔδͰྑ͍ͷͰ͍ճ͢
ܶతվળ
࣍ষ ͦͯ͠ DevOps …
ࣗݾհ
@yasuhiroki • Yasuhiro Kiyota @yasuhiroki • Certified Jenkins Engineer •
AWS ͷ DevOps ͬΆ͍ۀͯ͠·͢
A10 Lab inc. • ΤϯδχΞืूதͰ͢ʂ • Android, iOS, RoR, AWS
• ҰॹʹࣗಈԽΛ͢͢ΊΔ͕ؒཉ͍͠Ͱ͢ • https://a10lab.com/recruit/ • https://www.wantedly.com/companies/a10lab/projects
͓͠·͍