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
全社横断データ活用推進のコツと その負債とのつき合い方
masatoshi0205
0
160
データ活用促進のためのデータ分析基盤の進化
takumakouno
2
160
いざ、BSC討伐の旅
nikinusu
1
460
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
1
280
利きプロセススケジューラ
sat
PRO
4
2.6k
AIチャットボット開発への生成AI活用
ryomrt
0
100
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
1
370
Windows Autopilot Deployment by OSD Guy
tamaiyutaro
0
300
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
1
330
Postmanの日本市場におけるDevRel (的) 活動 / Postman's DevRelish activities in Japan
yokawasa
1
120
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
340
2024年グライダー曲技世界選手権参加報告/2024 WGAC report
jscseminar
0
190
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Practical Orchestrator
shlominoach
186
10k
Thoughts on Productivity
jonyablonski
67
4.3k
How to Ace a Technical Interview
jacobian
276
23k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Designing Experiences People Love
moore
138
23k
Become a Pro
speakerdeck
PRO
25
5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Gamification - CAS2011
davidbonilla
80
5k
Automating Front-end Workflow
addyosmani
1366
200k
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!