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
Drone CI
Search
Daisuke Fujita
October 20, 2015
Technology
3
490
Drone CI
社内勉強会で Drone について話した資料です
Daisuke Fujita
October 20, 2015
Tweet
Share
More Decks by Daisuke Fujita
See All by Daisuke Fujita
SREcon19 Asia/Pacific Recap
dtan4
0
150
Our Practices of Delegating Ownership in Microservices World
dtan4
4
8.8k
Kubernetes Cluster Upgrade / Mercari Meetup for Microservices Platform
dtan4
3
4.5k
KubeCon EU 2018 Recap: Multi-Tenancy in Kubernetes: Best Practices Today, and Future Directions / Kubernetes Meetup Tokyo 11 #k8sjp
dtan4
1
1.8k
Wantedly から Chef を一掃した話 / #chibadan
dtan4
24
11k
さようなら Chef こんにちは Dockerfile / Web Tech Tokyo #1
dtan4
6
7k
Docker をフル活用したインフラの紹介と成長し続けるためのインフラ戦略 / #abejameetup
dtan4
19
3.9k
Docker Compose PaaS の作り方、そして社内に導入した話 / #yapc8oji
dtan4
1
8.2k
Writing Kubenetes tools in Go
dtan4
1
3.5k
Other Decks in Technology
See All in Technology
Mastering Quickfix
daisuzu
1
320
組織成長を加速させるオンボーディングの取り組み
sudoakiy
3
290
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
120
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
SSMRunbook作成の勘所_20241120
koichiotomo
3
180
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
320
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Engineer Career Talk
lycorp_recruit_jp
0
200
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
670
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
340
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
110
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
140
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
17k
Site-Speed That Sticks
csswizardry
0
40
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Building an army of robots
kneath
302
43k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Faster Mobile Websites
deanohume
305
30k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Transcript
Drone CI 2015-10-20 @dtan4 http://www.humanitarianstudies.no/wp-content/uploads/2014/06/drone-sunset.jpg
2छྨͷ Drone CI • Drone.io • CI as a Service
• Drone • OSS • @dtan4 ͕ಋೖ͠Α͏ͱฃಆ͍ͯ͠Δͭ
Drone.io https://drone.io
None
Drone.io • CI as a Service ͱͯ͠ͷ Drone • OSS
ແྉɺPrivate Repository ༗ྉ • GitHub, Bitbucket, Google Code ରԠ • ͖ͳΑ͏ʹςετεΫϦϓτΛ͔͚Δ • ϦϙδτϦϧʔτͷ .yml ͡Όͳ͍… • S3, Heroku, Dotcloud, … ʹσϓϩΠՄೳ https://drone.io/
Drone.io
Drone.io
Drone.io … • ʢͨͿΜʣDocker Βͳ͍ & ͬͯͳ͍ • ͍·Ͳ͖ .yml
ͰεΫϦϓτॻ͚ͳ͍ͷ… • ଞΑΓ͍҆ͱ͍͏Θ͚Ͱͳ͍ • m1.small + Jenkins ΑΓ͍҆ͱ͍͏͚ͩ • ςετΛฒྻʹ͢Δͷ CircleCI ΑΓߴ͍ • Jenkins ͷ͍উखΛΫϥυαʔϏεͰɺ ͱ͍͏ਓ͚ʁ
Drone drone/drone
Drone • OSS ͷ Docker-based CI • Ϗϧυ͝ͱʹಠཱͨ͠ Docker Container
ཱ͕ͭ • DB ͱ͔Ϗϧυ͝ͱʹཱͭ • Drone.io ͷ @bradrydzewski ͕Φʔφʔ • Golang drone/drone
Drone • GitHub, GH:E, Bitbucket, GitLab ʹରԠ • ϦϙδτϦϧʔτͷ .drone.yml
ʹ ςετεΫϦϓτΛॻ͘ • OSS CI ͩͱ Drone ͱ GitLab CI ͘Β͍͔͠ ରԠͯ͠ͳ͍ • Heroku, S3, … ͷσϓϩΠରԠ • Email, HipChat, Slack, … ͷ௨ʹରԠ drone/drone
Jenkins #1 #2 #3 #4
Drone #1 #2 #3 #4
Version of Drone • Version 0.3 (master) • ݱࡏͷ stable
• 1ϲ݄͘Β͍์ஔ͞ΕͯΔ • Version 0.4 (0.4.0) • Ӷҙ։ൃத • .drone.yml ͷޓੑͳ͍ drone/drone
.drone.yml image: ruby:2.2.3 cache: - vendor/bundle env: - RAILS_ENV=test services:
- postgres script: - bundle install -j4 --path=vendor/bundle - bundle exec rake db:test:prepare - bundle exec rspec 0.3 Α͋͘Δ Rails Drone ެࣜΠϝʔδ or ެ։͞Ε͍ͯΔΠϝʔδ ͖͜͜ͳΠϝʔδ͑Δ
.drone.yml cache: mount: - vendor/bundle compose: database: image: postgres:9.4 build:
image: ruby:2.2.3 environment: - DATABASE_USER=postgres - RAILS_ENV=test commands: - bundle install -j4 --path=vendor/bundle - bundle exec rake db:test:prepare - bundle exec rspec 0.4 Α͋͘Δ Rails
ςετը໘ 0.3 Ϗϧυ్தͰ ΩϟϯηϧͰ͖ͳ͍…
ςετը໘ 0.4
Secret Variables • 0.3, 0.4 ͱʹ Web UI ্ͰઃఆՄೳ •
wercker Έ͍ͨʹӅͯ͘͠Εͳ͍ • 0.4 ͩͱ .drone.sec ͱ͍͏ϑΝΠϧʹ҉߸Խͯ͠ ϦϙδτϦʹஔ͚Δ • travis encrypt ͱ ࣅͨײ͡
Docker on Drone • جຊతʹͰ͖ͳ͍ • ςετίϯςφ͕ /var/run/docker.sock Ϛϯτͯ͠ͳ͍ͨΊ •
ଞͷςετίϯςφΛফͤͯ͠·͏ • Docker in Docker ͳΒͰ͖Δ…ʁ (#380) • ߟ͑ͳ͓ͤͱ͍͏هࣄ͋Δ • DOCKER_HOST Λผϗετʹ͚ͯ docker build docker-compose ͢Δͱ͔…ʁ http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
ॴײ • ࣗલͰ CI ࣋ͭͳΒ͜ΕҰ • Docker ίϯςφͱͯ͠ಈ͔͢ͷ༰қ • ΠϚυΩͷ
CI as a service ͷػೳΛͪΌΜͱ ͑Δ • ·ͩ·ͩ։ൃ్্ • Drone 0.4 ͱ PostgreSQL ͷ૬ੑ͕ѱ͍ • ͍͟ͱͳͬͨΒιʔεಡΜͰͤΔ • OSS! OSS!